This is an automated email from the ASF dual-hosted git repository.

masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new d484e85bb9 x86_64_acpi.c: make sure that RSDP is mapped
d484e85bb9 is described below

commit d484e85bb9a01cc6e1786dff9513b001edd3c64e
Author: p-szafonimateusz <[email protected]>
AuthorDate: Tue Apr 23 07:49:37 2024 +0200

    x86_64_acpi.c: make sure that RSDP is mapped
    
    rsdp memory may be not mapped when provided from multiboot2 header.
    For some reason the previous code worked on some machines.
    
    Signed-off-by: p-szafonimateusz <[email protected]>
---
 arch/x86_64/src/common/x86_64_acpi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86_64/src/common/x86_64_acpi.c 
b/arch/x86_64/src/common/x86_64_acpi.c
index 2615fb439c..f261627711 100644
--- a/arch/x86_64/src/common/x86_64_acpi.c
+++ b/arch/x86_64/src/common/x86_64_acpi.c
@@ -454,6 +454,10 @@ int acpi_init(uintptr_t rsdp)
       acpi->rsdp = (struct acpi_rsdp_s *)rsdp;
     }
 
+  /* Make sure that RSDP is mapped */
+
+  acpi_map_region((uintptr_t)acpi->rsdp, sizeof(struct acpi_rsdp_s));
+
   /* Parse RSDP */
 
   ret = acpi_rsdp_parse(acpi->rsdp);

Reply via email to