From: Lokesh Vutla <[email protected]>

Add an inmate configuration file for running Linux as an inmate
on AM654 evm.

Signed-off-by: Lokesh Vutla <[email protected]>
---
 configs/arm64/k3-am654-linux-demo.c | 132 ++++++++++++++++++++++++++++
 1 file changed, 132 insertions(+)
 create mode 100644 configs/arm64/k3-am654-linux-demo.c

diff --git a/configs/arm64/k3-am654-linux-demo.c 
b/configs/arm64/k3-am654-linux-demo.c
new file mode 100644
index 00000000..46a2a4ae
--- /dev/null
+++ b/configs/arm64/k3-am654-linux-demo.c
@@ -0,0 +1,132 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Configuration for Linux inmate on AM654 based platforms
+ * 2 CPUs, 512MB RAM, 1 serial port(MCU UART)
+ *
+ * Copyright (c) 2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Authors:
+ *  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>
+
+#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
+
+#ifndef CONFIG_INMATE_BASE
+#define CONFIG_INMATE_BASE 0x0000000
+#endif
+
+struct {
+       struct jailhouse_cell_desc cell;
+       __u64 cpus[1];
+       struct jailhouse_memory mem_regions[9];
+       struct jailhouse_irqchip irqchips[3];
+} __attribute__((packed)) config = {
+       .cell = {
+               .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
+               .revision = JAILHOUSE_CONFIG_REVISION,
+               .name = "linux-inmate-demo",
+               .flags = JAILHOUSE_CELL_PASSIVE_COMMREG,
+
+               .cpu_set_size = sizeof(config.cpus),
+               .num_memory_regions = ARRAY_SIZE(config.mem_regions),
+               .num_irqchips = ARRAY_SIZE(config.irqchips),
+               .pio_bitmap_size = 0,
+               .num_pci_devices = 0,
+               .cpu_reset_address = 0x0,
+
+               .console = {
+                       .address = 0x40a00000,
+                       .divider = 0x35,
+                       .type = JAILHOUSE_CON_TYPE_8250,
+                       .flags = JAILHOUSE_CON_ACCESS_MMIO |
+                                JAILHOUSE_CON_REGDIST_4,
+               },
+       },
+
+       .cpus = {
+               0xc,
+       },
+
+       .mem_regions = {
+               /* MCU UART0 */ {
+                       .phys_start = 0x40a00000,
+                       .virt_start = 0x40a00000,
+                       .size = 0x10000,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_IO,
+               },
+               /* main sproxy target_data host_id=A53_3 */ {
+                       .phys_start = 0x3240f000,
+                       .virt_start = 0x3240f000,
+                       .size = 0x05000,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_IO,
+               },
+               /* main sproxy rt host_id=A53_3 */ {
+                       .phys_start = 0x3280f000,
+                       .virt_start = 0x3280f000,
+                       .size = 0x05000,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_IO,
+               },
+               /* main sproxy scfg host_id=A53_3 */ {
+                       .phys_start = 0x32c0f000,
+                       .virt_start = 0x32c0f000,
+                       .size = 0x05000,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_IO,
+               },
+               /* RAM load */ {
+                       .phys_start = 0x8FFFF0000,
+                       .virt_start = 0x0,
+                       .size = 0x10000,        /* 64KB */
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
+                               JAILHOUSE_MEM_LOADABLE,
+               },
+               /* RAM load */ {
+                       .phys_start = 0x8E0000000,
+                       .virt_start = 0x8e0000000,
+                       .size = 0x1fff0000,     /* (512MB - 64KB) */
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
+                               JAILHOUSE_MEM_LOADABLE,
+               },
+               /* IVSHMEM shared memory region for 00:00.0 */ {
+                       .phys_start = 0x8dfb00000,
+                       .virt_start = 0x8dfb00000,
+                       .size = 0x100000,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
+               },
+               /* communication region */ {
+                       .virt_start = 0x80000000,
+                       .size = 0x00001000,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_COMM_REGION,
+               },
+       },
+
+       .irqchips = {
+               {
+                       .address = 0x01800000,
+                       .pin_base = 32,
+                       .pin_bitmap = {
+                       0x0, 0x80, 0x00, 0,
+                       },
+               },
+               {
+                       .address = 0x01800000,
+                       .pin_base = 544,
+                       .pin_bitmap = {
+                       0, 0x200000, 0, 0,
+                       },
+               },
+       }
+};
-- 
2.21.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.

Reply via email to