]> rtime.felk.cvut.cz Git - jailhouse.git/blob - configs/tiny-demo.c
core/configs: Rename cell flag "Unmanaged Exit" to "Passive Comm Region"
[jailhouse.git] / configs / tiny-demo.c
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Minimal configuration for demo inmates, 1 CPU, 1 MB RAM, 1 serial port
5  *
6  * Copyright (c) Siemens AG, 2013, 2014
7  *
8  * Authors:
9  *  Jan Kiszka <jan.kiszka@siemens.com>
10  *
11  * This work is licensed under the terms of the GNU GPL, version 2.  See
12  * the COPYING file in the top-level directory.
13  */
14
15 #include <linux/types.h>
16 #include <jailhouse/cell-config.h>
17
18 #define ALIGN __attribute__((aligned(1)))
19 #define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
20
21 struct {
22         struct jailhouse_cell_desc ALIGN cell;
23         __u64 ALIGN cpus[1];
24         struct jailhouse_memory ALIGN mem_regions[1];
25         __u8 ALIGN pio_bitmap[0x2000];
26 } ALIGN config = {
27         .cell = {
28                 .name = "tiny-demo",
29                 .flags = JAILHOUSE_CELL_PASSIVE_COMMREG,
30
31                 .cpu_set_size = sizeof(config.cpus),
32                 .num_memory_regions = ARRAY_SIZE(config.mem_regions),
33                 .num_irq_lines = 0,
34                 .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap),
35                 .num_pci_devices = 0,
36         },
37
38         .cpus = {
39                 0x4,
40         },
41
42         .mem_regions = {
43                 /* RAM */ {
44                         .phys_start = 0x3be00000,
45                         .virt_start = 0,
46                         .size = 0x00100000,
47                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
48                                 JAILHOUSE_MEM_EXECUTE,
49                 },
50         },
51
52         .pio_bitmap = {
53                 [     0/8 ...  0x2f7/8] = -1,
54                 [ 0x2f8/8 ...  0x2ff/8] = 0, /* serial2 */
55                 [ 0x300/8 ...  0x407/8] = -1,
56                 [ 0x408/8 ...  0x40f/8] = 0xf0, /* PM-timer H700 */
57                 [ 0x410/8 ... 0x1807/8] = -1,
58                 [0x1808/8 ... 0x180f/8] = 0xf0, /* PM-timer H87I-PLUS */
59                 [0x1810/8 ... 0xb007/8] = -1,
60                 [0xb008/8 ... 0xb00f/8] = 0xf0, /* PM-timer QEMU */
61                 [0xb010/8 ... 0xdfff/8] = -1,
62                 [0xe000/8 ... 0xe007/8] = 0, /* OXPCIe952 serial2 */
63                 [0xe008/8 ... 0xffff/8] = -1,
64         },
65 };