From 332c82e9689590304ca0e5243667902b70e2cdb7 Mon Sep 17 00:00:00 2001 From: Maxim Baryshnikov Date: Sun, 24 Apr 2016 14:31:49 +0200 Subject: [PATCH] Add PIC ports and IOAPIC chip to fiasco cell conf. --- configs/fiasco-demo.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/configs/fiasco-demo.c b/configs/fiasco-demo.c index 0d7657b..d2b951c 100755 --- a/configs/fiasco-demo.c +++ b/configs/fiasco-demo.c @@ -20,7 +20,8 @@ struct { struct jailhouse_cell_desc cell; __u64 cpus[1]; - struct jailhouse_memory mem_regions[1]; + struct jailhouse_memory mem_regions[1]; + struct jailhouse_irqchip irqchips[1]; __u8 pio_bitmap[0x2000]; struct jailhouse_pci_device pci_devices[0]; } __attribute__((packed)) config = { @@ -31,7 +32,7 @@ struct { .cpu_set_size = sizeof(config.cpus), .num_memory_regions = ARRAY_SIZE(config.mem_regions), - .num_irqchips = 0, + .num_irqchips = ARRAY_SIZE(config.irqchips), .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap), .num_pci_devices = ARRAY_SIZE(config.pci_devices), .num_pci_caps = 0, @@ -74,20 +75,35 @@ struct { // }, }, + .irqchips = { + // IOAPIC + { + .address = 0xfec00000, + .id = 0xff01, + .pin_bitmap = 0xffffffff, + }, + }, + .pio_bitmap = { - [ 0/8 ... 0x5f/8] = -1, + [ 0/8 ... 0x3f/8] = -1, + [ 0x20/8 ... 0x28/8] = 0xfc, /* PIC Master 0x20 0x21 */ + [ 0x29/8 ... 0x3f/8] = -1, + [ 0x40/8 ... 0x47/8] = 0xf0, /* PIT */ + [ 0x48/8 ... 0x5f/8] = -1, [ 0x60/8 ... 0x67/8] = 0, [ 0x68/8 ... 0x7f/8] = -1, [ 0x80/8 ... 0x88/8] = 0xfe, //delay - [ 0x89/8 ... 0x3f7/8] = -1, - + [ 0x89/8 ... 0x99/8] = -1, + [ 0xA0/8 ... 0xA8/8] = 0xfc, /* PIC Slave 0xA0 0xA1 */ + [ 0xA9/8 ... 0x3f7/8] = -1, [ 0x3f8/8 ... 0x3ff/8] = 0, /* serial1 */ [ 0x400/8 ... 0xe00f/8] = -1, [0xe010/8 ... 0xe017/8] = 0, /* OXPCIe952 serial1 */ [0xe018/8 ... 0xffff/8] = -1, }, + // .pci_devices = { // { // .type = JAILHOUSE_PCI_TYPE_IVSHMEM, -- 2.39.2