stos: bpal: Put RSDP base in BPAL handle

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
Chloe M.
2026-06-23 23:50:19 +00:00
parent b8a80c1bd0
commit 520d148e0f
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -73,6 +73,7 @@ typedef struct {
* *
* @KernelBase: Kernel load base * @KernelBase: Kernel load base
* @Framebuffer: Framebuffer info * @Framebuffer: Framebuffer info
* @RsdpBase: ACPI RSDP base
* @MemEntryIdx: Callback to get memory map entry by index * @MemEntryIdx: Callback to get memory map entry by index
* @ModuleLookup: Lookup a module * @ModuleLookup: Lookup a module
* @CommandLine: Kernel command line * @CommandLine: Kernel command line
@@ -80,6 +81,7 @@ typedef struct {
typedef struct { typedef struct {
UPTR KernelBase; UPTR KernelBase;
BPAL_FRAMEBUFFER Framebuffer; BPAL_FRAMEBUFFER Framebuffer;
VOID *RsdpBase;
ST_STATUS(*MemEntryIdx)(USIZE Idx, MEMMAP_ENTRY *Result); ST_STATUS(*MemEntryIdx)(USIZE Idx, MEMMAP_ENTRY *Result);
ST_STATUS(*ModuleLookup)(CHAR *Path, BPAL_MODULE *Result); ST_STATUS(*ModuleLookup)(CHAR *Path, BPAL_MODULE *Result);
const CHAR *CommandLine; const CHAR *CommandLine;
+9
View File
@@ -65,6 +65,13 @@ static struct limine_executable_cmdline_request CmdLineReq = {
.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 ST_STATUS static ST_STATUS
LimineModuleLookup(CHAR *Path, BPAL_MODULE *Result) LimineModuleLookup(CHAR *Path, BPAL_MODULE *Result)
{ {
@@ -144,6 +151,7 @@ KeBpalLimineInit(BPAL_HANDLE *Handle)
FbResp = FbReq.response; FbResp = FbReq.response;
MapResp = MapReq.response; MapResp = MapReq.response;
CmdLineResp = CmdLineReq.response; CmdLineResp = CmdLineReq.response;
RsdpResp = RsdpReq.response;
DTRACE( DTRACE(
"slut handed control by %s %s\n", "slut handed control by %s %s\n",
@@ -171,4 +179,5 @@ KeBpalLimineInit(BPAL_HANDLE *Handle)
Handle->KernelBase = HHDMResp->offset; Handle->KernelBase = HHDMResp->offset;
Handle->MemEntryIdx = LimineMemEntryIdx; Handle->MemEntryIdx = LimineMemEntryIdx;
Handle->ModuleLookup = LimineModuleLookup; Handle->ModuleLookup = LimineModuleLookup;
Handle->RsdpBase = RsdpResp->address;
} }