summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/HALKit/POWER
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-03-28 19:57:33 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-03-28 19:57:33 +0100
commitba7b3ed69cd24970a28b72c54982735cd120e663 (patch)
tree934b7645435ab1bfd2d8eb99fa861fc09e3dd5b4 /dev/kernel/HALKit/POWER
parent2205e801a6e84238dc8cbbb8f9de5a675eae1d81 (diff)
kernel: breaking: Change namespace from NeOS to Kernel.
sched: Fix redundancy in NeKernel's user scheduler macros, refactored the other files using the redundant macros too. part one of a series of commit for NeKernel. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/HALKit/POWER')
-rw-r--r--dev/kernel/HALKit/POWER/AP.h14
-rw-r--r--dev/kernel/HALKit/POWER/HalAP.cc8
-rw-r--r--dev/kernel/HALKit/POWER/HalDebugOutput.cc2
-rw-r--r--dev/kernel/HALKit/POWER/HalVirtualMemory.cc2
-rw-r--r--dev/kernel/HALKit/POWER/MBCI/.gitkeep0
-rw-r--r--dev/kernel/HALKit/POWER/MBCI/HalMBCIHost.cc8
-rw-r--r--dev/kernel/HALKit/POWER/Processor.h14
7 files changed, 20 insertions, 28 deletions
diff --git a/dev/kernel/HALKit/POWER/AP.h b/dev/kernel/HALKit/POWER/AP.h
index e0ef3ffb..b97b6d3e 100644
--- a/dev/kernel/HALKit/POWER/AP.h
+++ b/dev/kernel/HALKit/POWER/AP.h
@@ -15,19 +15,19 @@
#include <NewKit/Defines.h>
-namespace NeOS
+namespace Kernel
{
struct HAL_HARDWARE_THREAD;
/// @brief hardware thread indentification type.
- typedef NeOS::Int32 hal_ap_kind;
+ typedef Kernel::Int32 hal_ap_kind;
/// @brief Hardware thread information structure.
typedef struct HAL_HARDWARE_THREAD
{
- NeOS::UIntPtr fStartAddress;
- NeOS::UInt8 fPrivleged : 1;
- NeOS::UInt32 fPageMemoryFlags;
+ Kernel::UIntPtr fStartAddress;
+ Kernel::UInt8 fPrivleged : 1;
+ Kernel::UInt32 fPageMemoryFlags;
hal_ap_kind fIdentNumber;
} HAL_HARDWARE_THREAD;
@@ -35,5 +35,5 @@ namespace NeOS
/// @param hart the hart
/// @param epc the pc.
/// @return
- EXTERN_C NeOS::Void hal_set_pc_to_hart(HAL_HARDWARE_THREAD* hart, NeOS::VoidPtr epc);
-} // namespace NeOS
+ EXTERN_C Kernel::Void hal_set_pc_to_hart(HAL_HARDWARE_THREAD* hart, Kernel::VoidPtr epc);
+} // namespace Kernel
diff --git a/dev/kernel/HALKit/POWER/HalAP.cc b/dev/kernel/HALKit/POWER/HalAP.cc
index 32f91a5f..00112702 100644
--- a/dev/kernel/HALKit/POWER/HalAP.cc
+++ b/dev/kernel/HALKit/POWER/HalAP.cc
@@ -8,16 +8,16 @@
#include <KernelKit/DebugOutput.h>
#include <HALKit/POWER/AP.h>
-using namespace NeOS;
+using namespace Kernel;
-namespace NeOS::Detail
+namespace Kernel::Detail
{
STATIC void mp_hang_fn(void)
{
while (YES)
;
}
-} // namespace NeOS::Detail
+} // namespace Kernel::Detail
/// @brief wakes up thread.
/// wakes up thread from hang.
@@ -36,5 +36,5 @@ void mp_hang_thread(HAL::StackFramePtr stack)
if (!stack)
return;
- hal_set_pc_to_hart(reinterpret_cast<HAL_HARDWARE_THREAD*>(stack->R15), reinterpret_cast<VoidPtr>(NeOS::Detail::mp_hang_fn));
+ hal_set_pc_to_hart(reinterpret_cast<HAL_HARDWARE_THREAD*>(stack->R15), reinterpret_cast<VoidPtr>(Kernel::Detail::mp_hang_fn));
}
diff --git a/dev/kernel/HALKit/POWER/HalDebugOutput.cc b/dev/kernel/HALKit/POWER/HalDebugOutput.cc
index e9b2c85a..16ce8c6f 100644
--- a/dev/kernel/HALKit/POWER/HalDebugOutput.cc
+++ b/dev/kernel/HALKit/POWER/HalDebugOutput.cc
@@ -7,7 +7,7 @@
#include <HALKit/POWER/Processor.h>
#include <KernelKit/DebugOutput.h>
-using namespace NeOS;
+using namespace Kernel;
/// @brief Writes to COM1.
/// @param bytes
diff --git a/dev/kernel/HALKit/POWER/HalVirtualMemory.cc b/dev/kernel/HALKit/POWER/HalVirtualMemory.cc
index d3d4b694..3d56f2ac 100644
--- a/dev/kernel/HALKit/POWER/HalVirtualMemory.cc
+++ b/dev/kernel/HALKit/POWER/HalVirtualMemory.cc
@@ -10,7 +10,7 @@
/// @note Refer to SoC documentation.
-using namespace NeOS;
+using namespace Kernel;
EXTERN_C Void hal_write_tlb(UInt32 mas0, UInt32 mas1, UInt32 mas2, UInt32 mas3, UInt32 mas7)
{
diff --git a/dev/kernel/HALKit/POWER/MBCI/.gitkeep b/dev/kernel/HALKit/POWER/MBCI/.gitkeep
deleted file mode 100644
index e69de29b..00000000
--- a/dev/kernel/HALKit/POWER/MBCI/.gitkeep
+++ /dev/null
diff --git a/dev/kernel/HALKit/POWER/MBCI/HalMBCIHost.cc b/dev/kernel/HALKit/POWER/MBCI/HalMBCIHost.cc
deleted file mode 100644
index 0d2e140b..00000000
--- a/dev/kernel/HALKit/POWER/MBCI/HalMBCIHost.cc
+++ /dev/null
@@ -1,8 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#include <HALKit/POWER/Processor.h>
-#include <KernelKit/DebugOutput.h>
diff --git a/dev/kernel/HALKit/POWER/Processor.h b/dev/kernel/HALKit/POWER/Processor.h
index bbcfd01f..6db4e3cd 100644
--- a/dev/kernel/HALKit/POWER/Processor.h
+++ b/dev/kernel/HALKit/POWER/Processor.h
@@ -14,7 +14,7 @@
#define NoOp() asm volatile("mr 0, 0")
#define kHalPPCAlignment __attribute__((aligned(4)))
-namespace NeOS::HAL
+namespace Kernel::HAL
{
typedef UIntPtr Reg;
@@ -47,16 +47,16 @@ namespace NeOS::HAL
{
NoOp(); // no oop
}
-} // namespace NeOS::HAL
+} // namespace Kernel::HAL
-EXTERN_C NeOS::Void int_handle_math(NeOS::UIntPtr sp);
-EXTERN_C NeOS::Void int_handle_pf(NeOS::UIntPtr sp);
+EXTERN_C Kernel::Void int_handle_math(Kernel::UIntPtr sp);
+EXTERN_C Kernel::Void int_handle_pf(Kernel::UIntPtr sp);
/// @brief Set TLB.
-NeOS::Bool hal_set_tlb(NeOS::UInt8 tlb, NeOS::UInt32 epn, NeOS::UInt64 rpn, NeOS::UInt8 perms, NeOS::UInt8 wimge, NeOS::UInt8 ts, NeOS::UInt8 esel, NeOS::UInt8 tsize, NeOS::UInt8 iprot);
+Kernel::Bool hal_set_tlb(Kernel::UInt8 tlb, Kernel::UInt32 epn, Kernel::UInt64 rpn, Kernel::UInt8 perms, Kernel::UInt8 wimge, Kernel::UInt8 ts, Kernel::UInt8 esel, Kernel::UInt8 tsize, Kernel::UInt8 iprot);
/// @brief Write TLB.
-NeOS::Void hal_write_tlb(NeOS::UInt32 mas0, NeOS::UInt32 mas1, NeOS::UInt32 mas2, NeOS::UInt32 mas3, NeOS::UInt32 mas7);
+Kernel::Void hal_write_tlb(Kernel::UInt32 mas0, Kernel::UInt32 mas1, Kernel::UInt32 mas2, Kernel::UInt32 mas3, Kernel::UInt32 mas7);
/// @brief Flush TLB.
-EXTERN_C NeOS::Void hal_flush_tlb();
+EXTERN_C Kernel::Void hal_flush_tlb();