stos: ex: Add per-cpu pool allocator groundwork

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
Chloe M.
2026-06-24 05:05:17 +00:00
parent bb4dd19bcf
commit 23746a2918
5 changed files with 174 additions and 2 deletions
+21
View File
@@ -9,6 +9,8 @@
#include <hal/kpcr.h>
#include <hal/intr.h>
#include <ex/trace.h>
#include <ex/pool.h>
#include <ke/knot.h>
#include <machine/cpuid.h>
#include <machine/idt.h>
#include <stdef.h>
@@ -131,3 +133,22 @@ HalKpcrP1Init(KPCR *Kpcr)
: "memory"
);
}
VOID
HalKpcrP2Init(KPCR *Kpcr)
{
ST_STATUS Status;
if (Kpcr == NULL) {
return;
}
Status = ExPoolInit(&Kpcr->AllocPool);
if (Status != STATUS_SUCCESS) {
KeKnot(
KNOT_MISC,
"failed to initialize pool for cpu%d\n",
Kpcr->CoreId
);
}
}