falcon boot mode for imx8mp

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

falcon boot mode for imx8mp

2,774件の閲覧回数
KrisJ
Contributor II

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.

 

0 件の賞賛
9 返答(返信)

1,839件の閲覧回数
evanwilliams
Contributor II

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?

1,419件の閲覧回数
harlin
Contributor II

Thanks for the update on ATF load address (0x970000). This saved me some debug time.

Do you any have any progress? I am also stuck in ATF. bl31 is not jumping to the uImage. Kernel is not booting. 

 

0 件の賞賛

1,408件の閲覧回数
evanwilliams
Contributor II

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

1,319件の閲覧回数
harlin
Contributor II

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.

0 件の賞賛

1,271件の閲覧回数
harlin
Contributor II

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 .

0 件の賞賛

2,715件の閲覧回数
KrisJ
Contributor II

Any one have suggestions on this topic?

Thanks,

Kris.

0 件の賞賛

2,753件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

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

https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/cpu/armv8/fsl-layerscape/doc/READ...

 

Best regards
igor

0 件の賞賛

2,701件の閲覧回数
KrisJ
Contributor II

Hi Igorpadykov

Can you suggest any Changes on this topic?

Thanks,

Kris.

タグ(1)
0 件の賞賛

2,739件の閲覧回数
KrisJ
Contributor II

I followed the README.falcon and also these links:

https://bootlin.com/pub/conferences/2021/lee/opdenacker-understanding-u-boot-falcon-mode/opdenacker-...

https://source.denx.de/u-boot/custodians/u-boot-imx/-/commit/d96796ca23b2ebcb7ce58c250e5a44152a652a4...

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.

タグ(1)
0 件の賞賛