mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 09:54:35 +00:00
efi_loader: Handle GD_FLG_SKIP_RELOC
If the EFI runtime services pointers are relocated even though relocation is skipped, it corrupts some other data resulting in some unexpected behaviour. In this specific case, it overwrote some page table entries resulting in the device memory address range's mappings getting removed. Eventually, after the completion of efi_runtime_relocate(), when a driver tries to access its device's registers it crashes since the mappings are absent. Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
85403c46e6
commit
742aa8b039
1 changed files with 2 additions and 1 deletions
|
@ -169,7 +169,8 @@ static int initr_reloc_global_data(void)
|
|||
*/
|
||||
efi_save_gd();
|
||||
|
||||
efi_runtime_relocate(gd->relocaddr, NULL);
|
||||
if (!(gd->flags & GD_FLG_SKIP_RELOC))
|
||||
efi_runtime_relocate(gd->relocaddr, NULL);
|
||||
|
||||
#endif
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue