stos: ob: Initialize object manager
Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
@@ -77,4 +77,9 @@ ST_STATUS ObCreateObject(
|
|||||||
VOID *Data, ST_OBJECT **Result
|
VOID *Data, ST_OBJECT **Result
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize the object manager
|
||||||
|
*/
|
||||||
|
VOID ObInitManager(VOID);
|
||||||
|
|
||||||
#endif /* !_OB_OBJECT_H_ */
|
#endif /* !_OB_OBJECT_H_ */
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include <ke/bpal.h>
|
#include <ke/bpal.h>
|
||||||
#include <hal/serial.h>
|
#include <hal/serial.h>
|
||||||
#include <hal/kpcr.h>
|
#include <hal/kpcr.h>
|
||||||
|
#include <ob/object.h>
|
||||||
#include <drivers/bootvid/fbio.h>
|
#include <drivers/bootvid/fbio.h>
|
||||||
#include <drivers/acpi/acpi.h>
|
#include <drivers/acpi/acpi.h>
|
||||||
#include <mm/pmm.h>
|
#include <mm/pmm.h>
|
||||||
@@ -78,4 +79,7 @@ KiKernelEntry(VOID)
|
|||||||
|
|
||||||
/* Phase 2 initialization of the bootstrap core */
|
/* Phase 2 initialization of the bootstrap core */
|
||||||
HalKpcrP2Init(&BootstrapCore);
|
HalKpcrP2Init(&BootstrapCore);
|
||||||
|
|
||||||
|
/* Initialize the object manager */
|
||||||
|
ObInitManager();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2026, Chloe M.
|
||||||
|
* Provided under the BSD-3 clause.
|
||||||
|
*
|
||||||
|
* Description: Object manager init funcs
|
||||||
|
* Author: Chloe M.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ob/object.h>
|
||||||
|
#include <ex/trace.h>
|
||||||
|
#include <ke/knot.h>
|
||||||
|
|
||||||
|
#define DTRACE(Fmt, ...) \
|
||||||
|
TRACE("[ OB ]: " Fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
|
/* Globals */
|
||||||
|
static ST_OBJECT *RootDirectory;
|
||||||
|
|
||||||
|
VOID
|
||||||
|
ObInitManager(VOID)
|
||||||
|
{
|
||||||
|
ST_STATUS Status;
|
||||||
|
|
||||||
|
Status = ObCreateDirectory(
|
||||||
|
"/",
|
||||||
|
&RootDirectory
|
||||||
|
);
|
||||||
|
|
||||||
|
if (Status != STATUS_SUCCESS) {
|
||||||
|
KeKnot(KNOT_MISC, "failed to initialize object manager\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
DTRACE("mounted root at '/'\n");
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user