Hi I've been doing some work getting Jailhouse working with the nouveau stack on the Jetson-TK1 (https://vimeo.com/190110057). As part of that, we had to do some modifications of the TK1 root cell C file.
All of it consists of mapping additional memory regions (incorporating a very useful patch here as well from Ralf Ramsauer for host1x mappings (https://groups.google.com/d/msg/jailhouse-dev/iHXR2BLWI9M/GZvjdSlBBgAJ) but by doing that we were able to demonstrate Jailhouse running with a freeRTOS non-root cell alongside kmscube running. We were using a 4.4 kernel build using mostly tegra_defconfig settings (the only modification was to enable PSCI and disable CPU idle support as documented elsewhere to allow kernels to build with CPUs in HYP mode). The builds use a slightly older jailhouse repo (commit a5d1415f3) as we were using CONFIG_ARM_GIC in our kernel builds and not CONFIG_ARM_GIC_V2. Hoping that this will be useful in some fashion! The complete build process for the interested can be found here: https://github.com/CodethinkLabs/jailhouse-tk1 Many thanks Chris ------- diff --git a/configs/jetson-tk1.c b/configs/jetson-tk1.c index 2f1737d..37fc46e 100644 --- a/configs/jetson-tk1.c +++ b/configs/jetson-tk1.c @@ -23,7 +23,7 @@ struct { struct jailhouse_system header; __u64 cpus[1]; - struct jailhouse_memory mem_regions[12]; + struct jailhouse_memory mem_regions[20]; struct jailhouse_irqchip irqchips[2]; } __attribute__((packed)) config = { .header = { @@ -65,6 +65,41 @@ struct { .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, }, + /*50000000-50033fff : /host1x@0,50000000*/ { + .phys_start = 0x50000000, + .virt_start = 0x50000000, + .size = 0x4000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /*54200000-5423ffff : /host1x@0,50000000/dc@0,54200000*/ { + .phys_start = 0x54200000, + .virt_start = 0x54200000, + .size = 0x4000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /*54240000-5427ffff : /host1x@0,50000000/dc@0,54240000*/ { + .phys_start = 0x54240000, + .virt_start = 0x54240000, + .size = 0x4000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /*54280000-542bffff : /host1x@0,50000000/hdmi@0,54280000 */ { + .phys_start = 0x54280000, + .virt_start = 0x54280000, + .size = 0x4000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /* HACK: GPU */ { + .phys_start = 0x57000000, + .virt_start = 0x57000000, + .size = 0x02000000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, /* HACK: Legacy Interrupt Controller */ { .phys_start = 0x60004000, .virt_start = 0x60004000, @@ -86,6 +121,20 @@ struct { .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, }, + /* HACK: CPU_DFLL clock */ { + .phys_start = 0x70110000, + .virt_start = 0x70110000, + .size = 0x00001000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, + /* I2C, including HDMI_DDC*/ { + .phys_start = 0x7000c000, + .virt_start = 0x7000c000, + .size = 0x00001000, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, /* I2C5/6, SPI */ { .phys_start = 0x7000d000, .virt_start = 0x7000d000, @@ -121,6 +170,13 @@ struct { .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, }, + /* HACK: apbmisc */ { + .phys_start = 0x70000800, + .virt_start = 0x70000800, + .size = 0x00000100, + .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | + JAILHOUSE_MEM_IO, + }, /* USB */ { .phys_start = 0x7d004000, .virt_start = 0x7d004000, -- 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.
