[PATCH v2 1/1] ACPI: PRM: Skip the initialization when boot from legacy BIOS
From: Shang song (Lenovo)
Date: Tue Oct 28 2025 - 02:31:44 EST
To address the confusion caused by the misleading "Failed to find VA for GUID..."
message during legacy BIOS boot, making 'EFI_RUNTIME_SERVICES's earlier judgment
can prevent this false alert.
Signed-off-by: Shang song (Lenovo) <shangsong2@xxxxxxxxxxx>
---
Changes in v2:
- Add comment for the code update.
drivers/acpi/prmt.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
index 6792d4385eee..4457ff17f878 100644
--- a/drivers/acpi/prmt.c
+++ b/drivers/acpi/prmt.c
@@ -392,6 +392,14 @@ void __init init_prmt(void)
if (ACPI_FAILURE(status))
return;
+ /*
+ * Return immediately if EFI_RUNTIME_SERVICES is not enabled.
+ */
+ if (!efi_enabled(EFI_RUNTIME_SERVICES)) {
+ pr_err("PRM: EFI runtime services unavailable\n");
+ return;
+ }
+
mc = acpi_table_parse_entries(ACPI_SIG_PRMT, sizeof(struct acpi_table_prmt) +
sizeof (struct acpi_table_prmt_header),
0, acpi_parse_prmt, 0);
@@ -404,11 +412,6 @@ void __init init_prmt(void)
pr_info("PRM: found %u modules\n", mc);
- if (!efi_enabled(EFI_RUNTIME_SERVICES)) {
- pr_err("PRM: EFI runtime services unavailable\n");
- return;
- }
-
status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT,
ACPI_ADR_SPACE_PLATFORM_RT,
&acpi_platformrt_space_handler,
--
2.43.7