From 5f4a9440e97d6602222c93e8dcab8c483800a462 Mon Sep 17 00:00:00 2001 From: Amlal Date: Thu, 19 Sep 2024 15:43:25 +0200 Subject: IMP: Heap.hxx, Add mm_delete_class, which calls C++ destructor and then frees it. FIX: BMPMgr.cxx, fix cast issue. RM: Remove filesystem initialization code for now, need to have a clear structure depending on product. Signed-off-by: Amlal --- dev/ZKA/HALKit/AMD64/HalBMPMgr.cxx | 2 +- dev/ZKA/HALKit/AMD64/HalKernelMain.cxx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'dev/ZKA/HALKit') diff --git a/dev/ZKA/HALKit/AMD64/HalBMPMgr.cxx b/dev/ZKA/HALKit/AMD64/HalBMPMgr.cxx index 83fa2af3..b788902a 100644 --- a/dev/ZKA/HALKit/AMD64/HalBMPMgr.cxx +++ b/dev/ZKA/HALKit/AMD64/HalBMPMgr.cxx @@ -73,7 +73,7 @@ namespace Kernel /// @return The new address which was found. auto FindBitMap(VoidPtr base_ptr, SizeT size, Bool rw, Bool user) -> VoidPtr { - VoidPtr base = base_ptr + kPageSize; + VoidPtr base = reinterpret_cast(((UIntPtr)base_ptr) + kPageSize); while (base && size) { diff --git a/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx b/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx index ef743c20..b11d0701 100644 --- a/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx +++ b/dev/ZKA/HALKit/AMD64/HalKernelMain.cxx @@ -89,8 +89,9 @@ EXTERN_C Kernel::Void hal_real_init(Kernel::Void) noexcept Kernel::NeFileSystemMgr* mgr = (Kernel::mm_new_class()); Kernel::NeFileSystemMgr::Mount(mgr); - delete (NFS_CATALOG_STRUCT*)mgr->CreateDirectory("\\Boot\\"); - delete (NFS_CATALOG_STRUCT*)mgr->CreateDirectory("\\Support\\"); + /// Do filesystem stuff here... (TODO) + + Kernel::mm_delete_class(mgr); mp_do_user_switch(); -- cgit v1.2.3