[PATCH 2/5] configs: add config files for Jetson TX1

26 views
Skip to first unread message

Ralf Ramsauer

unread,
Nov 30, 2016, 6:31:53 AM11/30/16
to jailho...@googlegroups.com, Claudio Scordino, Bruno Morelli, Ralf Ramsauer
From: Claudio Scordino <cla...@evidence.eu.com>

This patch adds the config file for Jetson TX1.

Signed-off-by: Claudio Scordino <cla...@evidence.eu.com>
Signed-off-by: Bruno Morelli <b.mo...@evidence.eu.com>
[ralf: remove trailing newline in jetson-tx1.c, amend commit message,
align debug_console, add config file revision]
Signed-off-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
---
configs/jetson-tx1.c | 465 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 465 insertions(+)
create mode 100644 configs/jetson-tx1.c

diff --git a/configs/jetson-tx1.c b/configs/jetson-tx1.c
new file mode 100644
index 000000000000..cf80aa4786a4
--- /dev/null
+++ b/configs/jetson-tx1.c
@@ -0,0 +1,465 @@
+/*
+ * Jailhouse Jetson TX1 support
+ *
+ * Copyright (C) 2016 Evidence Srl
+ *
+ * Authors:
+ * Claudio Scordino <cla...@evidence.eu.com>
+ * Bruno Morelli <b.mo...@evidence.eu.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ *
+ * NOTE: Add "mem=1920M vmalloc=512M" to the kernel command line.
+ */
+
+#include <jailhouse/types.h>
+#include <jailhouse/cell-config.h>
+
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+
+struct {
+ struct jailhouse_system header;
+ __u64 cpus[1];
+ struct jailhouse_memory mem_regions[55];
+ struct jailhouse_irqchip irqchips[2];
+} __attribute__((packed)) config = {
+ .header = {
+ .signature = JAILHOUSE_SYSTEM_SIGNATURE,
+ .revision = JAILHOUSE_CONFIG_REVISION,
+ .hypervisor_memory = {
+ .phys_start = 0xfc000000,
+ .size = 0x4000000,
+ },
+ .debug_console = {
+ .address = 0x70006000,
+ .size = 0x0040,
+ .flags = JAILHOUSE_CON_TYPE_8250 |
+ JAILHOUSE_CON_FLAG_MMIO,
+ },
+ .platform_info.arm = {
+ .gicd_base = 0x50041000,
+ .gicc_base = 0x50042000,
+ .gich_base = 0x50044000,
+ .gicv_base = 0x50046000,
+ .maintenance_irq = 25,
+ },
+ .root_cell = {
+ .name = "Jetson-TX1",
+ .cpu_set_size = sizeof(config.cpus),
+ .num_memory_regions = ARRAY_SIZE(config.mem_regions),
+ .num_irqchips = ARRAY_SIZE(config.irqchips),
+ },
+ },
+
+ .cpus = {
+ 0xf,
+ },
+
+
+ .mem_regions = {
+
+ /* PCIE */ {
+ .phys_start = 0x01000000,
+ .virt_start = 0x01000000,
+ .size = 0x3F000000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* Data memory */ {
+ .phys_start = 0x040000000,
+ .virt_start = 0x040000000,
+ .size = 0x1000000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* host1x */ {
+ .phys_start = 0x50000000,
+ .virt_start = 0x50000000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* host1x/vi */ {
+ .phys_start = 0x54080000,
+ .virt_start = 0x54080000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* TSEC2 */ {
+ .phys_start = 0x54100000,
+ .virt_start = 0x54100000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* Display 2 */ {
+ .phys_start = 0x54240000,
+ .virt_start = 0x54240000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* VIC */ {
+ .phys_start = 0x54340000,
+ .virt_start = 0x54340000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* NVJPG */ {
+ .phys_start = 0x54380000,
+ .virt_start = 0x54380000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* NVDEC */ {
+ .phys_start = 0x54480000,
+ .virt_start = 0x54480000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* NVENC */ {
+ .phys_start = 0x544c0000,
+ .virt_start = 0x544c0000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* TSEC */ {
+ .phys_start = 0x54500000,
+ .virt_start = 0x54500000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* SOR1 */ {
+ .phys_start = 0x54580000,
+ .virt_start = 0x54580000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* ISP */ {
+ .phys_start = 0x54600000,
+ .virt_start = 0x54600000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* ISPB */ {
+ .phys_start = 0x54680000,
+ .virt_start = 0x54680000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* VII2C (I2C) */ {
+ .phys_start = 0x546c0000,
+ .virt_start = 0x546c0000,
+ .size = 0x40000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* GPU */ {
+ .phys_start = 0x57000000,
+ .virt_start = 0x57000000,
+ .size = 0x9000000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* Semaphores */ {
+ .phys_start = 0x60000000,
+ .virt_start = 0x60000000,
+ .size = 0x4000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* Legacy Interrupt Controller (ICTRL) */ {
+ .phys_start = 0x60004000,
+ .virt_start = 0x60004000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* TMR */ {
+ .phys_start = 0x60005000,
+ .virt_start = 0x60005000,
+ .size = 0x01000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* Clock and Reset */ {
+ .phys_start = 0x60006000,
+ .virt_start = 0x60006000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* Flow Controller */ {
+ .phys_start = 0x60007000,
+ .virt_start = 0x60007000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* System registers, secure boot, activity monitor */ {
+ .phys_start = 0x6000c000,
+ .virt_start = 0x6000c000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* GPIOs + exception vectors */ {
+ .phys_start = 0x6000d000,
+ .virt_start = 0x6000d000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* MISC stuff (see datasheet) */ {
+ .phys_start = 0x70000000,
+ .virt_start = 0x70000000,
+ .size = 0x4000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* UARTs */ {
+ .phys_start = 0x70006000,
+ .virt_start = 0x70006000,
+ .size = 0x600,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* PWM Controller */ {
+ .phys_start = 0x7000a000,
+ .virt_start = 0x7000a000,
+ .size = 0x100,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* I2C + SPI*/ {
+ .phys_start = 0x7000c000,
+ .virt_start = 0x7000c000,
+ .size = 0x2000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* RTC + PMC + FUSE + KFUSE */ {
+ .phys_start = 0x7000e000,
+ .virt_start = 0x7000e000,
+ .size = 0x2000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* MC */ {
+ .phys_start = 0x70019000,
+ .virt_start = 0x70019000,
+ .size = 0x7000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* HDA */ {
+ .phys_start = 0x70030000,
+ .virt_start = 0x70030000,
+ .size = 0x10000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* XUSB */ {
+ .phys_start = 0x70090000,
+ .virt_start = 0x70090000,
+ .size = 0x10000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* SDMMCs */ {
+ .phys_start = 0x700b0000,
+ .virt_start = 0x700b0000,
+ .size = 0x5000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* SOC_THERM */ {
+ .phys_start = 0x700e2000,
+ .virt_start = 0x700e2000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* MIPI_CAL */ {
+ .phys_start = 0x700e3000,
+ .virt_start = 0x700e3000,
+ .size = 0x100,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* DVFS */ {
+ .phys_start = 0x70110000,
+ .virt_start = 0x70110000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* ADMAIF */ {
+ .phys_start = 0x702d0000,
+ .virt_start = 0x702d0000,
+ .size = 0x800,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* AXBAR */ {
+ .phys_start = 0x702d0800,
+ .virt_start = 0x702d0800,
+ .size = 0x800,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* I2S */ {
+ .phys_start = 0x702d1000,
+ .virt_start = 0x702d1000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* SFC */ {
+ .phys_start = 0x702d2000,
+ .virt_start = 0x702d2000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* AMX */ {
+ .phys_start = 0x702d3000,
+ .virt_start = 0x702d3000,
+ .size = 0x800,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* ADX */ {
+ .phys_start = 0x702d3800,
+ .virt_start = 0x702d3800,
+ .size = 0x800,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* DMIC */ {
+ .phys_start = 0x702d4000,
+ .virt_start = 0x702d4000,
+ .size = 0x4000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* SPDIF */ {
+ .phys_start = 0x702d6000,
+ .virt_start = 0x702d6000,
+ .size = 0x200,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* AFC */ {
+ .phys_start = 0x702d7000,
+ .virt_start = 0x702d7000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* OPE1 */ {
+ .phys_start = 0x702d8000,
+ .virt_start = 0x702d8000,
+ .size = 0x400,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* OPE2 */ {
+ .phys_start = 0x702d8400,
+ .virt_start = 0x702d8400,
+ .size = 0x400,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* MVC */ {
+ .phys_start = 0x702da000,
+ .virt_start = 0x702da000,
+ .size = 0xc00,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* MIXER */ {
+ .phys_start = 0x702dbb00,
+ .virt_start = 0x702dbb00,
+ .size = 0x800,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* ADMA */ {
+ .phys_start = 0x702e2000,
+ .virt_start = 0x702e2000,
+ .size = 0x2000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* AMISC */ {
+ .phys_start = 0x702ec000,
+ .virt_start = 0x702ec000,
+ .size = 0x2000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* ABRIDGE */ {
+ .phys_start = 0x702ee000,
+ .virt_start = 0x702ee000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* AAS */ {
+ .phys_start = 0x702ef000,
+ .virt_start = 0x702ef000,
+ .size = 0x1000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* USB */ {
+ .phys_start = 0x7d000000,
+ .virt_start = 0x7d000000,
+ .size = 0x4000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_IO,
+ },
+ /* 87: System RAM */ {
+ .phys_start = 0x80000000,
+ .virt_start = 0x80000000,
+ .size = 0x7c000000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_EXECUTE,
+ },
+ /* 88: persistent_ram */ {
+ .phys_start = 0xff000000,
+ .virt_start = 0xff000000,
+ .size = 0x2400000,
+ .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
+ JAILHOUSE_MEM_EXECUTE,
+ },
+
+ },
+ .irqchips = {
+ /* GIC */ {
+ .address = 0x50041000,
+ .pin_base = 32,
+ .pin_bitmap = {
+ 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
+ },
+ },
+ /* GIC */ {
+ .address = 0x50041000,
+ .pin_base = 160,
+ .pin_bitmap = {
+ 0xffffffff, 0xffffffff
+ },
+ },
+ },
+};
--
2.11.0.rc2

Ralf Ramsauer

unread,
Nov 30, 2016, 6:31:53 AM11/30/16
to jailho...@googlegroups.com, Claudio Scordino, Bruno Morelli, Ralf Ramsauer
From: Claudio Scordino <cla...@evidence.eu.com>

Signed-off-by: Claudio Scordino <cla...@evidence.eu.com>
Signed-off-by: Bruno Morelli <b.mo...@evidence.eu.com>
Signed-off-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
---
README.md | 1 +
1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index d07bf61e764b..6a90546e517b 100644
--- a/README.md
+++ b/README.md
@@ -120,6 +120,7 @@ Hardware requirements (preliminary)

- LeMaker HiKey

+ - NVIDIA Jetson TX1

Software requirements
---------------------
--
2.11.0.rc2

Ralf Ramsauer

unread,
Nov 30, 2016, 6:31:53 AM11/30/16
to jailho...@googlegroups.com, Claudio Scordino, Ralf Ramsauer
From: Claudio Scordino <cla...@evidence.eu.com>

This patch adds the inmate support for the Tegra TX1 board.

Signed-off-by: Claudio Scordino <cla...@evidence.eu.com>
[ralf: rename uart.h to console.h and align console.h]
Signed-off-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
---
inmates/lib/arm64/Makefile.lib | 1 +
inmates/lib/arm64/include/mach-tegra-tx1/mach/console.h | 15 +++++++++++++++
inmates/lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h | 14 ++++++++++++++
inmates/lib/arm64/include/mach-tegra-tx1/mach/timer.h | 13 +++++++++++++
4 files changed, 43 insertions(+)
create mode 100644 inmates/lib/arm64/include/mach-tegra-tx1/mach/console.h
create mode 100644 inmates/lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h
create mode 100644 inmates/lib/arm64/include/mach-tegra-tx1/mach/timer.h

diff --git a/inmates/lib/arm64/Makefile.lib b/inmates/lib/arm64/Makefile.lib
index 45cdfa225f55..0e6f06719400 100644
--- a/inmates/lib/arm64/Makefile.lib
+++ b/inmates/lib/arm64/Makefile.lib
@@ -29,6 +29,7 @@ endef
mach-$(CONFIG_MACH_FOUNDATION_V8) := foundation-v8
mach-$(CONFIG_MACH_AMD_SEATTLE) := amd-seattle
mach-$(CONFIG_MACH_HI6220) := hi6220
+mach-$(CONFIG_MACH_TEGRA_TX1) := tegra-tx1

MACHINE := mach-$(mach-y)
KBUILD_CFLAGS += -I$(INMATES_LIB)/include/$(MACHINE)
diff --git a/inmates/lib/arm64/include/mach-tegra-tx1/mach/console.h b/inmates/lib/arm64/include/mach-tegra-tx1/mach/console.h
new file mode 100644
index 000000000000..79ef329ca81c
--- /dev/null
+++ b/inmates/lib/arm64/include/mach-tegra-tx1/mach/console.h
@@ -0,0 +1,15 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (c) Siemens AG, 2015
+ *
+ * Authors:
+ * Jan Kiszka <jan.k...@siemens.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ */
+
+#define CON_TYPE "8250"
+
+#define CON_BASE 0x70006000
diff --git a/inmates/lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h b/inmates/lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h
new file mode 100644
index 000000000000..e51319443df6
--- /dev/null
+++ b/inmates/lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h
@@ -0,0 +1,14 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (c) Siemens AG, 2015
+ *
+ * Authors:
+ * Jan Kiszka <jan.k...@siemens.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ */
+
+#define GICD_BASE ((void *)0x50041000)
+#define GICC_BASE ((void *)0x50042000)
diff --git a/inmates/lib/arm64/include/mach-tegra-tx1/mach/timer.h b/inmates/lib/arm64/include/mach-tegra-tx1/mach/timer.h
new file mode 100644
index 000000000000..428162d81cc4
--- /dev/null
+++ b/inmates/lib/arm64/include/mach-tegra-tx1/mach/timer.h
@@ -0,0 +1,13 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (c) Siemens AG, 2015
+ *
+ * Authors:
+ * Jan Kiszka <jan.k...@siemens.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ */
+
+#define TIMER_IRQ 27
--
2.11.0.rc2

Ralf Ramsauer

unread,
Nov 30, 2016, 6:31:53 AM11/30/16
to jailho...@googlegroups.com, Claudio Scordino, Ralf Ramsauer
Hi,

this a rebase of Claudio's TX1 support patches on top of next. Successfully
tested on a TX1. Let's also increase the config file revision by now.

Ralf

Claudio Scordino (4):
inmates: add support for Tegra TX1
configs: add config files for Jetson TX1
configs: rename jetson-tk1-demo.c to jetson-demo.c
README: add Nvidia TX1 among the supported boards

Ralf Ramsauer (1):
core: Increment config file revision

README.md | 1 +
configs/{jetson-tk1-demo.c => jetson-demo.c} | 4 +-
configs/jetson-tx1.c | 465 +++++++++++++++++++++
hypervisor/include/jailhouse/cell-config.h | 2 +-
inmates/lib/arm64/Makefile.lib | 1 +
.../arm64/include/mach-tegra-tx1/mach/console.h | 15 +
.../lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h | 14 +
.../lib/arm64/include/mach-tegra-tx1/mach/timer.h | 13 +
8 files changed, 512 insertions(+), 3 deletions(-)
rename configs/{jetson-tk1-demo.c => jetson-demo.c} (92%)
create mode 100644 configs/jetson-tx1.c
create mode 100644 inmates/lib/arm64/include/mach-tegra-tx1/mach/console.h
create mode 100644 inmates/lib/arm64/include/mach-tegra-tx1/mach/gic_v2.h
create mode 100644 inmates/lib/arm64/include/mach-tegra-tx1/mach/timer.h

--
2.11.0.rc2

Ralf Ramsauer

unread,
Nov 30, 2016, 6:31:53 AM11/30/16
to jailho...@googlegroups.com, Claudio Scordino, Ralf Ramsauer
From: Claudio Scordino <cla...@evidence.eu.com>

This patch renames jetson-tk1-demo.c as jetson-demo.c since the demo can
work on both Jetson TK1 and TX1.

Signed-off-by: Claudio Scordino <cla...@evidence.eu.com>
[ralf: amend commit message]
Signed-off-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
---
configs/{jetson-tk1-demo.c => jetson-demo.c} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename configs/{jetson-tk1-demo.c => jetson-demo.c} (92%)

diff --git a/configs/jetson-tk1-demo.c b/configs/jetson-demo.c
similarity index 92%
rename from configs/jetson-tk1-demo.c
rename to configs/jetson-demo.c
index d39398f51606..c0298c5f3444 100644
--- a/configs/jetson-tk1-demo.c
+++ b/configs/jetson-demo.c
@@ -1,7 +1,7 @@
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Configuration for gic-demo or uart-demo inmate on Jetson TK1:
+ * Configuration for gic-demo or uart-demo inmate on Jetson TK1 and TX1:
* 1 CPU, 64K RAM, serial port 0
*
* Copyright (c) Siemens AG, 2015
@@ -26,7 +26,7 @@ struct {
.cell = {
.signature = JAILHOUSE_CELL_DESC_SIGNATURE,
.revision = JAILHOUSE_CONFIG_REVISION,
- .name = "jetson-tk1-demo",
+ .name = "jetson-demo",
.flags = JAILHOUSE_CELL_PASSIVE_COMMREG,

.cpu_set_size = sizeof(config.cpus),
--
2.11.0.rc2

Ralf Ramsauer

unread,
Nov 30, 2016, 6:31:54 AM11/30/16
to jailho...@googlegroups.com, Claudio Scordino, Ralf Ramsauer
We introduced the new struct jailhouse_debug_console that changes the
structure and semantics of config files.

Signed-off-by: Ralf Ramsauer <ralf.r...@oth-regensburg.de>
---
hypervisor/include/jailhouse/cell-config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hypervisor/include/jailhouse/cell-config.h b/hypervisor/include/jailhouse/cell-config.h
index e839b272707e..fcc33879a31e 100644
--- a/hypervisor/include/jailhouse/cell-config.h
+++ b/hypervisor/include/jailhouse/cell-config.h
@@ -40,7 +40,7 @@
#define _JAILHOUSE_CELL_CONFIG_H

/* Incremented on any layout or semantic change of system or cell config. */
-#define JAILHOUSE_CONFIG_REVISION 1
+#define JAILHOUSE_CONFIG_REVISION 2

#define JAILHOUSE_CELL_NAME_MAXLEN 31

--
2.11.0.rc2

Jan Kiszka

unread,
Nov 30, 2016, 7:20:19 AM11/30/16
to Ralf Ramsauer, jailho...@googlegroups.com, Claudio Scordino
Right, forgot this. I'll put this right after the last change to the
config format in the current next queue.

Jan

--
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

Jan Kiszka

unread,
Nov 30, 2016, 7:21:36 AM11/30/16
to Ralf Ramsauer, jailho...@googlegroups.com, Claudio Scordino
On 2016-11-30 12:31, Ralf Ramsauer wrote:
Without doing the diff myself: why do we need a separate mach and cannot
generalize the one for the TK1?

Ralf Ramsauer

unread,
Nov 30, 2016, 7:26:41 AM11/30/16
to Jan Kiszka, jailho...@googlegroups.com, Claudio Scordino
Hi Jan,
In deed, the only difference is the base address of the UART console.
(0x70006000 vs. 0x70006300).

For proper default settings we would at least need some #ifdefs and move
common code to arm-common.

Ralf
>
> Jan
>

Jan Kiszka

unread,
Nov 30, 2016, 9:07:47 AM11/30/16
to Ralf Ramsauer, jailho...@googlegroups.com, Claudio Scordino
Does that mean that we would use a different physical connector on the
TX1 for the inmate output, or is there a different wiring?

>
> For proper default settings we would at least need some #ifdefs and move
> common code to arm-common.

Probably, things would scale better if we consolidated the few #defines
of the inmates in a few (or even a single) header files and use #ifdef
to dispatch.

Ralf Ramsauer

unread,
Nov 30, 2016, 9:58:43 AM11/30/16
to Jan Kiszka, jailho...@googlegroups.com, Claudio Scordino
On the TK1, 0x70006300 is available through the DB9 pin header. TX1
doesn't have a SUB-D connector, it only has an expansion header where
UART is available. This expansion header uses 0x70006000.
>
>>
>> For proper default settings we would at least need some #ifdefs and move
>> common code to arm-common.
>
> Probably, things would scale better if we consolidated the few #defines
> of the inmates in a few (or even a single) header files and use #ifdef
> to dispatch.
You mean consolidating _all_ mach/*.h to a single header?

Hmm, why not. It's not that much mach-specific stuff inside those headers...

Ralf
>
> Jan
>

Jan Kiszka

unread,
Nov 30, 2016, 10:02:55 AM11/30/16
to Ralf Ramsauer, jailho...@googlegroups.com, Claudio Scordino
Would it make a major difference to use the UART behind 0x70006300 also
on the TX1? Or is there none? I mean, if it's only about connecting some
loose wires to different pins...

>>
>>>
>>> For proper default settings we would at least need some #ifdefs and move
>>> common code to arm-common.
>>
>> Probably, things would scale better if we consolidated the few #defines
>> of the inmates in a few (or even a single) header files and use #ifdef
>> to dispatch.
> You mean consolidating _all_ mach/*.h to a single header?
>
> Hmm, why not. It's not that much mach-specific stuff inside those headers...

Exactly, that's my point.

Ralf Ramsauer

unread,
Nov 30, 2016, 10:31:03 AM11/30/16
to Jan Kiszka, jailho...@googlegroups.com, Claudio Scordino
There is UART0 (0x70006000) exposed to the expansion header J21.
Claudio's patches currently use this one. Surprisingly, this one is
called the "debug uart", besides the fact that there is another header
which is called "J17 - UART". (find picture attached)

According to "Jetson TX1 Developer Kit Carrier Board Specification" it's
3.3V compliant.

The problem is, that only the 'debug uart' UART0 is enabled in mainline
device tree of the TX1. Without powering up its clocks (what we
currently don't support on ARM64) or patching the device tree to enable
it, we won't be able to use it. I didn't even test that connector so far...

And even then, UART1 is probably connected to 0x70006040, if it follows
the same scheme as tegra124 SoCs.

To answer your question: No, I don't see 0x70006300, the debug UART we
use on TK1, be exposed to any header of the TX1.

Ralf
tx1-uart.jpg

Ralf Ramsauer

unread,
Nov 30, 2016, 10:41:03 AM11/30/16
to Jan Kiszka, jailho...@googlegroups.com, Claudio Scordino
One addition:

UART2 as well as UART0 are available on J10, but that's a 2x30, 0.5mm
pitch connector...

And in deed, UART3, which is probably available through 0x70006300, is
exposed to the camera connector, (again 2x60, 0.5mm pitch, but there's
already the camera mounted on top of it).

So for the moment and without the need to modify the kernel, the best is
to use 0x70006000 on the TX1, as everyone will have it available.

Ralf

Jan Kiszka

unread,
Nov 30, 2016, 10:49:34 AM11/30/16
to Ralf Ramsauer, jailho...@googlegroups.com, Claudio Scordino
In that case, pick the most suitable UART for the TX1 and use a separate
mach for it.

Jan Kiszka

unread,
Dec 2, 2016, 3:28:00 AM12/2/16
to Ralf Ramsauer, jailho...@googlegroups.com, Claudio Scordino
Done, right after "core: always built-in all available debug output
drivers". I didn't merge the other 4 patches yet, rather waiting for an
update.

Jan Kiszka

unread,
Dec 2, 2016, 5:17:48 AM12/2/16
to Ralf Ramsauer, jailho...@googlegroups.com, Claudio Scordino
Had to tweak this: Increasing the revision also means checking and
updating tools/jailhouse-cell-linux. In this case, the changes had no
other impact on the latter.

Ralf Ramsauer

unread,
Dec 2, 2016, 5:22:47 AM12/2/16
to Jan Kiszka, Ralf Ramsauer, jailho...@googlegroups.com, Claudio Scordino
Ah, right, it's hardcoded in the python code, sorry forgot that...

Would be so nice if we were able to parse those C structures in python
without duplicating their definition and the need to always keep them in
sync...

Ralf
>
> Jan
>
Reply all
Reply to author
Forward
0 new messages