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
+29
View File
@@ -8,7 +8,9 @@
#include <ptdef.h>
#include <ke/bpal.h>
#include <ke/bugcheck.h>
#include <ex/trace.h>
#include <ps/process.h>
#include <mm/pm.h>
#include <mm/vm.h>
#include <hal/serial.h>
@@ -18,6 +20,7 @@
/* Globals */
static KPCR BootstrapCore;
static PROCESS *RootProcess;
/*
* Display the copyright for legal reasons
@@ -29,6 +32,29 @@ Copyright(VOID)
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
* components are initialized.
@@ -62,4 +88,7 @@ KiKernelInit(VOID)
/* Phase 2 init of bootstrap core */
HalKpcrP2Init(&BootstrapCore);
/* Initialize the root process */
InitializeRootProcess();
}