]> rtime.felk.cvut.cz Git - jailhouse.git/blob - configs/fiasco-demo.c
jailhouse: configs: fiasco: Delete code that makes no sence. Add commented block...
[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         __u8 pio_bitmap[0x2000];
25         struct jailhouse_pci_device pci_devices[0];
26 } __attribute__((packed)) config = {
27         .cell = {
28                 .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
29                 .name = "fiasco-demo",
30                 .flags = 0/*JAILHOUSE_CELL_PASSIVE_COMMREG*/,
31
32                 .cpu_set_size = sizeof(config.cpus),
33                 .num_memory_regions = ARRAY_SIZE(config.mem_regions),
34                 .num_irqchips = 0,
35                 .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap),
36                 .num_pci_devices = ARRAY_SIZE(config.pci_devices),
37                 .num_pci_caps = 0,
38         },
39
40         .cpus = {
41                 0xc,
42         },
43
44         .mem_regions = {
45                 /* low RAM */ {
46                         .phys_start = 0x3b600000,
47                         .virt_start = 0,
48                         .size = 0x44ff000,
49                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
50                                 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
51                                 JAILHOUSE_MEM_LOADABLE,
52                 },
53                 ///* communication region */ {
54                 //      .virt_start = 0x00100000,
55                 //      .size = 0x00001000,
56                 //      .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
57                 //              JAILHOUSE_MEM_COMM_REGION,
58                 //},
59                 // /* high RAM */ {
60                 //      .phys_start = 0x3b700000,
61                 //      .virt_start = 0x00200000,
62                 //      .size = 0x3aff000,
63                 //      .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
64                 //              JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
65                 //              JAILHOUSE_MEM_LOADABLE,
66                 // },
67                 // /* IVSHMEM shared memory region */
68                 // {
69                 //      .phys_start = 0x3f1ff000,
70                 //      .virt_start = 0x3f1ff000,
71                 //      .size = 0x1000,
72                 //      .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
73                 //              JAILHOUSE_MEM_ROOTSHARED,
74                 // },
75         },
76
77         .pio_bitmap = {
78                 
79                 [  0x0/8 ...  0x3f7/8] = -1,
80 //Uncomment this to enable 0x80 port
81 /*              [       0/8 ...   0x7f/8] = -1,
82                 [  0x80/8 ...   0x87/8] = 0xfe,
83                 [  0x88/8 ...  0x3f7/8] = -1,
84 */              
85                 [ 0x3f8/8 ...  0x3ff/8] = 0, /* serial1 */
86                 [ 0x400/8 ... 0xe00f/8] = -1,
87                 [0xe010/8 ... 0xe017/8] = 0, /* OXPCIe952 serial1 */
88                 [0xe018/8 ... 0xffff/8] = -1,
89         },
90
91         // .pci_devices = {
92         //      {
93         //              .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
94         //              .domain = 0x0,
95         //              .bdf = (0x0f<<3),
96         //              .bar_mask = {
97         //                      0xffffff00, 0xffffffff, 0x00000000,
98         //                      0x00000000, 0xffffffe0, 0xffffffff,
99         //              },
100         //              .shmem_region = 3,
101         //              .num_msix_vectors = 1,
102         //      },
103         // },
104 };