]> rtime.felk.cvut.cz Git - jailhouse.git/blob - configs/hpet-inmate-config.c
jailhouse: inmates: bench: Add -R option -- repeats count.
[jailhouse.git] / configs / hpet-inmate-config.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
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 ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
19
20 struct {
21         struct jailhouse_cell_desc cell;
22         __u64 cpus[1];
23         struct jailhouse_memory mem_regions[4];
24         struct jailhouse_irqchip irqchips[0];
25         __u8 pio_bitmap[0x2000];
26 } __attribute__((packed)) config = {
27         .cell = {
28                 .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
29                 .name = "hpet-demo",
30
31                 .cpu_set_size = sizeof(config.cpus),
32                 .num_memory_regions = ARRAY_SIZE(config.mem_regions),
33                 .num_irqchips = ARRAY_SIZE(config.irqchips),
34                 .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap),
35                 .num_pci_devices = 0,
36         },
37
38         .cpus = {
39                 0x8,
40         },
41
42         .mem_regions = {
43                 /* low RAM */ {
44                         .phys_start = 0x3f000000,
45                         .virt_start = 0,
46                         .size = 0x00100000,
47                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
48                                 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
49                                 JAILHOUSE_MEM_LOADABLE,
50                 },
51                 /* communication region */ {
52                         .virt_start = 0x00100000,
53                         .size = 0x00001000,
54                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
55                                 JAILHOUSE_MEM_COMM_REGION,
56                 },
57                 // /* RAM */ {
58                 //      .phys_start = 0x3f200000,
59                 //      .virt_start = 0x3f200000,
60                 //      .size = 0xddf000,
61                 //      .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
62                 //              JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
63                 // },
64                 // /* ACPI */ {
65                 //      .phys_start = 0x3ffdf000,
66                 //      .virt_start = 0x3ffdf000,
67                 //      .size = 0x30000,
68                 //      .flags = JAILHOUSE_MEM_READ |
69                 //              JAILHOUSE_MEM_ROOTSHARED,
70                 // },
71                 /* MemRegion: fed00000-fed003ff : PNP0103:00 */
72                 {
73                         .phys_start = 0xfed00000,
74                         .virt_start = 0xfed00000,
75                         .size = 0x1000,
76                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
77                 },
78                 {
79                         .phys_start = 0xfec00000,
80                         .virt_start = 0xfec00000,
81                         .size = 0x1000,
82                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
83                 },
84         },
85
86         // .irqchips = {
87         //      /* IOAPIC */ {
88         //              .address = 0xfec00000,
89         //              .id = 0xff01,
90         //      /* Timer0 has IRQ2, Timer1 has IRQ8, IRQ16-IRQ32 could be used for timers too.*/
91         //              .pin_bitmap = 0x00ff0104, 
92         //      },
93         // },
94
95         .pio_bitmap = {
96                 [     0/8 ...  0x3f7/8] = -1,
97                 [ 0x3f8/8 ...  0x3ff/8] = 0, /* serial1 */
98                 [ 0x400/8 ... 0xe00f/8] = -1,
99                 [0xe010/8 ... 0xe017/8] = -1, /* OXPCIe952 serial1 */
100                 [0xe018/8 ... 0xffff/8] = -1,
101         },
102 };