ptos: ke: Add kernel C groundwork

Signed-off-by: Chloe M. <chloe@yiffware.org>
This commit is contained in:
2026-07-10 01:38:43 +00:00
parent 9091d40c3d
commit 81ee834a99
4 changed files with 56 additions and 1 deletions
+5 -1
View File
@@ -9,7 +9,11 @@
include ../mk/ptos.mk
.PHONY: all
all: machine
all: ke machine
.PHONY: ke
ke:
cd ke/; $(MAKE) $(PASSDOWN_ARGS)
.PHONY: machine
machine:
+1
View File
@@ -15,6 +15,7 @@ MdBspEntry:
lea g_GDTR(%rip), %rdi
call MdGdtLoad
call KiKernelInit /* Kick off system init */
1: hlt
jmp 1b
+32
View File
@@ -0,0 +1,32 @@
#
# Copyright (c) 2026, Chloe M.
# Provided under the BSD-3 clause
#
# Description: Kernel executive build script
# Author: Chloe M.
#
.SILENT:
include ../../mk/ptos.mk
CFILES = $(shell find . -name "*.c")
DFILES = $(CFILES:.c=.d)
OFILES = $(CFILES:.c=.o)
CFLAGS = \
$(SYS_CFLAGS) \
-MMD \
-D_KERNEL \
-DPRINTF_DISABLE_SUPPORT_PTRDIFF_T \
-DPRINTF_DISABLE_SUPPORT_FLOAT \
-I../xt/flanterm/src \
-I../head \
-I../target \
-I$(PT_PROJECT_ROOT)/sdk/head
.PHONY: all
all: $(OFILES)
%.o: %.c
$(PROMPT) "CC" $<
$(SYS_CC) -c $(CFLAGS) $< -o $@
+18
View File
@@ -0,0 +1,18 @@
/*
* Copyright (c) 2026, Chloe M., et al
* Provided under the BSD-3 clause.
*
* Description: System bringup core
* Author: Chloe M.
*/
#include <ptdef.h>
/*
* Starting here is where the world is brought up and system
* components are initialized.
*/
VOID
KiKernelInit(VOID)
{
}