]> rtime.felk.cvut.cz Git - jailhouse.git/blob - configs/vexpress.c
jailhouse: inmates: bench: Add -R option -- repeats count.
[jailhouse.git] / configs / vexpress.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_system header;
20         __u64 cpus[1];
21         struct jailhouse_memory mem_regions[8];
22         struct jailhouse_irqchip irqchips[1];
23 } __attribute__((packed)) config = {
24         .header = {
25                 .signature = JAILHOUSE_SYSTEM_SIGNATURE,
26                 .hypervisor_memory = {
27                         .phys_start = 0xfc000000,
28                         .size = 0x4000000,
29                 },
30                 .debug_console = {
31                         .phys_start = 0x1c090000,
32                         .size = 0x1000,
33                         .flags = JAILHOUSE_MEM_IO,
34                 },
35                 .root_cell = {
36                         .name = "VExpress Linux",
37
38                         .cpu_set_size = sizeof(config.cpus),
39                         .num_memory_regions = ARRAY_SIZE(config.mem_regions),
40                         .num_irqchips = 1,
41                 },
42         },
43
44         .cpus = {
45                 0xf,
46         },
47
48         .mem_regions = {
49                 /* SMC91x */ {
50                         .phys_start = 0x1a000000,
51                         .virt_start = 0x1a000000,
52                         .size = 0x00001000,
53                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
54                                 JAILHOUSE_MEM_IO,
55                 },
56                 /* SP810 */ {
57                         .phys_start = 0x1c020000,
58                         .virt_start = 0x1c020000,
59                         .size = 0x00010000,
60                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
61                                 JAILHOUSE_MEM_IO,
62                 },
63                 /* MMC */ {
64                         .phys_start = 0x1c050000,
65                         .virt_start = 0x1c050000,
66                         .size = 0x00001000,
67                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
68                                 JAILHOUSE_MEM_IO,
69                 },
70                 /* Mouse */ {
71                         .phys_start = 0x1c070000,
72                         .virt_start = 0x1c070000,
73                         .size = 0x00010000,
74                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
75                                 JAILHOUSE_MEM_IO,
76                 },
77                 /* Keyboard */ {
78                         .phys_start = 0x1c060000,
79                         .virt_start = 0x1c060000,
80                         .size = 0x00010000,
81                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
82                                 JAILHOUSE_MEM_IO,
83                 },
84                 /* UARTs */ {
85                         .phys_start = 0x1c090000,
86                         .virt_start = 0x1c090000,
87                         .size = 0x00040000,
88                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
89                                 JAILHOUSE_MEM_IO,
90                 },
91                 /* Redistributors (ignore the mmio traps)*/ {
92                         .phys_start = 0x2f100000,
93                         .virt_start = 0x2f100000,
94                         .size = 0x04000000,
95                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
96                                 JAILHOUSE_MEM_IO,
97                 },
98                 /* RAM */ {
99                         .phys_start = 0x80000000,
100                         .virt_start = 0x80000000,
101                         .size = 0x7c000000,
102                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
103                                 JAILHOUSE_MEM_EXECUTE,
104                 },
105         },
106         .irqchips = {
107                 /* GIC v3 */ {
108                         .address = 0x2f000000, /* GIC v2: 0x2f001000 */
109                         .pin_base = 32,
110                         .pin_bitmap = {
111                                 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
112                         },
113                 },
114         },
115
116 };