diff options
author | faqiang.zhu <faqiang.zhu@nxp.com> | 2018-11-21 16:10:05 +0800 |
---|---|---|
committer | faqiang.zhu <faqiang.zhu@nxp.com> | 2018-11-21 19:47:17 +0800 |
commit | e26db8caf2c7ed554a3496df3b90f9efcb76cf5f (patch) | |
tree | 35ed31bb15599e7040de117513fc37b4c9f6db29 /arch | |
parent | 378fa741725e000cd1ea4d2ddd55b5042233d6b2 (diff) |
MA-13488 check rpmb keyblob after SPL load container
To enable SPL+CONTAINER format on android auto with tee, after SPL load
container, SPL need to check rpmb keyblob and copy it to secure memory
for latter use.
Change-Id: I40a791d5b5b1eba6a0170d6853626fb546be4b2c
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/imx8/parser.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8/parser.c b/arch/arm/mach-imx/imx8/parser.c index 7ddb1702bf..4cef7f0fb3 100644 --- a/arch/arm/mach-imx/imx8/parser.c +++ b/arch/arm/mach-imx/imx8/parser.c @@ -26,6 +26,11 @@ DECLARE_GLOBAL_DATA_PTR; +#if defined(CONFIG_IMX_TRUSTY_OS) +/* Pre-declaration of check_rpmb_blob. */ +int check_rpmb_blob(struct mmc *mmc); +#endif + static int current_dev_type = MMC_DEV; static int start_offset; static void *device; @@ -228,7 +233,14 @@ int mmc_load_image_parse_container(struct spl_image_info *spl_image, ret = read_auth_container(spl_image); + if (ret) + return ret; + + /* Images loaded, now check the rpmb keyblob for Trusty OS. */ +#if defined(CONFIG_IMX_TRUSTY_OS) + ret = check_rpmb_blob(mmc); return ret; +#endif } int spi_load_image_parse_container(struct spl_image_info *spl_image, |