From: Andreas Messerschmid <[email protected]> Add an inmate configuration file for running Linux as an inmate on the Microsys Miriac LS1046a SBC.
Signed-off-by: Andreas Messerschmid <[email protected]> Reviewed-by: Benedikt Spranger <[email protected]> --- configs/arm64/miriac-sbc-ls1046a-linux-demo.c | 137 ++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 configs/arm64/miriac-sbc-ls1046a-linux-demo.c diff --git a/configs/arm64/miriac-sbc-ls1046a-linux-demo.c b/configs/arm64/miriac-sbc-ls1046a-linux-demo.c new file mode 100644 index 00000000..007ede79 --- /dev/null +++ b/configs/arm64/miriac-sbc-ls1046a-linux-demo.c @@ -0,0 +1,137 @@ +/* + * Jailhouse, a Linux-based partitioning hypervisor + * + * Configuration for Microsys miriac SBC-LS1046A board + * 2 CPUs, ~1G RAM, serial console, intercell-comm + * + * Copyright (c) Linutronix GmbH, 2019 + * + * Authors: + * Andreas Messerschmid <[email protected]> + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * + */ + +#include <jailhouse/types.h> +#include <jailhouse/cell-config.h> + +#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0]) + +struct { + struct jailhouse_cell_desc cell; + __u64 cpus[1]; + struct jailhouse_memory mem_regions[5]; + struct jailhouse_irqchip irqchips[2]; + struct jailhouse_pci_device pci_devices[1]; +} __attribute__((packed)) config = { + .cell = { + .signature = JAILHOUSE_CELL_DESC_SIGNATURE, + .revision = JAILHOUSE_CONFIG_REVISION, + .name = "linux-demo", + .flags = JAILHOUSE_CELL_PASSIVE_COMMREG | + JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED, + + .cpu_set_size = sizeof(config.cpus), + .num_memory_regions = ARRAY_SIZE(config.mem_regions), + .num_irqchips = ARRAY_SIZE(config.irqchips), + .num_pci_devices = ARRAY_SIZE(config.pci_devices), + + .vpci_irq_base = 106-32, + + .console = { + .address = 0x21c0500, + .type = JAILHOUSE_CON_TYPE_8250, + .flags = JAILHOUSE_CON_ACCESS_MMIO | + JAILHOUSE_CON_REGDIST_1, + }, + }, + + .cpus = { + 0xc, + }, + + .mem_regions = { + /* DUART1 */ + { + .phys_start = 0x21c0000, + .virt_start = 0x21c0000, + .size = 0x1000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO | JAILHOUSE_MEM_ROOTSHARED, + }, + /* RAM */ + { + .phys_start = 0xc0500000, + .virt_start = 0, + .size = 0x10000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE, + }, + /* RAM */ + { + .phys_start = 0xc0510000, + .virt_start = 0xc0510000, + .size = 0x3faf0000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA | + JAILHOUSE_MEM_LOADABLE, + }, + /* communication region */ { + .virt_start = 0x80000000, + .size = 0x00001000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_COMM_REGION, + }, + /* IVSHMEM shared memory region */ { + .phys_start = 0xc0400000, + .virt_start = 0xc0400000, + .size = 0x100000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_ROOTSHARED, + }, + }, + + .irqchips = { + /* GIC */ + { + .address = 0x1410000, + .pin_base = 32, + .pin_bitmap = { + (1 << (54 - 32)), + (1 << (86 - 64)), + (1 << (106 - 96)) | (1 << (107 - 96)) | + (1 << (108 - 96)) | (1 << (109 - 96)), + 0, + }, + }, + /* GIC */ + { + .address = 0x1410000, + .pin_base = 160, + .pin_bitmap = { + 0, + 0, + 0, + 0, + }, + }, + }, + + .pci_devices = + { + /* 00:00.0 */ + { + .type = JAILHOUSE_PCI_TYPE_IVSHMEM, + .bdf = 0 << 3, + .bar_mask = + { + 0xffffff00, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, + }, + .shmem_region = 4, + .shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH, + }, + }, +}; -- 2.11.0 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
