stos: Handle pre BPAL kernel knots

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
Chloe M.
2026-06-23 05:45:35 +00:00
parent 81d5f13a30
commit 5c522ffc7f
4 changed files with 31 additions and 6 deletions
+7 -2
View File
@@ -7,6 +7,7 @@
*/
#include <drivers/bootvid/fbio.h>
#include <ke/bpal.h>
#include <ex/trace.h>
#include <ke/knot.h>
@@ -18,7 +19,8 @@
/* Reason lookup table */
static const CHAR *ReasonTable[] = {
[KNOT_MISC] = "unspecified reason",
[KNOT_UNBOUND_RSRC] = "unbounded resource"
[KNOT_UNBOUND_RSRC] = "unbounded resource",
[KNOT_BAD_BOOT_PROTO] = "bad boot protocol"
};
/* Globals */
@@ -40,7 +42,10 @@ KiKnot(KNOT_REASON Reason, const CHAR *Fmt, ...)
{
va_start(Ap, Fmt);
FmtPrintf(KnotBuf, sizeof(KnotBuf), Fmt, Ap);
BootVidInitCons(&KnotAttr);
if (KeBpalIsInit()) {
BootVidInitCons(&KnotAttr);
}
TRACE("\033[H\033[2J");
TRACE(KnotMessage);