efi_loader: Handle GD_FLG_SKIP_RELOC
authorVaradarajan Narayanan <quic_varada@quicinc.com>
Wed, 26 Mar 2025 05:46:53 +0000 (11:16 +0530)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 11 Apr 2025 11:24:06 +0000 (13:24 +0200)
commit742aa8b0396dfeb39e60c88988b7db3d9694a09d
tree40fa29f112b5ee405e07b4a486e7c450a3779fb5
parent85403c46e681653ccc0a31755b51b13c8ac53714
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>
common/board_r.c