ptos: ke: Create root process

Signed-off-by: Chloe M <chloe@mensia.org>
This commit is contained in:
2026-07-13 22:02:02 -04:00
parent 9d7ff0461f
commit df57eb710a
2 changed files with 30 additions and 0 deletions
+1
View File
@@ -15,6 +15,7 @@ CFILES += $(shell find ../xt -name "*.c")
CFILES += $(shell find ../drivers -name "*.c") CFILES += $(shell find ../drivers -name "*.c")
CFILES += $(shell find ../mm -name "*.c") CFILES += $(shell find ../mm -name "*.c")
CFILES += $(shell find ../ex -name "*.c") CFILES += $(shell find ../ex -name "*.c")
CFILES += $(shell find ../ps -name "*.c")
DFILES = $(CFILES:.c=.d) DFILES = $(CFILES:.c=.d)
OFILES = $(CFILES:.c=.o) OFILES = $(CFILES:.c=.o)
+29
View File
@@ -8,7 +8,9 @@
#include <ptdef.h> #include <ptdef.h>
#include <ke/bpal.h> #include <ke/bpal.h>
#include <ke/bugcheck.h>
#include <ex/trace.h> #include <ex/trace.h>
#include <ps/process.h>
#include <mm/pm.h> #include <mm/pm.h>
#include <mm/vm.h> #include <mm/vm.h>
#include <hal/serial.h> #include <hal/serial.h>
@@ -18,6 +20,7 @@
/* Globals */ /* Globals */
static KPCR BootstrapCore; static KPCR BootstrapCore;
static PROCESS *RootProcess;
/* /*
* Display the copyright for legal reasons * Display the copyright for legal reasons
@@ -29,6 +32,29 @@ Copyright(VOID)
TRACE("Copyright (c) 2026, Chloe M., et al\n"); TRACE("Copyright (c) 2026, Chloe M., et al\n");
} }
/*
* Initialize the first process
*/
static VOID
InitializeRootProcess(VOID)
{
PT_STATUS Status;
/* Create the client server runtime service */
Status = PsCreateProcess(
"csrts.sys",
0,
&RootProcess
);
if (PT_ERROR(Status)) {
KeBugCheck(
BUGCHECK_MISC,
"could not create csrts.sys process\n"
);
}
}
/* /*
* Starting here is where the world is brought up and system * Starting here is where the world is brought up and system
* components are initialized. * components are initialized.
@@ -62,4 +88,7 @@ KiKernelInit(VOID)
/* Phase 2 init of bootstrap core */ /* Phase 2 init of bootstrap core */
HalKpcrP2Init(&BootstrapCore); HalKpcrP2Init(&BootstrapCore);
/* Initialize the root process */
InitializeRootProcess();
} }