diff --git a/paw/stos/head/ob/object.h b/paw/stos/head/ob/object.h index 7a0d2e9..9143f88 100644 --- a/paw/stos/head/ob/object.h +++ b/paw/stos/head/ob/object.h @@ -77,4 +77,9 @@ ST_STATUS ObCreateObject( VOID *Data, ST_OBJECT **Result ); +/* + * Initialize the object manager + */ +VOID ObInitManager(VOID); + #endif /* !_OB_OBJECT_H_ */ diff --git a/paw/stos/init/init.c b/paw/stos/init/init.c index 1c04ea2..0890cff 100644 --- a/paw/stos/init/init.c +++ b/paw/stos/init/init.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -78,4 +79,7 @@ KiKernelEntry(VOID) /* Phase 2 initialization of the bootstrap core */ HalKpcrP2Init(&BootstrapCore); + + /* Initialize the object manager */ + ObInitManager(); } diff --git a/paw/stos/ob/init.c b/paw/stos/ob/init.c new file mode 100644 index 0000000..5f13132 --- /dev/null +++ b/paw/stos/ob/init.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2026, Chloe M. + * Provided under the BSD-3 clause. + * + * Description: Object manager init funcs + * Author: Chloe M. + */ + +#include +#include +#include + +#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"); +}