AnsweredAssumed Answered

uboot-spl don't load and run kernel

Question asked by 魏伟 魏 on Jul 22, 2019

I want to reduce boot time in imx8m mini evk, so use spl to load and run kernel (bypass uboot).now I check the kernel an fdt in ddr use accumulative checksum.  they(the checksum) are the same with the image that before use uboot load kernel and fdt.In other words, spl has load the kernel and fdt into ddr successfully.then i execute the following code:

cleanup_before_linux();

armv8_switch_to_el2((u64)0x43000000, 0, 0, 0, 0x40480000, ES_TO_AARCH64);

but failure to succeed.why? I have some questions:

1    I find the spl is run in EL3, but the uboot is run in EL2, I don't find where from el3 to el2?

2    I add reset cpu function code(to test  whether kernel is running ) in the Kernel startup entry point, but it is not reset cpu successfully.In other words,  armv8_switch_to_el2 is not jump to kernel to run code successfully. why?

Outcomes