From 3387461f61866ebd5ed7837df94b3cb58cb394c1 Mon Sep 17 00:00:00 2001 From: Chloe M Date: Mon, 13 Jul 2026 22:15:50 -0400 Subject: [PATCH] ptos: bpal: Obtain ACPI RSDP pointer Signed-off-by: Chloe M --- service/ptos/head/ke/bpal.h | 2 ++ service/ptos/ke/bpal/proto/limine.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/service/ptos/head/ke/bpal.h b/service/ptos/head/ke/bpal.h index 486962c..6cb007d 100644 --- a/service/ptos/head/ke/bpal.h +++ b/service/ptos/head/ke/bpal.h @@ -62,11 +62,13 @@ typedef struct { * layer containing data filled in by the bootloader. * * @KernelBase: Represents the kernel load base + * @RsdpBase: RSDP base address * @Framebuffer: Framebuffer information * @MemEntryIdx: Callback to get memory map entry by index */ typedef struct { UPTR KernelBase; + VOID *RsdpBase; BPAL_FRAMEBUFFER Framebuffer; PT_STATUS(*MemEntryIdx)(USIZE Idx, MEMMAP_ENTRY *Result); } BPAL_HANDLE; diff --git a/service/ptos/ke/bpal/proto/limine.c b/service/ptos/ke/bpal/proto/limine.c index 59d421e..0f1258a 100644 --- a/service/ptos/ke/bpal/proto/limine.c +++ b/service/ptos/ke/bpal/proto/limine.c @@ -32,6 +32,13 @@ static volatile struct limine_memmap_request MapReq = { .revision = 0 }; +/* RSDP request */ +static struct limine_rsdp_response *RsdpResp = NULL; +static volatile struct limine_rsdp_request RsdpReq = { + .id = LIMINE_RSDP_REQUEST_ID, + .revision = 0 +}; + static PT_STATUS LimineMemEntryIdx(USIZE Idx, MEMMAP_ENTRY *Result) { @@ -80,8 +87,10 @@ KeBpalLimineInit(BPAL_HANDLE *Result) HHDMResp = HHDMReq.response; FbResp = FbReq.response; MapResp = MapReq.response; + RsdpResp = RsdpReq.response; Result->KernelBase = HHDMResp->offset; Result->MemEntryIdx = LimineMemEntryIdx; + Result->RsdpBase = RsdpResp->address; BpalInitFramebuffer(Result); }