From da90359b7852e13dc21f54f4d42df6d4790fe0cd Mon Sep 17 00:00:00 2001 From: Manish Pandey Date: Tue, 26 Nov 2019 11:34:17 +0000 Subject: PIE: make call to GDT relocation fixup generalized When a Firmware is complied as Position Independent Executable it needs to request GDT fixup by passing size of the memory region to el3_entrypoint_common macro. The Global descriptor table fixup will be done early on during cold boot process of primary core. Currently only BL31 supports PIE, but in future when BL2_AT_EL3 will be compiled as PIE, it can simply pass fixup size to the common el3 entrypoint macro to fixup GDT. The reason for this patch was to overcome the bug introduced by SHA 330ead806 which called fixup routine for each core causing re-initializing of global pointers thus overwriting any changes done by the previous core. Change-Id: I55c792cc3ea9e7eef34c2e4653afd04572c4f055 Signed-off-by: Manish Pandey --- bl2/aarch64/bl2_el3_entrypoint.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bl2') diff --git a/bl2/aarch64/bl2_el3_entrypoint.S b/bl2/aarch64/bl2_el3_entrypoint.S index 6fe2dd923..f97121ef0 100644 --- a/bl2/aarch64/bl2_el3_entrypoint.S +++ b/bl2/aarch64/bl2_el3_entrypoint.S @@ -26,7 +26,8 @@ func bl2_entrypoint _secondary_cold_boot=!COLD_BOOT_SINGLE_CPU \ _init_memory=1 \ _init_c_runtime=1 \ - _exception_vectors=bl2_el3_exceptions + _exception_vectors=bl2_el3_exceptions \ + _pie_fixup_size=0 /* --------------------------------------------- * Restore parameters of boot rom -- cgit v1.2.3