From fdc8aaab2ad3c2f2f3f4bb4ffb71bc2d797366aa Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 24 Aug 2024 17:30:52 +0200 Subject: [IMP] Better kernel design. + If the process has a parent, and it's exited, that means that the thread must go down as well. Signed-off-by: Amlal El Mahrouss --- dev/ZKA/HALKit/AMD64/HalKernelMain.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'dev/ZKA/HALKit/AMD64/HalKernelMain.cxx') diff --git a/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx b/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx index 0845dc39..126473a0 100644 --- a/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx +++ b/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx @@ -23,6 +23,8 @@ Kernel::Property cKernelVersion; +Kernel::User cUserSuper{Kernel::RingKind::kRingSuperUser, kSuperUser}; + EXTERN Kernel::Boolean kAllocationInProgress; EXTERN_C Kernel::VoidPtr kInterruptVectorTable[]; @@ -65,7 +67,7 @@ STATIC Kernel::HAL::Detail::NewOSGDT cGdt = { }; Kernel::Void hal_real_init(Kernel::Void) noexcept; -EXTERN_C Kernel::Void KeMain(Kernel::Void); +EXTERN_C Kernel::Void ke_dll_entrypoint(Kernel::Void); EXTERN_C void hal_init_platform( Kernel::HEL::HandoverInformationHeader* HandoverHeader) @@ -227,12 +229,11 @@ Kernel::Void hal_real_init(Kernel::Void) noexcept Kernel::NewFilesystemManager::Mount(fs); - const auto cPassword = "debug_usr"; + const auto cPassword = "ZKA_KERNEL_AUTHORITY"; - Kernel::User user_debug{Kernel::RingKind::kRingSuperUser, kSuperUser}; - Kernel::UserManager::The()->TryLogIn(user_debug, cPassword, cPassword); + cUserSuper.TrySave(cPassword); - KeMain(); + ke_dll_entrypoint(); Kernel::ke_stop(RUNTIME_CHECK_FAILED); } -- cgit v1.2.3