diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-11-20 08:42:45 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-11-20 08:42:45 +0100 |
| commit | e718262c5e5163378ef92469db9b94908dccf12b (patch) | |
| tree | 98da3dbd414c14ff86e1d1c0f459285b78f63ec8 /dev/ZKAKit/src | |
| parent | ade3a2578ca8d6836b8e73160455df80d49cf045 (diff) | |
ADD: Add CoreBoot header, need to add missing fields for specific platforms.
Diffstat (limited to 'dev/ZKAKit/src')
| -rw-r--r-- | dev/ZKAKit/src/FS/NeFS.cc | 6 | ||||
| -rw-r--r-- | dev/ZKAKit/src/Heap.cc | 14 | ||||
| -rw-r--r-- | dev/ZKAKit/src/NeFS+FileMgr.cc | 21 | ||||
| -rw-r--r-- | dev/ZKAKit/src/Utils.cc | 2 |
4 files changed, 22 insertions, 21 deletions
diff --git a/dev/ZKAKit/src/FS/NeFS.cc b/dev/ZKAKit/src/FS/NeFS.cc index 34625fb3..bf1b54c5 100644 --- a/dev/ZKAKit/src/FS/NeFS.cc +++ b/dev/ZKAKit/src/FS/NeFS.cc @@ -1033,15 +1033,15 @@ namespace Kernel::Detail /***********************************************************************************/ Boolean fs_init_newfs(Void) noexcept { - kcout << "Creating drives...\r"; - kcout << "Constructing A:\r"; + kcout << "Creating A: drive...\r"; + kcout << "Creating A:\r"; kDiskMountpoint.A() = io_construct_main_drive(); kDiskMountpoint.B() = io_construct_drive(); kDiskMountpoint.C() = io_construct_drive(); kDiskMountpoint.D() = io_construct_drive(); - kcout << "Constructing A: [ OK ]\r"; + kcout << "Creating A: [ OK ]\r"; return true; } diff --git a/dev/ZKAKit/src/Heap.cc b/dev/ZKAKit/src/Heap.cc index 9dfb9cca..3c95a205 100644 --- a/dev/ZKAKit/src/Heap.cc +++ b/dev/ZKAKit/src/Heap.cc @@ -72,7 +72,7 @@ namespace Kernel /// @brief Check for heap address validity. /// @param heap_ptr The address_ptr to check. /// @return Bool if the pointer is valid or not. - auto mm_check_heap_address(VoidPtr heap_ptr) -> Bool + _Output auto mm_check_heap_address(VoidPtr heap_ptr) -> Bool { if (!heap_ptr) return false; @@ -114,7 +114,7 @@ namespace Kernel /// @param wr Read Write bit. /// @param user User enable bit. /// @return The newly allocated pointer. - VoidPtr mm_new_heap(const SizeT sz, const bool wr, const bool user) + _Output VoidPtr mm_new_heap(const SizeT sz, const bool wr, const bool user) { auto sz_fix = sz; @@ -154,7 +154,7 @@ namespace Kernel /// @brief Makes a page heap. /// @param heap_ptr the pointer to make a page heap. /// @return kErrorSuccess if successful, otherwise an error code. - Int32 mm_make_page(VoidPtr heap_ptr) + _Output Int32 mm_make_page(VoidPtr heap_ptr) { if (Detail::mm_check_heap_address(heap_ptr) == No) return kErrorHeapNotPresent; @@ -176,7 +176,7 @@ namespace Kernel /// @brief Overwrites and set the flags of a heap header. /// @param heap_ptr the pointer to update. /// @param flags the flags to set. - Int32 mm_make_flags(VoidPtr heap_ptr, UInt64 flags) + _Output Int32 mm_make_flags(VoidPtr heap_ptr, UInt64 flags) { if (Detail::mm_check_heap_address(heap_ptr) == No) return kErrorHeapNotPresent; @@ -195,7 +195,7 @@ namespace Kernel /// @brief Gets the flags of a heap header. /// @param heap_ptr the pointer to get. - UInt64 mm_get_flags(VoidPtr heap_ptr) + _Output UInt64 mm_get_flags(VoidPtr heap_ptr) { Detail::HEAP_INFORMATION_BLOCK_PTR heap_info_ptr = reinterpret_cast<Detail::HEAP_INFORMATION_BLOCK_PTR>( @@ -210,7 +210,7 @@ namespace Kernel /// @brief Declare pointer as free. /// @param heap_ptr the pointer. /// @return - Int32 mm_delete_heap(VoidPtr heap_ptr) + _Output Int32 mm_delete_heap(VoidPtr heap_ptr) { if (Detail::mm_check_heap_address(heap_ptr) == No) return kErrorHeapNotPresent; @@ -264,7 +264,7 @@ namespace Kernel /// @brief Check if pointer is a valid Kernel pointer. /// @param heap_ptr the pointer /// @return if it exists. - Boolean mm_is_valid_heap(VoidPtr heap_ptr) + _Output Boolean mm_is_valid_heap(VoidPtr heap_ptr) { if (heap_ptr) { diff --git a/dev/ZKAKit/src/NeFS+FileMgr.cc b/dev/ZKAKit/src/NeFS+FileMgr.cc index 2ad68115..5e9397e4 100644 --- a/dev/ZKAKit/src/NeFS+FileMgr.cc +++ b/dev/ZKAKit/src/NeFS+FileMgr.cc @@ -19,38 +19,39 @@ namespace Kernel NeFileSystemMgr::NeFileSystemMgr() { MUST_PASS(Detail::fs_init_newfs()); - fImpl = mm_new_class<NeFSParser>(); + + NeFSParser* fImpl; + mm_new_class<NeFSParser>(&fImpl); MUST_PASS(fImpl); - kcout << "We are done here... (NeFileSystemMgr).\r"; + kcout << "We are done allocating NeFSParser...\r"; } NeFileSystemMgr::~NeFileSystemMgr() { if (fImpl) { - kcout << "Destroying FS class (NeFS)...\r"; + kcout << "Destroying NeFSParser...\r"; - delete fImpl; - fImpl = nullptr; + mm_delete_class(&fImpl); } } /// @brief Removes a node from the filesystem. - /// @param fileName The filename + /// @param path The filename /// @return If it was deleted or not. - bool NeFileSystemMgr::Remove(const Char* fileName) + bool NeFileSystemMgr::Remove(_Input const Char* path) { - if (fileName == nullptr || *fileName == 0) + if (path == nullptr || *path == 0) return false; - return fImpl->RemoveCatalog(fileName); + return fImpl->RemoveCatalog(path); } /// @brief Creates a node with the specified. /// @param path The filename path. /// @return The Node pointer. - NodePtr NeFileSystemMgr::Create(const Char* path) + NodePtr NeFileSystemMgr::Create(_Input const Char* path) { return node_cast(fImpl->CreateCatalog(path)); } diff --git a/dev/ZKAKit/src/Utils.cc b/dev/ZKAKit/src/Utils.cc index 94ca1027..3b7bc046 100644 --- a/dev/ZKAKit/src/Utils.cc +++ b/dev/ZKAKit/src/Utils.cc @@ -211,7 +211,7 @@ namespace Kernel } } // namespace Kernel -EXTERN_C Kernel::VoidPtr memset(Kernel::VoidPtr dst, Kernel::UInt32 c, Kernel::Size len) +EXTERN_C void* memset(void* dst, int c, __SIZE_TYPE__ len) { return Kernel::rt_set_memory(dst, c, len); } |
