]> rtime.felk.cvut.cz Git - jailhouse.git/blobdiff - configs/apic-demo.c
configs: update configs to achieve the compatibility with the new JH version
[jailhouse.git] / configs / apic-demo.c
index 5df4ccfd5648e7b2c12cc9a9e9e08240d63b837b..8402b5deb08b0a5c3c3c3065343a80f643c7d7ec 100644 (file)
 #include <linux/types.h>
 #include <jailhouse/cell-config.h>
 
-#define ALIGN __attribute__((aligned(1)))
 #define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
 
 struct {
-       struct jailhouse_cell_desc ALIGN cell;
-       __u64 ALIGN cpus[1];
-       struct jailhouse_memory ALIGN mem_regions[1];
-       __u8 ALIGN pio_bitmap[0x2000];
-} ALIGN config = {
+       struct jailhouse_cell_desc cell;
+       __u64 cpus[1];
+       struct jailhouse_memory mem_regions[2];
+       struct jailhouse_cache cache_regions[1];
+       __u8 pio_bitmap[0x2000];
+} __attribute__((packed)) config = {
        .cell = {
-               .name = "APIC Demo",
+               .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
+               .name = "apic-demo",
 
                .cpu_set_size = sizeof(config.cpus),
                .num_memory_regions = ARRAY_SIZE(config.mem_regions),
-               .num_irq_lines = 0,
+               .num_cache_regions = ARRAY_SIZE(config.cache_regions),
+               .num_irqchips = 0,
                .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap),
                .num_pci_devices = 0,
        },
@@ -40,25 +42,33 @@ struct {
 
        .mem_regions = {
                /* RAM */ {
-                       .phys_start = 0x3bf00000,
+                       .phys_start = 0x3f000000,
                        .virt_start = 0,
                        .size = 0x00100000,
-                       .access_flags = JAILHOUSE_MEM_READ |
-                               JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_EXECUTE,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE,
+               },
+               /* communication region */ {
+                       .virt_start = 0x00100000,
+                       .size = 0x00001000,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_COMM_REGION,
+               },
+       },
+
+       .cache_regions = {
+               {
+                       .start = 0,
+                       .size = 2,
+                       .type = JAILHOUSE_CACHE_L3,
                },
        },
 
        .pio_bitmap = {
                [     0/8 ...  0x3f7/8] = -1,
                [ 0x3f8/8 ...  0x3ff/8] = 0, /* serial1 */
-               [ 0x400/8 ...  0x407/8] = -1,
-               [ 0x408/8 ...  0x40f/8] = 0xf0, /* PM-timer H700 */
-               [ 0x410/8 ... 0x1807/8] = -1,
-               [0x1808/8 ... 0x180f/8] = 0xf0, /* PM-timer H87I-PLUS */
-               [0x1810/8 ... 0xb007/8] = -1,
-               [0xb008/8 ... 0xb00f/8] = 0xf0, /* PM-timer QEMU */
-               [0xb010/8 ... 0xe00f/8] = -1,
-               [0xe010/8 ... 0xe017/8] = 0, /* OXPCIe952 serial1 */
+               [ 0x400/8 ... 0xe00f/8] = -1,
+               [0xe010/8 ... 0xe017/8] = -1, /* OXPCIe952 serial1 */
                [0xe018/8 ... 0xffff/8] = -1,
        },
 };