Add inmate demo cell config for j7200-evm board. This can be used to run the standard jaiilhouse baremetal inmate demos like gic-demo, uart-demo and ivshmem-demo.
Signed-off-by: Nikhil Devshatwar <[email protected]> --- configs/arm64/k3-j7200-evm-inmate-demo.c | 128 +++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 configs/arm64/k3-j7200-evm-inmate-demo.c diff --git a/configs/arm64/k3-j7200-evm-inmate-demo.c b/configs/arm64/k3-j7200-evm-inmate-demo.c new file mode 100644 index 00000000..c916b439 --- /dev/null +++ b/configs/arm64/k3-j7200-evm-inmate-demo.c @@ -0,0 +1,128 @@ +/* + * Jailhouse, a Linux-based partitioning hypervisor + * + * Configuration for demo inmate on K3 J7200 based platforms. + * 1CPU, 64K RAM, 1 serial port. + * + * Copyright (c) 2019 Texas Instruments Incorporated - http://www.ti.com/ + * + * Authors: + * Nikhil Devshatwar <[email protected]> + * Lokesh Vutla <[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> + +struct { + struct jailhouse_cell_desc cell; + __u64 cpus[1]; + struct jailhouse_memory mem_regions[7]; + struct jailhouse_irqchip irqchips[1]; + struct jailhouse_pci_device pci_devices[1]; +} __attribute__((packed)) config = { + .cell = { + .signature = JAILHOUSE_CELL_DESC_SIGNATURE, + .revision = JAILHOUSE_CONFIG_REVISION, + .name = "k3-j7200 inmate-demo", + .flags = JAILHOUSE_CELL_PASSIVE_COMMREG, + + .cpu_set_size = sizeof(config.cpus), + .num_memory_regions = ARRAY_SIZE(config.mem_regions), + .num_irqchips = 1, + .num_pci_devices = 1, + .vpci_irq_base = 195 - 32, + + .console = { + .address = 0x02810000, + .divider = 0x1b, + .type = JAILHOUSE_CON_TYPE_8250, + .flags = JAILHOUSE_CON_ACCESS_MMIO | + JAILHOUSE_CON_MDR_QUIRK | + JAILHOUSE_CON_REGDIST_4, + }, + }, + + .cpus = { + 0x2, + }, + + .mem_regions = { + /* IVSHMEM shared memory regions for 00:00.0 (demo) */ + { + .phys_start = 0x89fe00000, + .virt_start = 0x89fe00000, + .size = 0x10000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED, + }, + { + .phys_start = 0x89fe10000, + .virt_start = 0x89fe10000, + .size = 0x10000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED | + JAILHOUSE_MEM_WRITE, + }, + { + .phys_start = 0x89fe20000, + .virt_start = 0x89fe20000, + .size = 0x10000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED, + }, + { + .phys_start = 0x89fe30000, + .virt_start = 0x89fe30000, + .size = 0x10000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED | + JAILHOUSE_MEM_WRITE, + }, + /* main_uart1 */ { + .phys_start = 0x02810000, + .virt_start = 0x02810000, + .size = 0x10000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /* RAM */ { + .phys_start = 0x89ff40000, + .virt_start = 0, + .size = 0x00010000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE, + }, + /* communication region */ { + .virt_start = 0x80000000, + .size = 0x00001000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_COMM_REGION, + }, + }, + + .irqchips = { + { + .address = 0x01800000, + .pin_base = 160, + /* + * virtual PCI SPI_163 => idx 1 bit [3] + */ + .pin_bitmap = { + 0x00000000, 0x00000008, 0x00000000, 0x00000000, + }, + }, + }, + + .pci_devices = { + /* 00:00.0 (demo) */ { + .type = JAILHOUSE_PCI_TYPE_IVSHMEM, + .domain = 4, + .bdf = 0 << 3, + .bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_INTX_64K, + .shmem_regions_start = 0, + .shmem_dev_id = 1, + .shmem_peers = 2, + .shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED, + }, + }, +}; -- 2.17.1 -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20201020074525.7941-3-nikhil.nd%40ti.com.
