diff --git a/paw/stos/drivers/bootvid/fbio.c b/paw/stos/drivers/bootvid/fbio.c new file mode 100644 index 0000000..20c6b3d --- /dev/null +++ b/paw/stos/drivers/bootvid/fbio.c @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2026, Chloe M. + * Provided under the BSD-3 clause. + * + * Description: Bootvid driver + * Author: Chloe M. + */ + +#include +#include +#include + +#define DTRACE(Fmt, ...) \ + TRACE("[ BOOTVID ]: " Fmt, ##__VA_ARGS__) + +static BPAL_FRAMEBUFFER Framebuffer; + +VOID +BootVidInit(VOID) +{ + BPAL_HANDLE BpalHandle; + + KeBpalGetHandle(&BpalHandle); + Framebuffer = BpalHandle.Framebuffer; + + DTRACE("framebuffer width: %d\n", Framebuffer.Width); + DTRACE("framebuffer height: %d\n", Framebuffer.Height); +} diff --git a/paw/stos/head/drivers/bootvid/fbio.h b/paw/stos/head/drivers/bootvid/fbio.h new file mode 100644 index 0000000..84431b4 --- /dev/null +++ b/paw/stos/head/drivers/bootvid/fbio.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2026, Chloe M. + * Provided under the BSD-3 clause. + * + * Description: Bootvid driver + * Author: Chloe M. + */ + +#ifndef _BOOTVID_FBIO_H_ +#define _BOOTVID_FBIO_H_ 1 + +#include + +/* + * Initialize the boot video driver + */ +VOID BootVidInit(VOID); + +#endif /* !_BOOTVID_FBIO_H_ */ diff --git a/paw/stos/init/init.c b/paw/stos/init/init.c index 870e0cc..e1315f9 100644 --- a/paw/stos/init/init.c +++ b/paw/stos/init/init.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #define DTRACE(Fmt, ...) \ @@ -36,4 +37,7 @@ KiKernelEntry(VOID) /* Initialize BPAL */ KeBpalInit(); + + /* Initialize boot video */ + BootVidInit(); } diff --git a/paw/stos/ke/Makefile b/paw/stos/ke/Makefile index debcaa9..6238440 100644 --- a/paw/stos/ke/Makefile +++ b/paw/stos/ke/Makefile @@ -12,6 +12,7 @@ include ../../mk/stos.mk CFILES = $(shell find ../init -name "*.c") CFILES += $(shell find ../xt -name "*.c") CFILES += $(shell find ../lib -name "*.c") +CFILES += $(shell find ../drivers -name "*.c") CFILES += $(shell find bpal -name "*.c") DFILES = $(CFILES:.c=.d) OFILES = $(CFILES:.c=.o)