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

View File

@ -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);