]> rtime.felk.cvut.cz Git - jailhouse.git/blob - configs/vexpress-uart-demo.c
hypervisor, driver: Added signature for .cell files
[jailhouse.git] / configs / vexpress-uart-demo.c
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Copyright (c) ARM Limited, 2014
5  *
6  * Authors:
7  *  Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2.  See
10  * the COPYING file in the top-level directory.
11  */
12
13 #include <linux/types.h>
14 #include <jailhouse/cell-config.h>
15
16 #define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
17
18 struct {
19         struct jailhouse_cell_desc cell;
20         __u64 cpus[1];
21         struct jailhouse_memory mem_regions[2];
22 } __attribute__((packed)) config = {
23         .cell = {
24                 .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
25                 .name = "pl011-demo",
26                 .flags = JAILHOUSE_CELL_PASSIVE_COMMREG,
27
28                 .cpu_set_size = sizeof(config.cpus),
29                 .num_memory_regions = ARRAY_SIZE(config.mem_regions),
30                 .num_irqchips = 0,
31                 .pio_bitmap_size = 0,
32                 .num_pci_devices = 0,
33         },
34
35         .cpus = {
36                 0x4,
37         },
38
39         .mem_regions = {
40                 /* UART 2 */ {
41                         .phys_start = 0x1c0b0000,
42                         .virt_start = 0x1c090000,
43                         .size = 0x10000,
44                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
45                                 JAILHOUSE_MEM_IO,
46                 },
47                 /* RAM */ {
48                         .phys_start = 0xfbff0000,
49                         .virt_start = 0,
50                         .size = 0x00010000,
51                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
52                                 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE,
53                 },
54         }
55 };