summaryrefslogtreecommitdiffstats
path: root/meta-agl-jailhouse/recipes-extended/jailhouse/files/agl-apic-demo.c
diff options
context:
space:
mode:
authorParth Dode <dodecoder@gmail.com>2020-08-28 20:10:18 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-08-31 13:54:27 +0000
commitf7b7ad44c4a77f86fa4e3adf1ae23c712f6121d4 (patch)
tree0bca0a905877d8d2fd9060e53a2e7c8704481b12 /meta-agl-jailhouse/recipes-extended/jailhouse/files/agl-apic-demo.c
parent7e79247a82a7a04c4915c086f54612cfe67f0b67 (diff)
meta-agl-jailhouse: Added inmates for jailhouse on agl
w.r.t. the root cell qemu-agl updated jailhouse_git.bb accordingly Bug-AGL: SPEC-3507 Change-Id: I0548d9bbec02d8506205b0dccb4ef591b290bca6 Change-Id: I6d065032ef7fff40535929219ce067aab260f043 Signed-off-by: Parth Dode <dodecoder@gmail.com>
Diffstat (limited to 'meta-agl-jailhouse/recipes-extended/jailhouse/files/agl-apic-demo.c')
-rw-r--r--meta-agl-jailhouse/recipes-extended/jailhouse/files/agl-apic-demo.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/meta-agl-jailhouse/recipes-extended/jailhouse/files/agl-apic-demo.c b/meta-agl-jailhouse/recipes-extended/jailhouse/files/agl-apic-demo.c
new file mode 100644
index 00000000..f49cd3a4
--- /dev/null
+++ b/meta-agl-jailhouse/recipes-extended/jailhouse/files/agl-apic-demo.c
@@ -0,0 +1,78 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Minimal configuration for demo inmates, 1 CPU, 1 MB RAM, 1 serial port
+ *
+ * Copyright (c) Siemens AG, 2013
+ *
+ * Authors:
+ * Jan Kiszka <jan.kiszka@siemens.com>
+ *
+ * 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[2];
+ struct jailhouse_cache cache_regions[1];
+ struct jailhouse_pio pio_regions[1];//[2]->[1] stop @0x3f8
+} __attribute__((packed)) config = {
+ .cell = {
+ .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
+ .revision = JAILHOUSE_CONFIG_REVISION,
+ .name = "agl-apic-demo",
+ .flags = JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED,
+
+ .cpu_set_size = sizeof(config.cpus),
+ .num_memory_regions = ARRAY_SIZE(config.mem_regions),
+ .num_cache_regions = ARRAY_SIZE(config.cache_regions),
+ .num_irqchips = 0,
+ .num_pio_regions = ARRAY_SIZE(config.pio_regions),
+ .num_pci_devices = 0,
+
+ .console = {
+ .type = JAILHOUSE_CON_TYPE_8250,
+ .flags = JAILHOUSE_CON_ACCESS_PIO,
+ .address = 0x2f8, /* ######## ttyS0 is host -> ttyS1 */
+ },
+ },
+
+ .cpus = {
+ 0x8,
+ },
+
+ .mem_regions = {
+ /* RAM */ { /* JH_memory: 0x22600000-0x271fffff */
+ .phys_start = 0x26e00000 , /* agl-linux-x86: 0x22600000-0x26e00000 */
+ .virt_start = 0, /* agl-ivshmem: 0x26e00000- (end of ivshmem cell) */
+ .size = 0x00100000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE,
+ },
+ /* communication region */ {
+ .virt_start = 0x00100000,
+ .size = 0x00001000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_COMM_REGION,
+ },
+ },
+
+ .cache_regions = {
+ {
+ .start = 0,
+ .size = 2,
+ .type = JAILHOUSE_CACHE_L3,
+ },
+ },
+
+ .pio_regions = {
+ PIO_RANGE(0x2f8, 8), /* serial 2 */
+// PIO_RANGE(0x3f8, 8), /* serial 1 */
+ PIO_RANGE(0xe010, 8), /* OXPCIe952 serial */
+ },
+};