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 <manish.pandey2@arm.com>
1 parent b3257a3 commit da90359b7852e13dc21f54f4d42df6d4790fe0cd
@Manish Pandey Manish Pandey authored on 26 Nov 2019
Showing 4 changed files
View
bl1/aarch64/bl1_entrypoint.S
View
bl2/aarch64/bl2_el3_entrypoint.S
View
bl31/aarch64/bl31_entrypoint.S
View
include/arch/aarch64/el3_common_macros.S