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 <p-szafonimateusz@xiaomi.com>
This commit is contained in:
p-szafonimateusz 2024-04-23 07:49:37 +02:00 committed by Masayuki Ishikawa
parent e2f1ccdefc
commit d484e85bb9
1 changed files with 4 additions and 0 deletions

View File

@ -454,6 +454,10 @@ int acpi_init(uintptr_t rsdp)
acpi->rsdp = (struct acpi_rsdp_s *)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 */ /* Parse RSDP */
ret = acpi_rsdp_parse(acpi->rsdp); ret = acpi_rsdp_parse(acpi->rsdp);