]> rtime.felk.cvut.cz Git - jailhouse.git/blob - configs/vexpress.c
arm: config examples
[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[6];
22         struct jailhouse_irqchip irqchips[1];
23 } __attribute__((packed)) config = {
24         .header = {
25                 .hypervisor_memory = {
26                         .phys_start = 0xa0000000,
27                         .size = 0x4000000 - 0x2000,
28                 },
29                 .root_cell = {
30                         .name = "VExpress Linux",
31
32                         .cpu_set_size = sizeof(config.cpus),
33                         .num_memory_regions = ARRAY_SIZE(config.mem_regions),
34                         .num_irqchips = 1,
35                 },
36         },
37
38         .cpus = {
39                 0xf,
40         },
41
42         .mem_regions = {
43                 /* SP810 */ {
44                         .phys_start = 0x1c020000,
45                         .virt_start = 0x1c020000,
46                         .size = 0x00010000,
47                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
48                                 JAILHOUSE_MEM_DMA,
49                 },
50                 /* Mouse */ {
51                         .phys_start = 0x1c070000,
52                         .virt_start = 0x1c070000,
53                         .size = 0x00010000,
54                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
55                                 JAILHOUSE_MEM_DMA,
56                 },
57                 /* Keyboard */ {
58                         .phys_start = 0x1c060000,
59                         .virt_start = 0x1c060000,
60                         .size = 0x00010000,
61                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
62                                 JAILHOUSE_MEM_DMA,
63                 },
64                 /* UARTs */ {
65                         .phys_start = 0x1c090000,
66                         .virt_start = 0x1c090000,
67                         .size = 0x00040000,
68                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
69                                 JAILHOUSE_MEM_DMA,
70                 },
71                 /* Redistributors (ignore the mmio traps)*/ {
72                         .phys_start = 0x2f100000,
73                         .virt_start = 0x2f100000,
74                         .size = 0x04000000,
75                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
76                                 JAILHOUSE_MEM_DMA,
77                 },
78                 /* RAM */ {
79                         .phys_start = 0x80000000,
80                         .virt_start = 0x80000000,
81                         .size = 0x80000000,
82                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
83                                 JAILHOUSE_MEM_EXECUTE,
84                 },
85         },
86         .irqchips = {
87                 /* GIC */ {
88                         .address = 0x2f000000,
89                         .pin_bitmap = 0xffffffffffffffff,
90                 },
91         },
92
93 };