summaryrefslogtreecommitdiffhomepage
path: root/Source
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-01-19 12:44:57 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-01-19 12:45:09 +0100
commit9d6babb9a3b9ffbedc1fa377f47ff6b3f7585056 (patch)
tree8d24c521d8986a8a2ed0273763bfe309dd05b524 /Source
parent149ad21b7188d21d726215c98d0d74835ea4e737 (diff)
Kernel/PowerPC: did some progress on it, got it booting on ofw.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Source')
-rw-r--r--Source/KMain.cxx1
-rw-r--r--Source/NewFS.cxx15
-rw-r--r--Source/Utils.cxx10
3 files changed, 20 insertions, 6 deletions
diff --git a/Source/KMain.cxx b/Source/KMain.cxx
index cc847349..575b283c 100644
--- a/Source/KMain.cxx
+++ b/Source/KMain.cxx
@@ -13,7 +13,6 @@
extern "C" void __KernelMain(hCore::VoidPtr this_image)
{
- hCore::Detail::serial_init();
MUST_PASS(hCore::initialize_hardware_components());
hCore::IFilesystemManager::Mount(new hCore::NewFilesystemManager());
diff --git a/Source/NewFS.cxx b/Source/NewFS.cxx
index 03a72398..28f7c041 100644
--- a/Source/NewFS.cxx
+++ b/Source/NewFS.cxx
@@ -16,14 +16,19 @@ namespace hCore
NewFilesystemManager::~NewFilesystemManager() = default;
- bool NewFilesystemManager::Remove(const char* node)
+ /**
+ * Unallocates a file from disk.
+ * @param node_name it's path.
+ * @return operation status boolean.
+ */
+ bool NewFilesystemManager::Remove(const char* node_name)
{
- if (node == nullptr ||
- *node == 0)
+ if (node_name == nullptr ||
+ *node_name == 0)
return false;
- if (auto catalog = fIO->GetCatalog(node);
- catalog->Flags == kFlagCatalog)
+ if (auto catalog = fIO->GetCatalog(node_name);
+ catalog)
return fIO->RemoveCatalog(*catalog);
return false;
diff --git a/Source/Utils.cxx b/Source/Utils.cxx
index 557632c3..2cfb391a 100644
--- a/Source/Utils.cxx
+++ b/Source/Utils.cxx
@@ -207,3 +207,13 @@ namespace hCore
return str;
}
} // namespace hCore
+
+extern "C" void memset(void* dst, char src, size_t len)
+{
+ hCore::rt_set_memory(dst, src, len);
+}
+
+extern "C" void memcpy(void* dst, void* src, size_t len)
+{
+ hCore::rt_copy_memory(src, dst, len);
+} \ No newline at end of file