diff options
author | Ye Li <ye.li@nxp.com> | 2018-11-21 22:17:08 -0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2018-11-22 17:36:36 -0800 |
commit | ad4ca1a49d2aa52b2653922ad6a82213a75fb5a0 (patch) | |
tree | e134df8a1dec2e9bb7bc9569faa1b85d1bff5be1 /common | |
parent | 53e60095df8e6be963dd9e6a89a2b59b7bfabab6 (diff) |
MLK-20442 imx8qm/qxp: Fix SPL crash when authentication is failed
When booting SPL from SD/MMC, the codes load and parse container image
first, if its authentication is failed, the flow continues to load and parse
for FIT image and cause crash in SPL.
The correct way should stop the booting if authentication is failed, avoid
trying the FIT image since FIT does not support AHAB on 8QM/QXP.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 7843ab1b619d53c24a11f7db10b277287dcd1b11)
Diffstat (limited to 'common')
-rw-r--r-- | common/spl/spl_mmc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 785bbd5338..ec56f11fdb 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -185,7 +185,7 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, err = part_get_info(mmc_get_blk_desc(mmc), type_part, &info); if (err) continue; - if (info.sys_ind == + if (info.sys_ind == CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE) { partition = type_part; break; @@ -400,13 +400,11 @@ int spl_mmc_load_image(struct spl_image_info *spl_image, #ifdef CONFIG_PARSE_CONTAINER err = mmc_load_image_parse_container(spl_image, mmc, spl_mmc_get_uboot_raw_sector(mmc)); - - if (!err) - return err; -#endif +#else err = mmc_load_image_raw_sector(spl_image, mmc, spl_mmc_get_uboot_raw_sector(mmc)); #endif +#endif if (!err) return err; #endif |