Hi,
I need some help to understand the boot behavior of i.MX8M Plus when booting from eMMC. I am evaluation the i.MX8M Plus and using the 8MPLUSLPD4-EVK default configured and default fusemap.
I am elaboration with the boot partitions on the eMMC. When I have different imx-boot images flashed to boot0 and boot1, then I can select which partition the ROM will use for boot. I use "mmc partconf 2 0 1(or 2) 0" from u-boot to set the BOOT_PARTITIONS_ENABLE bits in the eMMC PARTITION_CONFIG[179] register. Since I have a different boot image on boot0 compared to boot1 I can verify that this works.
What confuses me is that when I only have one valid imx-boot image flashed, either in boot0 or in boot1, then setting the BOOT_PARTITIONS_ENABLE bits does not seems to have any effect. The ROM seems to use the boot partition with the valid imx-boot regardless of the bits in BOOT_PARTITIONS_ENABLE, i.e. the board boots even if the empty boot partition is selected for boot. This behavior only seem to be valid over the boot0 and boot1 partitions. If I instead configure the user data partition for boot then I end up in serial download as I also was expecting when an empty boot partition was selected.
Is this an expected behavior? I have not been able to find any information regarding this in the reference manual. Also how can I find out which of the boot partition is currently in use if I not can trust the BOOT_PARTITIONS_ENABLE bits?
Best regards
Per Örbäck
After some further investigation I have noticed that querying the ROM API, from SPL or u-boot, with QUERY_BT_STAGE i.e. g_rom_api->query_boot_infor(QUERY_BT_STAGE, &boot_stage, ((uintptr_t)&boot_stage) ^ QUERY_BT_STAGE); gives different results for the different boot cases.
Cases:
BOOT_PARTITIONS_ENABLE set to boot0 and valid boot image in boot0 -> boot_stage = 0x00000006
BOOT_PARTITIONS_ENABLE set to boot1 and valid boot image in boot1 -> boot_stage = 0x00000006
BOOT_PARTITIONS_ENABLE set to boot0 and valid boot image in boot1 -> boot_stage = 0x00000009
BOOT_PARTITIONS_ENABLE set to boot1 and valid boot image in boot0 -> boot_stage = 0x00000009
So for me it seems that the boot_stage value of 0x9 gives some information about that the boot ROM has shifted the boot partition compared to the configured one in the eMMC. Is there any documentation which can confirm this? Or other documentation that defines the ROM API for i.MX8M Plus? I have not been able to find any.
Best Regards
Per Örbäck
Hello,
Yes it is an expected behavior, on i.MX8MP, the emmc secondary boot feature is enabled. When BOOT_PARTITION_ENABLE=0x1, ROM first search image on boot partition 1, If it can't find image on boot partition 1, it will search on boot partition 2; When BOOT_PARTITION_ENABLE=0x2, ROM first search image on boot partition 2, If it can't find image on boot partition 2, it will search on boot partition 1.
Best regards,
Aldo.
Hi @AldoG ,
this should be documented somewhere: there is nothing about that on the i.MX8MP reference manual, for example.
Are there other chips from the i.MX family that support this feature?
Thanks, regards