Hi Stefan, The skalk linux worked on the IMX53 qsb normal world, when we compiled it with the imx5_android_tz_defconfig config file. Earlier, we were trying with imx_v6_v7_defconfig config.
Thanks! Riju
Hi Stefan, We looked at the USB armory Linux: https://github.com/m-stein/linux/tree/genode_hw_usb_armory_tz_vmm, which has very clean interfaces to talk to the genode trustzone code, example the following files to do serial and block device operations using SMC hypercalls. (1) include/genode_tz_vmm_defs.h: SMC variables and arguments #defined (2) include/genode_tz_vmm.h: SMC function declarations (3) kernel/genode_tz_vmm.c: SMC function definitions (4) drivers/tty/serial/genode.c: calls SMC function to use UART via genode in secure world (5) drivers/block/genode.c: calls SMC function to use block device via genode in secure world
Can you please let us know is there is a similar linux source repo for IMX53 qsb, from which this binary was built: http://genode.org/files/images/imx53_qsb/linux_trustzone.bin? This linux binary works great, while the binary using https://github.com/skalk/linux/tree/imx53-tz crashes with an external data abort.
Thanks for your time.
Riju
Hello Stefan Thanks for your help. Linux is loading now but it shows i2c error and then dumps the same exception state as shown above `Data Abort`.
da9052_ssc_i2c 0-0048: 2 - da9052_i2c_read:master_xfer Failed!! da9052_i2c_is_connected - i2c read failed.....
Though the linux.bin which tz_vmm script tries to download, loads fine. It also shows above error but continues to load instead of crashing. I need the source code of whatever binary I am running. Can you help me with source code of the executable which is available here ` http://genode.org/files/images/imx53_qsb/linux_trustzone.bin%60.
Thanks Abhishek
On Thu, Jun 1, 2017 at 8:46 AM, Stefan Kalkowski < stefan.kalkowski@...1...> wrote:
Hi,
the tz_vmm component does not expect an uImage to be loaded, but the pure kernel binary instead. Within the Linux build tree for instance the path: "arch/arm/boot/compressed/vmlinux". I wonder, whether you got the very same exception state when not trying to execute on secure world RAM?
Regards Stefan
On 05/31/2017 04:39 PM, Abhishek Kumar wrote:
Hello Stefan Thanks for your reply. I tried at 80008000 address as well.
abhishek@...514...:~$ file linux linux: u-boot legacy uImage, Linux-2.6.35.3-01384-g9533414-di, Linux/ARM, OS Kernel Image (Not compressed), 2933872 bytes, Wed
May
31 15:52:08 2017, Load Address: 0x80008000, Entry Point:
0x80008000,
Header CRC: 0x83CD7B97, Data CRC: 0x914C7C24
I tried to print from `start` function in "os/src/server/tz_vmm/include/vm_base.h" file.
void start() { Genode::memset((void*)_state, 0, sizeof(Genode::Vm_state)); _load_kernel(); _load_kernel_surroundings(); _state->cpsr = 0x93; /* SVC mode and IRQs disabled */ _state->r0 = 0; _state->r1 = _mach_type; _state->r2 = _ram.base() + _board_info_offset(); }
_load_kernel() and other statements are working perfectly fine, I
tried
printing after each line using PINF. I think that means kernel is loading fine, though I'm not sure. What might be going wrong here?
Thanks Abhishek
On Wed, May 31, 2017 at 2:57 PM, Stefan Kalkowski <stefan.kalkowski@...1... mailto:stefan.kalkowski@...1...> wrote:
Hello, On 05/31/2017 02:25 PM, Abhishek Kumar wrote: > Hello > I am trying to run linux in normal world on genode trustzone. I
have
> changed the run-script of genode to copy the uImage generated
from
> skalk/linux's imx-53 branch instead of downloading (default). I
am
> making uImage with following command: > > make uImage LOADADDR=0x70010000 You are trying to relocate the Linux kernel within the memory
portion
that is used by the secure world (Genode). The secure RAM is from 0x70000000 to 0x7fffffff. Please follow these instructions to
build the
guest kernel on your own, like referenced within the tz_vmm
run-script:
https://genode.org/files/release-15.11/usb_armory_tz_vmm/README <https://genode.org/files/release-15.11/usb_armory_tz_vmm/README> Regards Stefan > > while executing, genode stops after starting virtual machine
with
> following error trace: > > ``` > . > . > [init] child "tz_vmm" > [init] RAM quota: 10203136 > [init] ELF binary: tz_vmm > [init] priority: 0 > [init -> tz_vmm] Start virtual machine ... > [init -> tz_vmm] Cpu state: > [init -> tz_vmm] Register Virt Phys > [init -> tz_vmm] --------------------------------- > [init -> tz_vmm] r0 = 07000000 [00000000] > [init -> tz_vmm] r1 = f801ff50 [00000000] > [init -> tz_vmm] r2 = ffffffe4 [00000000] > [init -> tz_vmm] r3 = 40002000 [00000000] > [init -> tz_vmm] r4 = 00000000 [00000000] > [init -> tz_vmm] r5 = 00000000 [00000000] > [init -> tz_vmm] r6 = 000000ee [00000000] > [init -> tz_vmm] r7 = 00000000 [00000000] > [init -> tz_vmm] r8 = 00000000 [00000000] > [init -> tz_vmm] r9 = 00000000 [00000000] > [init -> tz_vmm] r10 = 00000000 [00000000] > [init -> tz_vmm] r11 = 00000000 [00000000] > [init -> tz_vmm] r12 = 00000000 [00000000] > [init -> tz_vmm] sp = 00000000 [00000000] > [init -> tz_vmm] lr = 00000000 [00000000] > [init -> tz_vmm] ip = 0040dfe8 [00000000] > [init -> tz_vmm] cpsr = 60000093 > [init -> tz_vmm] sp_und = 00000000 [00000000] > [init -> tz_vmm] lr_und = 8000800c [00000000] > [init -> tz_vmm] spsr_und = 00000093 [00000000] > [init -> tz_vmm] sp_svc = f801ff4c [00000000] > [init -> tz_vmm] lr_svc = 0040bc97 [00000000] > [init -> tz_vmm] spsr_svc = 00000000 [00000000] > [init -> tz_vmm] sp_abt = 00000000 [00000000] > [init -> tz_vmm] lr_abt = 00000000 [00000000] > [init -> tz_vmm] spsr_abt = 00000000 [00000000] > [init -> tz_vmm] sp_irq = 00000000 [00000000] > [init -> tz_vmm] lr_irq = 00000000 [00000000] > [init -> tz_vmm] spsr_irq = 00000000 [00000000] > [init -> tz_vmm] sp_fiq = 00000000 [00000000] > [init -> tz_vmm] lr_fiq = 00000000 [00000000] > [init -> tz_vmm] spsr_fiq = 00000000 [00000000] > [init -> tz_vmm] ttbr0 = 00000000 > [init -> tz_vmm] ttbr1 = 00000000 > [init -> tz_vmm] ttbrc = 00000000 > [init -> tz_vmm] dfar = 07000000 [00000000] > [init -> tz_vmm] exception = data_abort > [init -> tz_vmm] Could not handle data-abort will exit! > > > ``` > > Initially I thought I might be giving wrong load address while
making
> uImage, but it seems problem is not that. Can someone help me
with
what > might be possibly going wrong? > > Thanks > Abhishek > > > ------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > _______________________________________________ > genode-main mailing list > genode-main@lists.sourceforge.net <mailto:genode-main@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/genode-main <https://lists.sourceforge.net/lists/listinfo/genode-main> > -- Stefan Kalkowski Genode Labs https://github.com/skalk · http://genode.org/ ------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net <mailto:genode-main@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/genode-main <https://lists.sourceforge.net/lists/listinfo/genode-main>
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
-- Stefan Kalkowski Genode Labs
https://github.com/skalk · http://genode.org/
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main