summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/libstub/x86-stub.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-10-17 15:25:13 +0200
committerIngo Molnar <mingo@kernel.org>2023-10-18 12:03:04 +0200
commit50dcc2e0d62e3c4a54f39673c4dc3dcde7c74d52 (patch)
tree7b7b64ca438e2fd366a0449446c60be2f0d661c5 /drivers/firmware/efi/libstub/x86-stub.c
parentx86/boot: Rename conflicting 'boot_params' pointer to 'boot_params_ptr' (diff)
downloadlinux-50dcc2e0d62e3c4a54f39673c4dc3dcde7c74d52.tar.xz
linux-50dcc2e0d62e3c4a54f39673c4dc3dcde7c74d52.zip
x86/boot: efistub: Assign global boot_params variable
Now that the x86 EFI stub calls into some APIs exposed by the decompressor (e.g., kaslr_get_random_long()), it is necessary to ensure that the global boot_params variable is set correctly before doing so. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: linux-kernel@vger.kernel.org
Diffstat (limited to 'drivers/firmware/efi/libstub/x86-stub.c')
-rw-r--r--drivers/firmware/efi/libstub/x86-stub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index 3bfc59637dd1..76cc0d08e68a 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -818,6 +818,8 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
unsigned long kernel_entry;
efi_status_t status;
+ boot_params_ptr = boot_params;
+
efi_system_table = sys_table_arg;
/* Check if we were booted by the EFI firmware */
if (efi_system_table->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE)