Browse Source
The msm8916 platform port needs to disable the TCM redirect to the L2 cache as early as possible during cold boot to avoid crashes. Right now this is done in plat_reset_handler by checking if BL31 was started through the "boot remapper", which redirects memory accesses around the fixed CPU reset address (0x0) to the actual link address of BL31. On AArch64 this is always the case during cold boot, since a CPU reset was necessary to switch from AArch32 in the initial bootloader to AArch64. On AArch32, SP_MIN starts running at the real link address immediately, so the initial cold boot must be detected with a different approach. To keep the AArch32 and AArch64 implementation of this functionality consistent, move this functionality to plat_get_my_entrypoint, by checking if the msm8916_entry_point is still zero or was already updated for later warm boots by the PSCI code. Also, avoid entering BL31 twice and instead add the BL31_BASE offset to the return address in the link register. This allows preserving the bootloader arguments in x0-x3 because they otherwise get lost. Change-Id: I90286c6cacf23f44ed7930a3e7e33804ca63c391 Signed-off-by: Stephan Gerhold <stephan@gerhold.net>pull/1999/head
Stephan Gerhold
2 years ago
committed by
Manish Pandey
1 changed files with 28 additions and 29 deletions
Loading…
Reference in new issue