ptos: bpal: Obtain ACPI RSDP pointer

Signed-off-by: Chloe M <chloe@mensia.org>
This commit is contained in:
2026-07-13 22:15:50 -04:00
parent 823586180c
commit 3387461f61
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -62,11 +62,13 @@ typedef struct {
* layer containing data filled in by the bootloader. * layer containing data filled in by the bootloader.
* *
* @KernelBase: Represents the kernel load base * @KernelBase: Represents the kernel load base
* @RsdpBase: RSDP base address
* @Framebuffer: Framebuffer information * @Framebuffer: Framebuffer information
* @MemEntryIdx: Callback to get memory map entry by index * @MemEntryIdx: Callback to get memory map entry by index
*/ */
typedef struct { typedef struct {
UPTR KernelBase; UPTR KernelBase;
VOID *RsdpBase;
BPAL_FRAMEBUFFER Framebuffer; BPAL_FRAMEBUFFER Framebuffer;
PT_STATUS(*MemEntryIdx)(USIZE Idx, MEMMAP_ENTRY *Result); PT_STATUS(*MemEntryIdx)(USIZE Idx, MEMMAP_ENTRY *Result);
} BPAL_HANDLE; } BPAL_HANDLE;
+9
View File
@@ -32,6 +32,13 @@ static volatile struct limine_memmap_request MapReq = {
.revision = 0 .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 static PT_STATUS
LimineMemEntryIdx(USIZE Idx, MEMMAP_ENTRY *Result) LimineMemEntryIdx(USIZE Idx, MEMMAP_ENTRY *Result)
{ {
@@ -80,8 +87,10 @@ KeBpalLimineInit(BPAL_HANDLE *Result)
HHDMResp = HHDMReq.response; HHDMResp = HHDMReq.response;
FbResp = FbReq.response; FbResp = FbReq.response;
MapResp = MapReq.response; MapResp = MapReq.response;
RsdpResp = RsdpReq.response;
Result->KernelBase = HHDMResp->offset; Result->KernelBase = HHDMResp->offset;
Result->MemEntryIdx = LimineMemEntryIdx; Result->MemEntryIdx = LimineMemEntryIdx;
Result->RsdpBase = RsdpResp->address;
BpalInitFramebuffer(Result); BpalInitFramebuffer(Result);
} }