Add GIC and UART demo cell configs for j721e-evm board. This can be used to run the standard jaiilhouse baremetal inmate demos like gic-demo and uart-demo.
Signed-off-by: Nikhil Devshatwar <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> --- configs/arm64/k3-j721e-evm-gic-demo.c | 72 ++++++++++++++++++++++++++ configs/arm64/k3-j721e-evm-uart-demo.c | 72 ++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 configs/arm64/k3-j721e-evm-gic-demo.c create mode 100644 configs/arm64/k3-j721e-evm-uart-demo.c diff --git a/configs/arm64/k3-j721e-evm-gic-demo.c b/configs/arm64/k3-j721e-evm-gic-demo.c new file mode 100644 index 00000000..f92cd880 --- /dev/null +++ b/configs/arm64/k3-j721e-evm-gic-demo.c @@ -0,0 +1,72 @@ +/* + * Jailhouse, a Linux-based partitioning hypervisor + * + * Configuration for gic-demo inmate on K3 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[3]; +} __attribute__((packed)) config = { + .cell = { + .signature = JAILHOUSE_CELL_DESC_SIGNATURE, + .revision = JAILHOUSE_CONFIG_REVISION, + .name = "gic-demo", + .flags = JAILHOUSE_CELL_PASSIVE_COMMREG, + + .cpu_set_size = sizeof(config.cpus), + .num_memory_regions = ARRAY_SIZE(config.mem_regions), + .num_irqchips = 0, + .pio_bitmap_size = 0, + .num_pci_devices = 0, + + .console = { + .address = 0x02810000, + .divider = 0x1b, + .type = JAILHOUSE_CON_TYPE_8250, + .flags = JAILHOUSE_CON_ACCESS_MMIO | + JAILHOUSE_CON_REGDIST_4, + }, + }, + + .cpus = { + 0x2, + }, + + .mem_regions = { + /* UART 3 */ { + .phys_start = 0x02810000, + .virt_start = 0x02810000, + .size = 0x10000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /* RAM */ { + .phys_start = 0xd0000000, + .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, + }, + } +}; diff --git a/configs/arm64/k3-j721e-evm-uart-demo.c b/configs/arm64/k3-j721e-evm-uart-demo.c new file mode 100644 index 00000000..ea0cba42 --- /dev/null +++ b/configs/arm64/k3-j721e-evm-uart-demo.c @@ -0,0 +1,72 @@ +/* + * Jailhouse, a Linux-based partitioning hypervisor + * + * Configuration for uart-demo inmate on K3 based platforms: + * 1 CPU, 64K RAM, serial port 3 + * + * 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[3]; +} __attribute__((packed)) config = { + .cell = { + .signature = JAILHOUSE_CELL_DESC_SIGNATURE, + .revision = JAILHOUSE_CONFIG_REVISION, + .name = "uart-demo", + .flags = JAILHOUSE_CELL_PASSIVE_COMMREG, + + .cpu_set_size = sizeof(config.cpus), + .num_memory_regions = ARRAY_SIZE(config.mem_regions), + .num_irqchips = 0, + .pio_bitmap_size = 0, + .num_pci_devices = 0, + + .console = { + .address = 0x02810000, + .divider = 0x1b, + .type = JAILHOUSE_CON_TYPE_8250, + .flags = JAILHOUSE_CON_ACCESS_MMIO | + JAILHOUSE_CON_REGDIST_4, + }, + }, + + .cpus = { + 0x2, + }, + + .mem_regions = { + /* UART 3 */ { + .phys_start = 0x02810000, + .virt_start = 0x02810000, + .size = 0x10000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /* RAM */ { + .phys_start = 0xd0000000, + .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, + }, + } +}; -- 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/20190523211623.9718-3-nikhil.nd%40ti.com. For more options, visit https://groups.google.com/d/optout.
