0

How can I load two kernel images in the RAM of my board (i.MX 53 QSB) using U-Boot ? (The first image will run in the secure world of the Trustzone and the second one in the normal world.)

I read in a thesis that we can use this method : Using an image that should have the following three parts at the minimum: The first kernel image, the second ATAGS blob and the second kernel image any idea of how to achieve it or is there is any other method to do that ?

EngineerN
  • 133
  • 2
  • 11
  • @artlessnoise sorry I was working on another project. And after loading the two kernels, and after booting the first one; I have to give **the adress on which I loaded the second kernel** to the monitor system ? (a monitor system that I tested and it works perfectly with a bare-metal program) – EngineerN Jun 23 '15 at 09:33
  • @artlessnoise Ok, that's what I did, let me explain more in details : I load my secure image with 'tftp 0x97800000 secure.img' after that I load my normal image which is a linux kernel 2.6.35 which doesn't need a device tree 'tftp 0x70008000 kernel.imx' after that I boot my secure image with 'go 0x97800000' In my secure world I do the initialisation of the monitor mode with : 'init_monitor_mode(normal_world_begin)' with the function normal_world_begin does a : 'ldr pc, =0x70008000' . I can't see why my linux in the normal world doesn't boot. – EngineerN Jun 24 '15 at 08:54
  • Have you given the CSU permission to the normal world that Linux will use, like the UART, etc. Install fault handlers in the secure world/monitor and trap on external aborts to see where the normal world Linux dies. – artless noise Jun 24 '15 at 13:51
  • @artlessnoise Yes, as I said before, when I use a bare-metal program as normal world, the print is happening correctly. I installed default handlers in the monitor system, the operation happens perfectly, it stucks in 'ldr pc, =0x70008000' Do I have to change some thing in the linux kernel or something like that ? – EngineerN Jun 25 '15 at 11:28
  • You must switch modes. You can not enter *normal world* with `ldr pc,=0x70008000` (which must be a physical address). Typically, it is `ldm sp_mon, {r0-r12,pc}^` or something like that. You need to switch modes with *NS* bit set to normal world. *sp_mon* is just for emphasis; look up the proper syntax. – artless noise Jun 25 '15 at 12:59
  • @artlessnoise The switch of the modes I do it before. After that, I use the `ldr pc, =0x70080000` to tell to the system where to find the Linux Kernel. As I said before, when I used a bare-metal program in the normal world, my monitor mode, the world switch and the running of the program in the 0x70008000 adress works proprely. The problem only appears when I replace it with the Linux Kernel. – EngineerN Jun 29 '15 at 08:08
  • @artlessnoise SOLVED !!! It works, just by using the `ldr pc, =0x70008000` Before that, I loaded the **Image** but **NOT** the **uImage** (which can be booted only using u-boot) in the RAM with `tftp 0x70008000 Image` – EngineerN Jul 09 '15 at 08:31

0 Answers0