<div dir="ltr"><div>Hi, I'm trying to boot Android in the Normal World of an i.MX53 QSB using U-boot in the Secure World as the bootloader.</div><div><br></div><div>I've adapted U-boot in order to switch to Normal World upon a SMC call.</div><div>The Android version I'm using is Adeneo BSP for Android Gingerbread v4.3.</div><div><br></div><div>Android boots fine when I disable the world switch in U-boot, but when I try to boot it in the Normal World it freezes in a Kernel Panic before running the Init.</div><div><br></div><div>I followed the patch made by Stefan Kalkowski (as suggested in <a href="https://community.freescale.com/thread/308152">https://community.freescale.com/thread/308152</a> ) because I was experiencing a similar problem (FAILED TO RELEASE IRAM PARTITION). Unlike Miao Yu in that post my execution didn't stop there.</div><div>I thought this would be enough to run Android in the Secure World (because this is what Stefan did) but apparently it didn't work.</div><div>The problem remains the same.</div><div><br></div><div>What happens is the kernel boots successfully and then the following flow occurs:</div><div><span class="" style="white-space:pre">        </span>(1) init_post() at kernel/init/main.c:826</div><div><span class="" style="white-space:pre">  </span>(2) run_init_process() at kernel/init/main.c:817</div><div><span class="" style="white-space:pre">   </span>(3) kernel_execve() at kernel/arch/arm/kernel/sys_arm.c:81</div><div><span class="" style="white-space:pre"> </span></div><div>Inside kernel_execve() when we return to user space by manipulating the kernel stack (asm code below) it lauches a Kernel Panic and init is never executed.</div><div><br></div><div>ASM CODE:</div><div><span class="" style="white-space:pre">        </span>asm(</div><div><span class="" style="white-space:pre">               </span>...</div><div><span class="" style="white-space:pre">        </span>"b <span class="" style="white-space:pre">  </span>ret_to_user"</div><div><span class="" style="white-space:pre">  </span>:</div><div><span class="" style="white-space:pre">  </span>: "r" (current_thread_info()),</div><div><span class="" style="white-space:pre">   </span>  "Ir" (THREAD_START_SP - sizeof(regs)),</div><div><span class="" style="white-space:pre">        </span>  "r" (&regs),</div><div><span class="" style="white-space:pre">      </span>  "Ir" (sizeof(regs))</div><div><span class="" style="white-space:pre">   </span>: "r0", "r1", "r2", "r3", "ip", "lr", "memory");</div><div><br></div><div>In addition we noticed that the execution jumps to do_undefinstr at kernel/arch/arm/kernel/entry-armv.S:689</div><div><span class="" style="white-space:pre">  </span>b do_undefinstr</div><div><br></div><div>Besides this we confirmed that init is never executed by adding a print to init's main function (src/system/core/init/init.c:713).</div><div><br></div><div>Thanks, Tiago Brito</div></div>