Hi All,
I am trying to implement falcon boot mode on imx8mp evk, i came across few links regarding the falcon boot mode implementation, like README and some community posts. i made a patch for the yocto build but the boot freezes after spl. After spending some time on reading the documents i couldn't find the proper solution and the falcon boot only recognises the uImage, however imx8 aarch64 uses Image.gz. i couldn't find much of a info about this. Is there any link that can help me to add the falcon boot mode for the imx8mp evk?
any help on this topic will help.
Thanks,
Kris.
Hello All,
I am trying to enable Falcon Mode on imx8mp and I am encountering same issue. I added debug prints everywhere and it basically hangs when calling bl31_plat_runtime_setup() in method bl31_main (bl31/bl31_main.c).
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x40400000
INFO: SPSR = 0x3c9
Entry point address = 0x40400000
SPSR = 0x3c9
ARG0 0x43000000
ARG1 0x0
ARG2 0x0
ARG3 0x0
console flush
bl31 plat runtime setup
any chance to get Falcon Mode with RAW uImage working?
Thanks in advance!
Hello, I am also attempting to boot falcon mode for the imx8mp.
Following AN13709 the imx8mp_evk boots through bl31 and sets the entry point address to 0x40400000, and Argument 0 to 0x43000000.
It appears that bl31 does not load the uImage kernel properly and causes the processor to hang.
Any help would be appreciated.
I verified that the RAM is loaded with the correct uImage data.
I'm confident the locations in the SD card are correct and have adequate memory space.
The SPL code prints it has loaded uImage to the correct address that bl31 expects, and the flattened device tree to 0x43000000.
It's also worth noting that AN13709 is for the imx8mn, so the imx8mp required an update for ATF to be loaded to address 0x97000 instead of 0x96000.
Could someone help me understand how to jump from bl31 context to uImage at 0x40400000? (And also how this may differ between the imx8mn and imx8mp?
Yep, there's another thread where we got it working.
Basically, the memory variable needs passed into the kernel boot args.
https://community.nxp.com/t5/i-MX-Processors/iMX8M-Plus-Falcon-Boot-Support/m-p/1640610#M204881
u-boot=> edit mmcargs
edit: setenv bootargs ${jh_clk} ${mcore_clk} console=${console} root=${mmcroot} earlycon=ec_imx6q,0x30890000,115200 mem=6000MB
Thanks for the reply @evanwilliams .
Even after setting the ${mmcargs}, I am still stuck at ATF jump to bl33 (Linux kernel). I verified the memory 0x40480000 -> kernel loadaddr and 0x43000000 -> FDT args using md command. Memory is written correctly. I have also aligned ATF and uImage for this loadaddr.
* setting mem=6000MB, didn't help either.
Steps::
u-boot=> edit mmcargs
edit: setenv bootargs console=ttymxc0,115200 root=/dev/mmcblk1p1 rootwait rw cma=960M
u-boot=> run mmcargs; run loadfdt;
u-boot=> ext4load mmc 1:1 $loadaddr boot/uImage;mmc write $loadaddr 0x2FAF200 0xc000
u-boot=> spl export fdt $loadaddr - $fdt_addr_r
u-boot=> mmc write 0x43000000 0x2FAF080 0x80
SPL Log::
U-Boot SPL 2021.04-lf_v2021.04_var02+gfe9769c023 (Aug 14 2023 - 14:38:00 +0000)
>>SPL: board_init_r()
spl_init
SEC0: RNG instantiated
Normal Boot
Trying to boot from MMC1
spl: mmc boot mode: raw
hdr read sector 2faf200, count=1
SPL: payload image: Linux Kernel load addr: 0x4047ffc0 size: 17479752
read 855d sectors to 4047ffc0
SPL::mmc_load_legacy end
Jumping to Linux
SPL::before Image_entry
INFO: iMX8MP: Preparing to boot 64-bit Linux kernel
NOTICE: BL31: v2.4(release):devtool-patched-0-g646bcc384-dirty
NOTICE: BL31: Built : 10:10:04, Aug 14 2023
INFO: GICv3 with legacy support detected.
INFO: ARM GICv3 driver initialized in EL3
INFO: BL31: Initializing runtime services
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address :: = 0x40480000
INFO: SPSR = 0x3c9
Is there anyway to switch on all the debug log ir printout the registers values in ATF just before the jump?
Additionally, would it be possible to share your uboot and ATF patches for comparison.
Finally got the kernel logs
mmcargs needs earlycon=ec_imx6q,{uart}, 115200. inorder to see early boot logs.
I see that Kernel panics at MMU init. time to debug further.
thanks for yours inputs @evanwilliams .
Hi Kris
what uboot used in the case. One can try nxp uboot releases from source.codeaurora.org/external/imx/uboot-imx repository and follow documentation:
https://source.codeaurora.org/external/imx/uboot-imx/tree/doc/README.falcon?h=lf_v2021.04
Best regards
igor
I followed the README.falcon and also these links:
i made a patch to the u-boot-imx by following this: https://variwiki.com/index.php?title=Yocto_Customizing_U-Boot&release=RELEASE_HARDKNOTT_V1.2_DART-MX...
after the bitbake and sd card creation, the imx8 stops after the spl and doesn't print any messages
U-Boot SPL 2020.04-lf_v2020.04_var01+g7ffdddacd2 (Jun 06 2021 - 16:01:28 +0000)
Normal Boot
Trying to boot from BOOTROM
image offset 0x8000, pagesize 0x200, ivt offset 0x0
with out the patch of falcon mode, imx8 boot perfectly, so i guess the falcon mode changes are affecting the boot
attaching the patch file so that you can point out the mistakes in it.
Thanks,
Kris.