]> rtime.felk.cvut.cz Git - jailhouse.git/blob - configs/fiasco-demo.c
jailhouse: inmates: bench: Add -R option -- repeats count.
[jailhouse.git] / configs / fiasco-demo.c
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Configuration for linux inmate, 1 CPU, ~60 MB RAM, 1 serial port
5  *
6  * Copyright (c) Siemens AG, 2013-2015
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[1];
24                 struct jailhouse_irqchip irqchips[0];
25                 struct jailhouse_cache cache_regions[1];
26                 __u8 pio_bitmap[0x2000];
27                 struct jailhouse_pci_device pci_devices[0];
28          } __attribute__((packed)) config = {
29                 .cell = {
30                         .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
31                         .name = "fiasco-demo",
32                         .flags = 0/*JAILHOUSE_CELL_PASSIVE_COMMREG*/,
33
34                         .cpu_set_size = sizeof(config.cpus),
35                         .num_memory_regions = ARRAY_SIZE(config.mem_regions),
36                         .num_irqchips = ARRAY_SIZE(config.irqchips),
37                         .num_cache_regions = ARRAY_SIZE(config.cache_regions),
38                         .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap),
39                         .num_pci_devices = ARRAY_SIZE(config.pci_devices),
40                         .num_pci_caps = 0,
41                 },
42
43                 .cpus = {
44                         0b000010,
45                 },
46
47                 .mem_regions = {
48                         /* low RAM */ {
49                                 .phys_start = 0x3b600000,
50                                 .virt_start = 0,
51                                 .size = 0x3c00000,
52                                 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
53                                 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
54                                 JAILHOUSE_MEM_LOADABLE,
55                         },
56                 },
57
58                  .cache_regions = {
59                 {
60                                 .start = 0,
61                                 .size = 2,
62                                 .type = JAILHOUSE_CACHE_L3,
63                 },
64          },
65
66          .pio_bitmap = {
67
68                 [     0/8 ...   0x1f/8] = -1,
69                 [  0x20/8 ...   0x27/8] = 0xfc, /* PIC Master 0x20 0x21 */
70                 [  0x28/8 ...   0x3f/8] = -1,
71                 [  0x40/8 ...   0x47/8] = 0xf0, /* PIT */
72                 [  0x48/8 ...   0x5f/8] = -1,
73                 [  0x60/8 ...   0x67/8] = 0,
74                 [  0x68/8 ...   0x7f/8] = -1,
75                 [  0x80/8 ...   0x87/8] = 0xfe, //delay
76                 [  0x88/8 ...   0x99/8] = -1,
77                 [  0xa0/8 ...   0xa7/8] = 0xfc, /* PIC Slave 0xA0 0xA1 */
78                 [  0xa8/8 ...  0x3f7/8] = -1,
79                 [ 0x3f8/8 ...  0x3ff/8] = 0, /* serial0 */
80                 [ 0x400/8 ... 0xe00f/8] = -1,
81                 [0xe010/8 ... 0xe017/8] = -1, /* OXPCIe952 serial1 */
82                 [0xe018/8 ... 0xffff/8] = -1,
83         },
84 };