[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230424165726.2245548-4-ardb@kernel.org>
Date: Mon, 24 Apr 2023 18:57:23 +0200
From: Ard Biesheuvel <ardb@...nel.org>
To: linux-efi@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Ard Biesheuvel <ardb@...nel.org>,
Evgeniy Baskov <baskov@...ras.ru>,
Borislav Petkov <bp@...en8.de>,
Andy Lutomirski <luto@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Alexey Khoroshilov <khoroshilov@...ras.ru>,
Peter Jones <pjones@...hat.com>,
Gerd Hoffmann <kraxel@...hat.com>,
Dave Young <dyoung@...hat.com>,
Mario Limonciello <mario.limonciello@....com>,
Kees Cook <keescook@...omium.org>,
Tom Lendacky <thomas.lendacky@....com>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [PATCH 3/6] x86: efistub: Obtain ACPI RSDP address while running in the stub
One of the actions performed by the decompressor is populating the RSDP
address field in the boot_params struct, and when doing EFI boot, EFI
configuration tables are the preferred source for this information.
In preparation for removing the decompressor code from the EFI stub boot
path, set this field from the EFI stub code.
Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
---
drivers/firmware/efi/libstub/x86-stub.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index a0bfd31358ba97b1..e136c94037dda8d3 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -787,6 +787,11 @@ asmlinkage unsigned long efi_main(efi_handle_t handle,
efi_dxe_table = NULL;
}
+ if (!boot_params->acpi_rsdp_addr)
+ boot_params->acpi_rsdp_addr = (unsigned long)
+ (get_efi_config_table(ACPI_20_TABLE_GUID) ?:
+ get_efi_config_table(ACPI_TABLE_GUID));
+
/*
* If the kernel isn't already loaded at a suitable address,
* relocate it.
--
2.39.2
Powered by blists - more mailing lists