From eba8b7ddd0a455d9e49f32dcae712c5612c0093c Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 26 Jan 2024 22:26:48 +0100 Subject: Kernel: Major repository refactor. Rework the repo into Private and Public modules. Signed-off-by: Amlal El Mahrouss --- Private/HALKit/PowerPC/Processor.cpp | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Private/HALKit/PowerPC/Processor.cpp (limited to 'Private/HALKit/PowerPC/Processor.cpp') diff --git a/Private/HALKit/PowerPC/Processor.cpp b/Private/HALKit/PowerPC/Processor.cpp new file mode 100644 index 00000000..b134cf92 --- /dev/null +++ b/Private/HALKit/PowerPC/Processor.cpp @@ -0,0 +1,68 @@ +/* +* ======================================================== +* +* hCore +* Copyright 2024 Mahrouss Logic, all rights reserved. +* +* ======================================================== +*/ + +#include +#include + +extern "C" void flush_tlb() {} +extern "C" void rt_wait_for_io() {} +extern "C" hCore::HAL::StackFrame* rt_get_current_context() { } + +namespace hCore +{ +namespace HAL +{ + UIntPtr hal_create_page(bool rw, bool user) + { + return 0; + } + + UIntPtr hal_alloc_page(UIntPtr offset, bool rw, bool user) + { + return 0; + } +} + +// @brief wakes up thread. +// wakes up thread from hang. +void rt_wakeup_thread(HAL::StackFrame* stack) +{ + +} + +// @brief makes thread sleep. +// hooks and hangs thread to prevent code from executing. +void rt_hang_thread(HAL::StackFrame* stack) +{ + +} + +// @brief main HAL entrypoint +void initialize_hardware_components() +{ + +} + +void system_io_print(const char *bytes) +{ + if (!bytes) + return; + + SizeT index = 0; + SizeT len = string_length(bytes, 256); + + while (index < len) + { + // TODO + ++index; + } +} + +TerminalDevice kcout(hCore::system_io_print, nullptr); +} \ No newline at end of file -- cgit v1.2.3