Other Parts Discussed in Thread: SYSCONFIG, AM625, OMAP-L137, AM62D-Q1
Tool/software:
Hello,
We are trying to reproduce the jailhouse demo as outlined in the AM62P processor SDK documentation here:
However, we cannot use UART1 as that is dedicated to another resource on our hardware, we need to use UART2. We applied the patch to the ti-jailhouse git repository used in the yocto recipes shown below.
We have been able to run the LINUX inmate demonstration programs (ping, ivshmem-demo) successfully and get the proper data on the inmate console port on UART2.
However, the BARE-METAL demo programs don't work (uart-demo.bin and gic-demo.bin). We don't get any output on the UART2 port / console.
Is it possible that additional code must be written to bring UART2 out of a reset condition or configure the clocks, etc., in the bare metal code? In our main linux DTS, we have forced the UART2 pin-mux pins to always be applied while keeping the device marked as "reserved".
I can't see anything else to modify in the ti-jailhouse,git repository to make the baremetal examples run with UART2.
iff --git a/configs/arm64/dts/inmate-k3-am62p5-sk.dts b/configs/arm64/dts/inmate-k3-am62p5-sk.dts index 047f9621..70787aab 100644 --- a/configs/arm64/dts/inmate-k3-am62p5-sk.dts +++ b/configs/arm64/dts/inmate-k3-am62p5-sk.dts @@ -10,7 +10,7 @@ #size-cells = <2>; aliases { - serial1 = &main_uart1; + serial1 = &main_uart2; }; chosen { @@ -87,11 +87,11 @@ interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; }; - main_uart1: serial@2810000 { + main_uart2: serial@2820000 { compatible = "ti,am64-uart", "ti,am654-uart"; - reg = <0x00 0x02810000 0x00 0x100>; - interrupts = <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>; - power-domains = <&k3_pds 152 1>; + reg = <0x00 0x02820000 0x00 0x100>; + interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>; + power-domains = <&k3_pds 153 0>; current-speed = <115200>; clock-frequency = <48000000>; }; diff --git a/configs/arm64/k3-am62p5-sk-inmate-demo.c b/configs/arm64/k3-am62p5-sk-inmate-demo.c index 0190aa3c..3014ff84 100644 --- a/configs/arm64/k3-am62p5-sk-inmate-demo.c +++ b/configs/arm64/k3-am62p5-sk-inmate-demo.c @@ -37,7 +37,7 @@ struct { .num_pci_devices = 0, .console = { - .address = 0x02810000, + .address = 0x02820000, .divider = 0x1b, .type = JAILHOUSE_CON_TYPE_8250, .flags = JAILHOUSE_CON_ACCESS_MMIO | @@ -50,9 +50,9 @@ struct { }, .mem_regions = { - /* MAIN UART1 */ { - .phys_start = 0x02810000, - .virt_start = 0x02810000, + /* MAIN UART2 */ { + .phys_start = 0x02820000, + .virt_start = 0x02820000, .size = 0x10000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, diff --git a/configs/arm64/k3-am62p5-sk-linux-demo.c b/configs/arm64/k3-am62p5-sk-linux-demo.c index b9c07342..aa37f983 100644 --- a/configs/arm64/k3-am62p5-sk-linux-demo.c +++ b/configs/arm64/k3-am62p5-sk-linux-demo.c @@ -2,7 +2,7 @@ * Jailhouse, a Linux-based partitioning hypervisor * * Configuration for Linux inmate on AM62P5 based platforms - * 3 CPUs, 512MB RAM, 1 serial port (MAIN UART1) + * 3 CPUs, 512MB RAM, 1 serial port (MAIN UART2) * * Copyright (c) 2023 Texas Instruments Incorporated - http://www.ti.com/ * @@ -43,7 +43,7 @@ struct { .vpci_irq_base = 189 - 32, .console = { - .address = 0x02810000, + .address = 0x02820000, .divider = 0x1b, .type = JAILHOUSE_CON_TYPE_8250, .flags = JAILHOUSE_CON_ACCESS_MMIO | @@ -107,9 +107,9 @@ struct { JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA | JAILHOUSE_MEM_LOADABLE, }, - /* MAIN UART1 */ { - .phys_start = 0x02810000, - .virt_start = 0x02810000, + /* MAIN UART2 */ { + .phys_start = 0x02820000, + .virt_start = 0x02820000, .size = 0x10000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO, @@ -185,8 +185,8 @@ struct { /* vpci */ 1 << (189 - 160) | 1 << (190 - 160), - /* uart */ - 1 << (211 - 192), + /* uart 2 */ + 1 << (212 - 192), 0, 0, }, },
Also, in the yocto recipe, it would be useful to provide an option to use a compressed image of the cpio file for the initrd file. We were about to use ....cpio.xz for our initrd which allowed the use of a larger initrd file / ramfs.
Thanks,
Mike