summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/libstub/arm64-stub.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2023-04-12 12:01:32 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2023-04-12 12:01:32 +0200
commit5603effb8295ada8419408d038a34ca89d658229 (patch)
treeb06d8e309631d507c7b030e943b8479e2d15250b /drivers/firmware/efi/libstub/arm64-stub.c
parentb89ce1177d42d5c124e83f3858818cd4e6a2c46f (diff)
parent09a9639e56c01c7a00d6c0ca63f4c7c41abe075d (diff)
Merge remote-tracking branch 'drm/drm-fixes' into drm-misc-fixesdrm-misc-fixes-2023-04-13
We were stuck on rc2, should at least attempt to track drm-fixes slightly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'drivers/firmware/efi/libstub/arm64-stub.c')
-rw-r--r--drivers/firmware/efi/libstub/arm64-stub.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/firmware/efi/libstub/arm64-stub.c b/drivers/firmware/efi/libstub/arm64-stub.c
index d4a6b12a8741..770b8ecb7398 100644
--- a/drivers/firmware/efi/libstub/arm64-stub.c
+++ b/drivers/firmware/efi/libstub/arm64-stub.c
@@ -85,8 +85,10 @@ efi_status_t handle_kernel_image(unsigned long *image_addr,
}
}
- if (image->image_base != _text)
+ if (image->image_base != _text) {
efi_err("FIRMWARE BUG: efi_loaded_image_t::image_base has bogus value\n");
+ image->image_base = _text;
+ }
if (!IS_ALIGNED((u64)_text, SEGMENT_ALIGN))
efi_err("FIRMWARE BUG: kernel image not aligned on %dk boundary\n",
@@ -139,6 +141,7 @@ efi_status_t handle_kernel_image(unsigned long *image_addr,
*image_addr = *reserve_addr;
memcpy((void *)*image_addr, _text, kernel_size);
caches_clean_inval_pou(*image_addr, *image_addr + kernel_codesize);
+ efi_remap_image(*image_addr, *reserve_size, kernel_codesize);
return EFI_SUCCESS;
}