diff --git a/paw/base/boot/limine.conf b/paw/base/boot/limine.conf index 3abf30b..162e596 100644 --- a/paw/base/boot/limine.conf +++ b/paw/base/boot/limine.conf @@ -12,3 +12,4 @@ randomize_hhdm_base: yes protocol: limine kernel_path: boot():/boot/stoskrnl.sys module_path: boot():/boot/pbi.hole + cmdline: bootcons=false diff --git a/paw/stos/head/ke/bpal.h b/paw/stos/head/ke/bpal.h index 1128a93..0575881 100644 --- a/paw/stos/head/ke/bpal.h +++ b/paw/stos/head/ke/bpal.h @@ -75,12 +75,14 @@ typedef struct { * @Framebuffer: Framebuffer info * @MemEntryIdx: Callback to get memory map entry by index * @ModuleLookup: Lookup a module + * @CommandLine: Kernel command line */ typedef struct { UPTR KernelBase; BPAL_FRAMEBUFFER Framebuffer; ST_STATUS(*MemEntryIdx)(USIZE Idx, MEMMAP_ENTRY *Result); ST_STATUS(*ModuleLookup)(CHAR *Path, BPAL_MODULE *Result); + const CHAR *CommandLine; } BPAL_HANDLE; /* diff --git a/paw/stos/ke/bpal/proto/limine.c b/paw/stos/ke/bpal/proto/limine.c index 1d982a1..d9d9603 100644 --- a/paw/stos/ke/bpal/proto/limine.c +++ b/paw/stos/ke/bpal/proto/limine.c @@ -58,6 +58,13 @@ static volatile struct limine_module_request ModReq = { .revision = 0 }; +/* Command line request */ +static struct limine_executable_cmdline_response *CmdLineResp = NULL; +static struct limine_executable_cmdline_request CmdLineReq = { + .id = LIMINE_EXECUTABLE_CMDLINE_REQUEST_ID, + .revision = 0 +}; + static ST_STATUS LimineModuleLookup(CHAR *Path, BPAL_MODULE *Result) { @@ -136,6 +143,7 @@ KeBpalLimineInit(BPAL_HANDLE *Handle) ModResp = ModReq.response; FbResp = FbReq.response; MapResp = MapReq.response; + CmdLineResp = CmdLineReq.response; DTRACE( "slut handed control by %s %s\n", @@ -153,6 +161,12 @@ KeBpalLimineInit(BPAL_HANDLE *Handle) LoaderPerfResp->exec_usec ); + Handle->CommandLine = CmdLineResp->cmdline; + DTRACE( + "kernel parameters : %s\n", + Handle->CommandLine + ); + BpalInitFramebuffer(Handle); Handle->KernelBase = HHDMResp->offset; Handle->MemEntryIdx = LimineMemEntryIdx;