summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGovindraj Raja <govindraj.raja@arm.com>2023-10-24 14:50:23 -0500
committerGovindraj Raja <govindraj.raja@arm.com>2023-10-27 08:31:55 -0500
commit08ec77c7fe8b444f464ecba3655deaf272490f83 (patch)
treeebe508c832640f02bf1c40d11c54494b11066aa7
parentf08460dc085283f25fd6b5df792f263ccdf22421 (diff)
refactor(arm): use gpt_partition_init
Current interface partition_init accepts GPT image id and parses the GPT image but doesn't return any error on failure. So use gpt_partition_init which implicitly initialises with GPT image ID and returns a value. Change-Id: I63280aa672388f1f8d9dc377ae13002c9f861f03 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
-rw-r--r--plat/arm/common/arm_bl2_setup.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/plat/arm/common/arm_bl2_setup.c b/plat/arm/common/arm_bl2_setup.c
index b142b6241..6f3d0e944 100644
--- a/plat/arm/common/arm_bl2_setup.c
+++ b/plat/arm/common/arm_bl2_setup.c
@@ -69,6 +69,8 @@ CASSERT(BL2_BASE >= ARM_FW_CONFIG_LIMIT, assert_bl2_base_overflows);
void arm_bl2_early_platform_setup(uintptr_t fw_config,
struct meminfo *mem_layout)
{
+ int __maybe_unused ret;
+
/* Initialize the console to provide early debug support */
arm_console_boot_init();
@@ -82,9 +84,13 @@ void arm_bl2_early_platform_setup(uintptr_t fw_config,
/* Load partition table */
#if ARM_GPT_SUPPORT
- partition_init(GPT_IMAGE_ID);
-#endif /* ARM_GPT_SUPPORT */
+ ret = gpt_partition_init();
+ if (ret != 0) {
+ ERROR("GPT partition initialisation failed!\n");
+ panic();
+ }
+#endif /* ARM_GPT_SUPPORT */
}
void bl2_early_platform_setup2(u_register_t arg0, u_register_t arg1, u_register_t arg2, u_register_t arg3)