This patch splits the jetson-demo config into two different config files
because TK1 and TX1 put the inmate at different addresses.

Signed-off-by: Claudio Scordino <[email protected]>
Signed-off-by: Errico Guidieri <[email protected]>
---
 configs/{jetson-demo.c => jetson-tk1-demo.c} |  2 +-
 configs/jetson-tx1-demo.c                    | 56 ++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 1 deletion(-)
 rename configs/{jetson-demo.c => jetson-tk1-demo.c} (94%)
 create mode 100644 configs/jetson-tx1-demo.c

diff --git a/configs/jetson-demo.c b/configs/jetson-tk1-demo.c
similarity index 94%
rename from configs/jetson-demo.c
rename to configs/jetson-tk1-demo.c
index 35d92ea..378ed08 100644
--- a/configs/jetson-demo.c
+++ b/configs/jetson-tk1-demo.c
@@ -1,7 +1,7 @@
 /*
  * Jailhouse, a Linux-based partitioning hypervisor
  *
- * Configuration for gic-demo or uart-demo inmate on Jetson TK1 and TX1:
+ * Configuration for gic-demo or uart-demo inmate on Jetson TK1:
  * 1 CPU, 64K RAM, serial port 0
  *
  * Copyright (c) Siemens AG, 2015
diff --git a/configs/jetson-tx1-demo.c b/configs/jetson-tx1-demo.c
new file mode 100644
index 0000000..0c46b64
--- /dev/null
+++ b/configs/jetson-tx1-demo.c
@@ -0,0 +1,56 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Configuration for gic-demo or uart-demo inmate on Jetson TX1:
+ * 1 CPU, 64K RAM, serial port 0
+ *
+ * Copyright (c) Siemens AG, 2015
+ *
+ * Authors:
+ *  Jan Kiszka <[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[2];
+} __attribute__((packed)) config = {
+       .cell = {
+               .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
+               .revision = JAILHOUSE_CONFIG_REVISION,
+               .name = "jetson-demo",
+               .flags = JAILHOUSE_CELL_PASSIVE_COMMREG,
+
+               .cpu_set_size = sizeof(config.cpus),
+               .num_memory_regions = ARRAY_SIZE(config.mem_regions),
+       },
+
+       .cpus = {
+               0x8,
+       },
+
+       .mem_regions = {
+               /* UART */ {
+                       .phys_start = 0x70006000,
+                       .virt_start = 0x70006000,
+                       .size = 0x1000,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_IO,
+               },
+               /* RAM */ {
+                       .phys_start = 0x17bfe0000,
+                       .virt_start = 0,
+                       .size = 0x00010000,
+                       .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+                               JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE,
+               },
+       },
+};
-- 
2.7.4

-- 
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