Tool/software: TI-RTOS
Hi,
I'm developing over IDK am5728 with PROCESSOR-SDK-LINUX-AM57X version v05.00 and PROCESSOR-SDK-RTOS-AM57X version v05.00.
I'm using the jailhouse hypervisor and I'm able to run linux on core 0 and on core 1 the jailhouse inmate demo
processor_sdk_rtos_am57xx_5_00_00_15/demos/jailhouse-inmate/rtos/icss_emac
# modprobe jailhouse
# jailhouse enable /home/root/jail/am57xx-evm.cell
# jailhouse cell create /usr/share/jailhouse/examples/am572x-rtos-icss.cell
# jailhouse cell load 1 /usr/share/jailhouse/examples/linux-loader.bin -a 0 -s "kernel=0x80000000" -a 0x100 /home/root/jail/icss_emac.bin -a 0x80000000
# jailhouse cell start 1
When starting the cell I get outputs over UART.
I can connect over JTAG and see that the memory browser and disassembly show exactly what is expected
according to objdumbing icss_emac.out.
Now I'm trying to build my own RTOS inmate using PROCESSOR-SDK-RTOS-AM57X version v05.00.
Since I was able to run successfully the icss_emac jailhouse demo I took
pdk_am57xx_1_0_11/packages/MyExampleProjects/ICSS_EMAC_BasicExample_idkAM572x_wSoCLib_armTestproject
as a starting point. Before making any changes, when I ran this project using JTAG it was working fine and I got its output over UART.
Now I'm trying to port it into a jailhouse inmate.
So I followed
processors.wiki.ti.com/.../Processor_SDK_Jailhouse_Hypervisor
From what I gather there are 3 main differences between the jailhouse inmate and the original sys/bios project:
compilation flag __JAILHOUSE_INMATE
board init function
cfg file
I tried all kinds of variations like taking the cfg and board_init files from demos/jailhouse-inmate/rtos/icss_emac/src and add to
ICSS_EMAC_BasicExample_idkAM572x_wSoCLib_armTestproject.
I added the compilation flag __JAILHOUSE_INMATE
but so far I wasn't able to create a .bin file that I could start up as an inmate on core 1.
I created an inmate cell with:
# modprobe jailhouse
# jailhouse enable /home/root/jail/am57xx-evm.cell
# jailhouse cell create /usr/share/jailhouse/examples/am572x-rtos-icss.cell
Copied the app product from ICSS_EMAC_BasicExample_idkAM572x_wSoCLib_armTestproject and loaded it.
By objdumping the .out I found that the entry point is 0x80001000
# jailhouse cell load 1 /usr/share/jailhouse/examples/linux-loader.bin -a 0 -s "kernel=0x80001000" -a 0x100 /home/root/jail/app -a 0x80000000
# jailhouse cell start 1
At this point I get no output over UART.
The disassembly of .out (attached) looks like
Disassembly of section .c_int00:
80001000 <_c_int00>:
80001000: e10f0000 mrs r0, CPSR
80001004: e380c0c0 orr ip, r0, #192 ; 0xc0
....
....
Disassembly of section .text:
80001590 <UART_socGetInitCfg>:
80001590: e16d41f0 strd r4, [sp, #-16]!
80001594: e58d6008 str r6, [sp, #8]
80001598: e58de00c str lr, [sp, #12]
....
....
When using JTAG to inspect the memory it seems like the file was loaded to 0x80000048
And the text section starts from 0x800001Ec (see attached picture)
What can I do to start up this project as a jailhouse inmate?
Any assist would be great.
Thanks a lot,
Nir.