stos: Handle pre BPAL kernel knots
Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
+14
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <ke/bpal.h>
|
||||
#include <ke/knot.h>
|
||||
#include <stdef.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -17,6 +18,7 @@
|
||||
#endif /* !_BOOT_PROTO */
|
||||
|
||||
static BPAL_HANDLE BpalHandle;
|
||||
static BOOLEAN IsInit = false;
|
||||
|
||||
VOID
|
||||
KeBpalGetHandle(BPAL_HANDLE *Result)
|
||||
@@ -28,6 +30,12 @@ KeBpalGetHandle(BPAL_HANDLE *Result)
|
||||
*Result = BpalHandle;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
KeBpalIsInit(VOID)
|
||||
{
|
||||
return IsInit;
|
||||
}
|
||||
|
||||
VOID
|
||||
KeBpalInit(VOID)
|
||||
{
|
||||
@@ -37,9 +45,14 @@ KeBpalInit(VOID)
|
||||
case 'l':
|
||||
if (RtlMemCmp(BootProto, "limine", 6) == 0) {
|
||||
KeBpalLimineInit(&BpalHandle);
|
||||
IsInit = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: PANIC HERE */
|
||||
KeKnot(
|
||||
KNOT_BAD_BOOT_PROTO,
|
||||
"got bad boot protocol '%s'\n",
|
||||
BootProto
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user