From 912d262318f67925b3c2da39b4358c9f0722f1f3 Mon Sep 17 00:00:00 2001 From: "Chloe M." Date: Fri, 10 Jul 2026 06:52:38 +0000 Subject: [PATCH] ptos: drivers: Add bootvid driver stub Signed-off-by: Chloe M. --- service/ptos/drivers/bootvid/fbio.c | 28 ++++++++++++++++++++++++ service/ptos/head/drivers/bootvid/fbio.h | 19 ++++++++++++++++ service/ptos/ke/Makefile | 1 + service/ptos/ke/init.c | 4 ++++ 4 files changed, 52 insertions(+) create mode 100644 service/ptos/drivers/bootvid/fbio.c create mode 100644 service/ptos/head/drivers/bootvid/fbio.h diff --git a/service/ptos/drivers/bootvid/fbio.c b/service/ptos/drivers/bootvid/fbio.c new file mode 100644 index 0000000..f2699bf --- /dev/null +++ b/service/ptos/drivers/bootvid/fbio.c @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2026, Chloe M. + * Provided under the BSD-3 clause. + * + * Description: Boot video driver + * Author: Chloe M. + */ + +#include +#include +#include + +#define DTRACE(Fmt, ...) \ + TRACE("[ BOOTVID ]: " Fmt, ##__VA_ARGS__) + +static BPAL_FRAMEBUFFER Framebuffer; + +VOID +BootVidInit(VOID) +{ + BPAL_HANDLE Handle; + + KeBpalGetHandle(&Handle); + Framebuffer = Handle.Framebuffer; + + DTRACE("framebuffer width : %d px\n", Framebuffer.Width); + DTRACE("framebuffer height : %d px\n", Framebuffer.Height); +} diff --git a/service/ptos/head/drivers/bootvid/fbio.h b/service/ptos/head/drivers/bootvid/fbio.h new file mode 100644 index 0000000..70a9509 --- /dev/null +++ b/service/ptos/head/drivers/bootvid/fbio.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2026, Chloe M. + * Provided under the BSD-3 clause. + * + * Description: Boot video 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/service/ptos/ke/Makefile b/service/ptos/ke/Makefile index a2a579a..31d11ff 100644 --- a/service/ptos/ke/Makefile +++ b/service/ptos/ke/Makefile @@ -12,6 +12,7 @@ include ../../mk/ptos.mk CFILES = $(shell find . -name "*.c") CFILES += $(shell find ../lib -name "*.c") CFILES += $(shell find ../xt -name "*.c") +CFILES += $(shell find ../drivers -name "*.c") DFILES = $(CFILES:.c=.d) OFILES = $(CFILES:.c=.o) diff --git a/service/ptos/ke/init.c b/service/ptos/ke/init.c index 3b49e5d..9ea69a0 100644 --- a/service/ptos/ke/init.c +++ b/service/ptos/ke/init.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -38,4 +39,7 @@ KiKernelInit(VOID) /* Display the copyright */ Copyright(); + + /* Initialize the boot video driver */ + BootVidInit(); }