lkml.org 
[lkml]   [2023]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/6] x86: efistub: Obtain ACPI RSDP address while running in the stub
Date
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@kernel.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
\
 
 \ /
  Last update: 2023-04-24 18:59    [W:0.122 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site