kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] ACPI: fix ACPI RSDP located before 0xF0000 is not found
@ 2022-01-10 12:53 Barzen, Benjamin
  2022-01-17 17:52 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Barzen, Benjamin @ 2022-01-10 12:53 UTC (permalink / raw)
  To: kvm; +Cc: Benjamin Barzen, pbonzini

From e107317d029b5298c88701b4bcc93bc64e28384b Mon Sep 17 00:00:00 2001
From: bbarzen <bbarzen@amazon.com>
Date: Wed, 29 Dec 2021 12:50:14 +0100
Subject: [PATCH] ACPI: fix ACPI RSDP located before 0xF0000 is not found

The function find_acpi_table_addr locates the ACPI RSDP by searching the
BIOS read only memory space. The official ACPI specification states that
this space goes from 0xE0000 to 0xFFFFF. The function currently starts
searching at 0xF0000. Any RSDP located before that address can
subsequently not be found.

Change the start address of the search to 0xE0000.

Singed-off-by: Benjamin Barzen <bbarzen@amazon.de>
---
 lib/x86/acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/x86/acpi.c b/lib/x86/acpi.c
index 4373106..bd7f022 100644
--- a/lib/x86/acpi.c
+++ b/lib/x86/acpi.c
@@ -19,7 +19,7 @@ void* find_acpi_table_addr(u32 sig)
         return (void*)(ulong)fadt->firmware_ctrl;
     }

-    for(addr = 0xf0000; addr < 0x100000; addr += 16) {
+    for(addr = 0xe0000; addr < 0x100000; addr += 16) {
        rsdp = (void*)addr;
        if (rsdp->signature == 0x2052545020445352LL)
           break;
-- 
2.32.0







Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [kvm-unit-tests PATCH] ACPI: fix ACPI RSDP located before 0xF0000 is not found
  2022-01-10 12:53 [kvm-unit-tests PATCH] ACPI: fix ACPI RSDP located before 0xF0000 is not found Barzen, Benjamin
@ 2022-01-17 17:52 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2022-01-17 17:52 UTC (permalink / raw)
  To: Barzen, Benjamin, kvm; +Cc: Benjamin Barzen

On 1/10/22 13:53, Barzen, Benjamin wrote:
>  From e107317d029b5298c88701b4bcc93bc64e28384b Mon Sep 17 00:00:00 2001
> From: bbarzen <bbarzen@amazon.com>
> Date: Wed, 29 Dec 2021 12:50:14 +0100
> Subject: [PATCH] ACPI: fix ACPI RSDP located before 0xF0000 is not found
> 
> The function find_acpi_table_addr locates the ACPI RSDP by searching the
> BIOS read only memory space. The official ACPI specification states that
> this space goes from 0xE0000 to 0xFFFFF. The function currently starts
> searching at 0xF0000. Any RSDP located before that address can
> subsequently not be found.
> 
> Change the start address of the search to 0xE0000.
> 
> Singed-off-by: Benjamin Barzen <bbarzen@amazon.de>
> ---
>   lib/x86/acpi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/x86/acpi.c b/lib/x86/acpi.c
> index 4373106..bd7f022 100644
> --- a/lib/x86/acpi.c
> +++ b/lib/x86/acpi.c
> @@ -19,7 +19,7 @@ void* find_acpi_table_addr(u32 sig)
>           return (void*)(ulong)fadt->firmware_ctrl;
>       }
> 
> -    for(addr = 0xf0000; addr < 0x100000; addr += 16) {
> +    for(addr = 0xe0000; addr < 0x100000; addr += 16) {
>          rsdp = (void*)addr;
>          if (rsdp->signature == 0x2052545020445352LL)
>             break;

Queued, thanks.

Paolo


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-17 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10 12:53 [kvm-unit-tests PATCH] ACPI: fix ACPI RSDP located before 0xF0000 is not found Barzen, Benjamin
2022-01-17 17:52 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).