diff options
author | Ian Moffett <ian@osmora.org> | 2025-05-17 21:53:00 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-05-17 21:53:00 -0400 |
commit | 9b21a40bf2649a03b773d20f6e1dc9fd38432e15 (patch) | |
tree | 2cf76fcb20533866e43dc7d5bcee75a4345a070b /sys/dev | |
parent | c1ce3dc7009960fa6ad12328aec7504f80464f6b (diff) |
kernel: acpi: Add acpi_rsdp()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/acpi_init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/acpi/acpi_init.c b/sys/dev/acpi/acpi_init.c index ecfb129..67eed29 100644 --- a/sys/dev/acpi/acpi_init.c +++ b/sys/dev/acpi/acpi_init.c @@ -46,6 +46,7 @@ static char oemid[OEMID_SIZE]; static struct acpi_root_sdt *root_sdt = NULL; static size_t root_sdt_entries = 0; +static paddr_t rsdp_pa = 0; static volatile struct limine_rsdp_request rsdp_req = { .id = LIMINE_RSDP_REQUEST, .revision = 0 @@ -99,6 +100,12 @@ acpi_oemid(void) return oemid; } +paddr_t +acpi_rsdp(void) +{ + return rsdp_pa; +} + void acpi_init(void) { @@ -112,6 +119,7 @@ acpi_init(void) rsdp = rsdp_req.response->address; acpi_print_oemid("RSDP", rsdp->oemid); memcpy(oemid, rsdp->oemid, OEMID_SIZE); + rsdp_pa = VIRT_TO_PHYS(rsdp); /* Fetch the root SDT */ if (rsdp->revision >= 2) { |