summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-30 08:46:09 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-30 08:46:09 +0100
commitd7112cd6909640afd7609b3a142bc6ecf921ee25 (patch)
tree55033ad28d58d536c4b3bad715d8635f00773bfd /Private/HALKit
parentf22e69b8837b84548f79e0b8ca7bef24605c6611 (diff)
Kernel: Breaking changes, see source code.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit')
-rw-r--r--Private/HALKit/AMD64/ACPI/ACPI.hpp6
-rw-r--r--Private/HALKit/AMD64/ACPI/ACPIManager.hpp6
-rw-r--r--Private/HALKit/AMD64/ACPIManagerAMD64.cpp8
-rw-r--r--Private/HALKit/AMD64/CoreInterruptHandlerAMD64.cpp70
-rw-r--r--Private/HALKit/AMD64/CoreMultiProcessingAMD64.cpp6
-rw-r--r--Private/HALKit/AMD64/CoreSyscallHandlerAMD64.cpp8
-rw-r--r--Private/HALKit/AMD64/DebugManager.asm4
-rw-r--r--Private/HALKit/AMD64/DebugOutput.cxx10
-rw-r--r--Private/HALKit/AMD64/DebugPort.cxx6
-rw-r--r--Private/HALKit/AMD64/HalPageAlloc.cpp12
-rw-r--r--Private/HALKit/AMD64/HalPageAlloc.hpp24
-rw-r--r--Private/HALKit/AMD64/HardwareAPIC.cpp6
-rw-r--r--Private/HALKit/AMD64/HardwareInit.cpp6
-rw-r--r--Private/HALKit/AMD64/Hypervisor.hpp6
-rw-r--r--Private/HALKit/AMD64/InstallTIB.asm2
-rw-r--r--Private/HALKit/AMD64/PCI/Database.cpp4
-rw-r--r--Private/HALKit/AMD64/PCI/Device.cpp28
-rw-r--r--Private/HALKit/AMD64/PCI/Dma.cpp6
-rw-r--r--Private/HALKit/AMD64/PCI/Express.cpp4
-rw-r--r--Private/HALKit/AMD64/PCI/IO.cpp2
-rw-r--r--Private/HALKit/AMD64/PCI/Iterator.cpp6
-rw-r--r--Private/HALKit/AMD64/PCI/PCI.cpp2
-rw-r--r--Private/HALKit/AMD64/PlatformAMD64.cpp6
-rw-r--r--Private/HALKit/AMD64/ProcessPrimitives.cxx4
-rw-r--r--Private/HALKit/AMD64/Processor.cpp6
-rw-r--r--Private/HALKit/AMD64/Processor.hpp22
-rw-r--r--Private/HALKit/AMD64/SMPCoreManager.asm2
-rw-r--r--Private/HALKit/AMD64/StartSequence.asm2
-rw-r--r--Private/HALKit/Alpha/CoreSyscallHandlerDEC.cpp8
-rw-r--r--Private/HALKit/Alpha/Processor.hpp2
-rw-r--r--Private/HALKit/PowerPC/CoreContextSwitchPowerPC.s2
-rw-r--r--Private/HALKit/PowerPC/CoreSyscallHandlerPowerPC.cpp8
-rw-r--r--Private/HALKit/PowerPC/Processor.cpp10
-rw-r--r--Private/HALKit/PowerPC/Processor.hpp10
34 files changed, 157 insertions, 157 deletions
diff --git a/Private/HALKit/AMD64/ACPI/ACPI.hpp b/Private/HALKit/AMD64/ACPI/ACPI.hpp
index aa408c6f..a9e9fa79 100644
--- a/Private/HALKit/AMD64/ACPI/ACPI.hpp
+++ b/Private/HALKit/AMD64/ACPI/ACPI.hpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore Date Added: 13/02/2023
+ * HCore Date Added: 13/02/2023
* Copyright Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -12,7 +12,7 @@
#include <NewKit/Defines.hpp>
-namespace hCore {
+namespace HCore {
class SDT {
public:
Char Signature[4];
@@ -60,6 +60,6 @@ class Address {
UInt8 Reserved;
UIntPtr Address;
};
-} // namespace hCore
+} // namespace HCore
#endif // !_INC_ACPI_MANAGER_H
diff --git a/Private/HALKit/AMD64/ACPI/ACPIManager.hpp b/Private/HALKit/AMD64/ACPI/ACPIManager.hpp
index da01f1c7..2eafe5ed 100644
--- a/Private/HALKit/AMD64/ACPI/ACPIManager.hpp
+++ b/Private/HALKit/AMD64/ACPI/ACPIManager.hpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore Date Added: 20/02/2023
+ * HCore Date Added: 20/02/2023
* Copyright Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -15,7 +15,7 @@
#include <NewKit/Defines.hpp>
#include <NewKit/Ref.hpp>
-namespace hCore {
+namespace HCore {
class ACPIManager {
public:
explicit ACPIManager(voidPtr rsdptr);
@@ -44,6 +44,6 @@ class ACPIManager {
SSizeT m_Entries; // number of entries, -1 tells that no invalid entries were
// found.
};
-} // namespace hCore
+} // namespace HCore
#endif // !_INC_ACPI_H
diff --git a/Private/HALKit/AMD64/ACPIManagerAMD64.cpp b/Private/HALKit/AMD64/ACPIManagerAMD64.cpp
index 0ca172a9..720ce0f2 100644
--- a/Private/HALKit/AMD64/ACPIManagerAMD64.cpp
+++ b/Private/HALKit/AMD64/ACPIManagerAMD64.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -11,7 +11,7 @@
#include <HALKit/AMD64/Processor.hpp>
#include <NewKit/String.hpp>
-namespace hCore {
+namespace HCore {
ACPIManager::ACPIManager(voidPtr rsdPtr) : m_Rsdp(rsdPtr), m_Entries(0) {
RSDP *_rsdPtr = reinterpret_cast<RSDP *>(this->m_Rsdp);
@@ -37,7 +37,7 @@ ErrorOr<voidPtr> ACPIManager::Find(const char *signature) {
for (Size index = 0; index < num; ++index) {
SDT *sdt = reinterpret_cast<SDT *>(xsdt + sizeof(SDT) + index * 8);
- if (!Checksum(sdt->Signature, 4)) panic(RUNTIME_CHECK_ACPI);
+ if (!Checksum(sdt->Signature, 4)) ke_stop(RUNTIME_CHECK_ACPI);
if (StringBuilder::Equals(const_cast<const char *>(sdt->Signature),
signature))
@@ -66,4 +66,4 @@ void rt_shutdown_acpi_qemu_30_plus(void) { HAL::out16(0x604, 0x2000); }
void rt_shutdown_acpi_virtualbox(void) { HAL::out16(0x4004, 0x3400); }
/// you'll have to parse the MADT otherwise!
-} // namespace hCore
+} // namespace HCore
diff --git a/Private/HALKit/AMD64/CoreInterruptHandlerAMD64.cpp b/Private/HALKit/AMD64/CoreInterruptHandlerAMD64.cpp
index 23262109..bed77b50 100644
--- a/Private/HALKit/AMD64/CoreInterruptHandlerAMD64.cpp
+++ b/Private/HALKit/AMD64/CoreInterruptHandlerAMD64.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -11,71 +11,71 @@
#include <KernelKit/ProcessManager.hpp>
#include <NewKit/String.hpp>
-extern "C" void idt_handle_system_call(hCore::UIntPtr rsp) {
- hCore::HAL::StackFrame *sf = reinterpret_cast<hCore::HAL::StackFrame *>(rsp);
+extern "C" void idt_handle_system_call(HCore::UIntPtr rsp) {
+ HCore::HAL::StackFrame *sf = reinterpret_cast<HCore::HAL::StackFrame *>(rsp);
rt_syscall_handle(sf);
- hCore::kcout << "System Call with ID: "
- << hCore::StringBuilder::FromInt("syscall{%}", sf->SID);
+ HCore::kcout << "System Call with ID: "
+ << HCore::StringBuilder::FromInt("syscall{%}", sf->SID);
}
-extern "C" void idt_handle_gpf(hCore::UIntPtr rsp) {
- MUST_PASS(hCore::ProcessManager::Shared().Leak().GetCurrent());
+extern "C" void idt_handle_gpf(HCore::UIntPtr rsp) {
+ MUST_PASS(HCore::ProcessManager::Shared().Leak().GetCurrent());
- hCore::kcout << hCore::StringBuilder::FromInt("sp{%}", rsp);
+ HCore::kcout << HCore::StringBuilder::FromInt("sp{%}", rsp);
- hCore::kcout
+ HCore::kcout
<< "General Protection Fault, Caused by "
- << hCore::ProcessManager::Shared().Leak().GetCurrent().Leak().GetName();
+ << HCore::ProcessManager::Shared().Leak().GetCurrent().Leak().GetName();
- hCore::ProcessManager::Shared().Leak().GetCurrent().Leak().Crash();
+ HCore::ProcessManager::Shared().Leak().GetCurrent().Leak().Crash();
}
-extern "C" void idt_handle_scheduler(hCore::UIntPtr rsp) {
- hCore::kcout << hCore::StringBuilder::FromInt("sp{%}", rsp);
+extern "C" void idt_handle_scheduler(HCore::UIntPtr rsp) {
+ HCore::kcout << HCore::StringBuilder::FromInt("sp{%}", rsp);
- hCore::kcout
+ HCore::kcout
<< "Will be scheduled back later "
- << hCore::ProcessManager::Shared().Leak().GetCurrent().Leak().GetName();
+ << HCore::ProcessManager::Shared().Leak().GetCurrent().Leak().GetName();
/// schedule another process.
- if (!hCore::ProcessHelper::StartScheduling()) {
- hCore::kcout << "Let's continue schedule this process...\r\n";
+ if (!HCore::ProcessHelper::StartScheduling()) {
+ HCore::kcout << "Let's continue schedule this process...\r\n";
}
}
-extern "C" void idt_handle_pf(hCore::UIntPtr rsp) {
- hCore::kcout << hCore::StringBuilder::FromInt("sp{%}", rsp);
+extern "C" void idt_handle_pf(HCore::UIntPtr rsp) {
+ HCore::kcout << HCore::StringBuilder::FromInt("sp{%}", rsp);
- MUST_PASS(hCore::ProcessManager::Shared().Leak().GetCurrent());
+ MUST_PASS(HCore::ProcessManager::Shared().Leak().GetCurrent());
- hCore::kcout
+ HCore::kcout
<< "Segmentation Fault, Caused by "
- << hCore::ProcessManager::Shared().Leak().GetCurrent().Leak().GetName();
+ << HCore::ProcessManager::Shared().Leak().GetCurrent().Leak().GetName();
- hCore::ProcessManager::Shared().Leak().GetCurrent().Leak().Crash();
+ HCore::ProcessManager::Shared().Leak().GetCurrent().Leak().Crash();
}
-extern "C" void idt_handle_math(hCore::UIntPtr rsp) {
- hCore::kcout << hCore::StringBuilder::FromInt("sp{%}", rsp);
+extern "C" void idt_handle_math(HCore::UIntPtr rsp) {
+ HCore::kcout << HCore::StringBuilder::FromInt("sp{%}", rsp);
- MUST_PASS(hCore::ProcessManager::Shared().Leak().GetCurrent());
+ MUST_PASS(HCore::ProcessManager::Shared().Leak().GetCurrent());
- hCore::kcout
+ HCore::kcout
<< "Math error, Caused by "
- << hCore::ProcessManager::Shared().Leak().GetCurrent().Leak().GetName();
+ << HCore::ProcessManager::Shared().Leak().GetCurrent().Leak().GetName();
- hCore::ProcessManager::Shared().Leak().GetCurrent().Leak().Crash();
+ HCore::ProcessManager::Shared().Leak().GetCurrent().Leak().Crash();
}
-extern "C" void idt_handle_generic(hCore::UIntPtr rsp) {
- hCore::kcout << hCore::StringBuilder::FromInt("sp{%}", rsp);
+extern "C" void idt_handle_generic(HCore::UIntPtr rsp) {
+ HCore::kcout << HCore::StringBuilder::FromInt("sp{%}", rsp);
- MUST_PASS(hCore::ProcessManager::Shared().Leak().GetCurrent());
+ MUST_PASS(HCore::ProcessManager::Shared().Leak().GetCurrent());
- hCore::kcout
+ HCore::kcout
<< "Processor error, Caused by "
- << hCore::ProcessManager::Shared().Leak().GetCurrent().Leak().GetName();
+ << HCore::ProcessManager::Shared().Leak().GetCurrent().Leak().GetName();
- hCore::ProcessManager::Shared().Leak().GetCurrent().Leak().Crash();
+ HCore::ProcessManager::Shared().Leak().GetCurrent().Leak().Crash();
}
diff --git a/Private/HALKit/AMD64/CoreMultiProcessingAMD64.cpp b/Private/HALKit/AMD64/CoreMultiProcessingAMD64.cpp
index 330a90e6..e46805fb 100644
--- a/Private/HALKit/AMD64/CoreMultiProcessingAMD64.cpp
+++ b/Private/HALKit/AMD64/CoreMultiProcessingAMD64.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -14,7 +14,7 @@
//! NOTE: fGSI stands 'Field Global System Interrupt'
-namespace hCore::HAL {
+namespace HCore::HAL {
constexpr Int32 kThreadAPIC = 0;
constexpr Int32 kThreadLAPIC = 1;
constexpr Int32 kThreadIOAPIC = 2;
@@ -122,6 +122,6 @@ void system_get_cores(voidPtr rsdPtr) {
++counter;
}
}
-} // namespace hCore::HAL
+} // namespace HCore::HAL
///////////////////////////////////////////////////////////////////////////////////////
diff --git a/Private/HALKit/AMD64/CoreSyscallHandlerAMD64.cpp b/Private/HALKit/AMD64/CoreSyscallHandlerAMD64.cpp
index ccd81b9a..314cba0e 100644
--- a/Private/HALKit/AMD64/CoreSyscallHandlerAMD64.cpp
+++ b/Private/HALKit/AMD64/CoreSyscallHandlerAMD64.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -11,13 +11,13 @@
#include <HALKit/AMD64/Processor.hpp>
#include <KernelKit/PermissionSelector.hxx>
-hCore::Array<void (*)(hCore::Int32 id, hCore::HAL::StackFrame *), kMaxSyscalls>
+HCore::Array<void (*)(HCore::Int32 id, HCore::HAL::StackFrame *), kMaxSyscalls>
kSyscalls;
// IDT System Call Handler.
// NOTE: don't trust the user.
-extern "C" void rt_syscall_handle(hCore::HAL::StackFrame *stack) {
- for (hCore::SizeT index = 0UL; index < kMaxSyscalls; ++index) {
+extern "C" void rt_syscall_handle(HCore::HAL::StackFrame *stack) {
+ for (HCore::SizeT index = 0UL; index < kMaxSyscalls; ++index) {
(kSyscalls[index].Leak().Leak())(stack->SID, stack);
}
}
diff --git a/Private/HALKit/AMD64/DebugManager.asm b/Private/HALKit/AMD64/DebugManager.asm
index 96c7e2f3..f89be7f8 100644
--- a/Private/HALKit/AMD64/DebugManager.asm
+++ b/Private/HALKit/AMD64/DebugManager.asm
@@ -1,7 +1,7 @@
;; /*
;; * ========================================================
;; *
-;; * hCore
+;; * HCore
;; * Copyright 2024 Mahrouss Logic, all rights reserved.
;; *
;; * ========================================================
@@ -13,7 +13,7 @@
;; //////////////////////////////////////////////////// ;;
__rt_debug_record_table:
- db "DebugMgr/hCore", 0xa, 0xd, 0
+ db "DebugMgr/HCore", 0xa, 0xd, 0
;; User Data goes there
resb 64
__rt_debug_int_3:
diff --git a/Private/HALKit/AMD64/DebugOutput.cxx b/Private/HALKit/AMD64/DebugOutput.cxx
index 123ad4c6..1662b26b 100644
--- a/Private/HALKit/AMD64/DebugOutput.cxx
+++ b/Private/HALKit/AMD64/DebugOutput.cxx
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -11,7 +11,7 @@
#include <KernelKit/DebugOutput.hpp>
#include <NewKit/Utils.hpp>
-namespace hCore {
+namespace HCore {
enum CommStatus {
kStateReady = 0xCF,
kStateTransmit = 0xFC,
@@ -39,7 +39,7 @@ bool serial_init() {
// Check if serial is faulty (i.e: not same byte as sent)
if (HAL::in8(PORT) != 0xAE) {
- panic(RUNTIME_CHECK_HANDSHAKE);
+ ke_stop(RUNTIME_CHECK_HANDSHAKE);
}
kReady = kStateReady;
@@ -69,5 +69,5 @@ void system_io_print(const char *bytes) {
Detail::kState = kStateReady;
}
-TerminalDevice kcout(hCore::system_io_print, nullptr);
-} // namespace hCore
+TerminalDevice kcout(HCore::system_io_print, nullptr);
+} // namespace HCore
diff --git a/Private/HALKit/AMD64/DebugPort.cxx b/Private/HALKit/AMD64/DebugPort.cxx
index 764aab0a..5c44d48e 100644
--- a/Private/HALKit/AMD64/DebugPort.cxx
+++ b/Private/HALKit/AMD64/DebugPort.cxx
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -28,7 +28,7 @@
// after that we have start of additional data.
-namespace hCore {
+namespace HCore {
typedef Char rt_debug_type[255];
class DebuggerPorts final {
@@ -56,4 +56,4 @@ void rt_debug_listen(DebuggerPorts* theHook) noexcept {
if (HAL::in16(theHook->fPort[i] != kDebugUnboundPort)) theHook->fBoundCnt++;
}
}
-} // namespace hCore
+} // namespace HCore
diff --git a/Private/HALKit/AMD64/HalPageAlloc.cpp b/Private/HALKit/AMD64/HalPageAlloc.cpp
index 25757942..6c7bd69b 100644
--- a/Private/HALKit/AMD64/HalPageAlloc.cpp
+++ b/Private/HALKit/AMD64/HalPageAlloc.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -9,14 +9,14 @@
#include <HALKit/AMD64/HalPageAlloc.hpp>
#include <NewKit/Defines.hpp>
-#include <NewKit/Panic.hpp>
+#include <NewKit/RuntimeCheck.hpp>
// this files handles paging.
-static hCore::UIntPtr kPagePtr = kPagePtrAddress;
-static hCore::SizeT kPageCnt = 0UL;
+static HCore::UIntPtr kPagePtr = kPagePtrAddress;
+static HCore::SizeT kPageCnt = 0UL;
-namespace hCore {
+namespace HCore {
namespace HAL {
static auto hal_try_alloc_new_page(SizeT sz, Boolean rw, Boolean user)
-> PageTable64 * {
@@ -53,4 +53,4 @@ auto hal_create_page(Boolean rw, Boolean user) -> UIntPtr {
return reinterpret_cast<UIntPtr>(new_pte);
}
} // namespace HAL
-} // namespace hCore
+} // namespace HCore
diff --git a/Private/HALKit/AMD64/HalPageAlloc.hpp b/Private/HALKit/AMD64/HalPageAlloc.hpp
index dc954153..be00bd3c 100644
--- a/Private/HALKit/AMD64/HalPageAlloc.hpp
+++ b/Private/HALKit/AMD64/HalPageAlloc.hpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -21,15 +21,15 @@
#define kPagePtrAddress 0x0900000
-extern "C" void flush_tlb(hCore::UIntPtr VirtualAddr);
-extern "C" void write_cr3(hCore::UIntPtr pde);
-extern "C" void write_cr0(hCore::UIntPtr bit);
+extern "C" void flush_tlb(HCore::UIntPtr VirtualAddr);
+extern "C" void write_cr3(HCore::UIntPtr pde);
+extern "C" void write_cr0(HCore::UIntPtr bit);
-extern "C" hCore::UIntPtr read_cr0();
-extern "C" hCore::UIntPtr read_cr2();
-extern "C" hCore::UIntPtr read_cr3();
+extern "C" HCore::UIntPtr read_cr0();
+extern "C" HCore::UIntPtr read_cr2();
+extern "C" HCore::UIntPtr read_cr3();
-namespace hCore::HAL {
+namespace HCore::HAL {
struct PageTable64 {
bool Present : 1;
bool Rw : 1;
@@ -37,13 +37,13 @@ struct PageTable64 {
bool Wt : 1;
bool Cache : 1;
bool Accessed : 1;
- hCore::Int32 Reserved : 6;
- hCore::UIntPtr PhysicalAddress : 36;
- hCore::Int32 Reserved1 : 15;
+ HCore::Int32 Reserved : 6;
+ HCore::UIntPtr PhysicalAddress : 36;
+ HCore::Int32 Reserved1 : 15;
bool ExecDisable : 1;
};
PageTable64 *hal_alloc_page(SizeT sz, Boolean rw, Boolean user);
UIntPtr hal_create_page(Boolean rw, Boolean user);
-} // namespace hCore::HAL
+} // namespace HCore::HAL
diff --git a/Private/HALKit/AMD64/HardwareAPIC.cpp b/Private/HALKit/AMD64/HardwareAPIC.cpp
index 9a058eae..6d77a8b5 100644
--- a/Private/HALKit/AMD64/HardwareAPIC.cpp
+++ b/Private/HALKit/AMD64/HardwareAPIC.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -11,7 +11,7 @@
// bugs = 0
-namespace hCore {
+namespace HCore {
// @brief wakes up thread.
// wakes up thread from hang.
void rt_wakeup_thread(HAL::StackFrame* stack) {
@@ -39,4 +39,4 @@ void rt_hang_thread(HAL::StackFrame* stack) {
__asm__ volatile("sti");
}
-} // namespace hCore
+} // namespace HCore
diff --git a/Private/HALKit/AMD64/HardwareInit.cpp b/Private/HALKit/AMD64/HardwareInit.cpp
index 7d769bfa..db84226b 100644
--- a/Private/HALKit/AMD64/HardwareInit.cpp
+++ b/Private/HALKit/AMD64/HardwareInit.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -11,10 +11,10 @@
// bugs = 0
-namespace hCore {
+namespace HCore {
bool init_hal() {
// TODO: Hardware Specific stuff.
return true;
}
-} // namespace hCore
+} // namespace HCore
diff --git a/Private/HALKit/AMD64/Hypervisor.hpp b/Private/HALKit/AMD64/Hypervisor.hpp
index c830ef00..1154baf3 100644
--- a/Private/HALKit/AMD64/Hypervisor.hpp
+++ b/Private/HALKit/AMD64/Hypervisor.hpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -11,7 +11,7 @@
#include <NewKit/Defines.hpp>
-namespace hCore {
+namespace HCore {
MAKE_STRING_ENUM(HYPERVISOR)
ENUM_STRING(Qemu, "TCGTCGTCGTCG");
ENUM_STRING(KVM, " KVMKVMKVM ");
@@ -25,4 +25,4 @@ ENUM_STRING(Bhyve, "bhyve bhyve ");
ENUM_STRING(Qnx, " QNXQVMBSQG ");
END_STRING_ENUM()
-} // namespace hCore
+} // namespace HCore
diff --git a/Private/HALKit/AMD64/InstallTIB.asm b/Private/HALKit/AMD64/InstallTIB.asm
index 6957e1a6..dd0fcd26 100644
--- a/Private/HALKit/AMD64/InstallTIB.asm
+++ b/Private/HALKit/AMD64/InstallTIB.asm
@@ -1,7 +1,7 @@
;; /*
;; * ========================================================
;; *
-;; * hCore
+;; * HCore
;; * Copyright 2024 Mahrouss Logic, all rights reserved.
;; *
;; * ========================================================
diff --git a/Private/HALKit/AMD64/PCI/Database.cpp b/Private/HALKit/AMD64/PCI/Database.cpp
index daf4bc61..f7f8fabc 100644
--- a/Private/HALKit/AMD64/PCI/Database.cpp
+++ b/Private/HALKit/AMD64/PCI/Database.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -9,4 +9,4 @@
#include <KernelKit/PCI/Database.hpp>
-namespace hCore {}
+namespace HCore {}
diff --git a/Private/HALKit/AMD64/PCI/Device.cpp b/Private/HALKit/AMD64/PCI/Device.cpp
index 597e936b..f3da65f7 100644
--- a/Private/HALKit/AMD64/PCI/Device.cpp
+++ b/Private/HALKit/AMD64/PCI/Device.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -10,29 +10,29 @@
#include <ArchKit/Arch.hpp>
#include <KernelKit/PCI/Device.hpp>
-hCore::UInt LumiaPCIReadRaw(hCore::UInt bar, hCore::UShort bus,
- hCore::UShort dev, hCore::UShort fun) {
- hCore::UInt target = 0x80000000 | ((hCore::UInt)bus << 16) |
- ((hCore::UInt)dev << 11) | ((hCore::UInt)fun << 8) |
+HCore::UInt LumiaPCIReadRaw(HCore::UInt bar, HCore::UShort bus,
+ HCore::UShort dev, HCore::UShort fun) {
+ HCore::UInt target = 0x80000000 | ((HCore::UInt)bus << 16) |
+ ((HCore::UInt)dev << 11) | ((HCore::UInt)fun << 8) |
(bar & 0xFC);
- hCore::HAL::out32((hCore::UShort)hCore::PCI::PciConfigKind::ConfigAddress,
+ HCore::HAL::out32((HCore::UShort)HCore::PCI::PciConfigKind::ConfigAddress,
target);
- return hCore::HAL::in32((hCore::UShort)hCore::PCI::PciConfigKind::ConfigData);
+ return HCore::HAL::in32((HCore::UShort)HCore::PCI::PciConfigKind::ConfigData);
}
-void LumiaPCISetCfgTarget(hCore::UInt bar, hCore::UShort bus, hCore::UShort dev,
- hCore::UShort fun) {
- hCore::UInt target = 0x80000000 | ((hCore::UInt)bus << 16) |
- ((hCore::UInt)dev << 11) | ((hCore::UInt)fun << 8) |
+void LumiaPCISetCfgTarget(HCore::UInt bar, HCore::UShort bus, HCore::UShort dev,
+ HCore::UShort fun) {
+ HCore::UInt target = 0x80000000 | ((HCore::UInt)bus << 16) |
+ ((HCore::UInt)dev << 11) | ((HCore::UInt)fun << 8) |
(bar & ~3);
- hCore::HAL::out32((hCore::UShort)hCore::PCI::PciConfigKind::ConfigAddress,
+ HCore::HAL::out32((HCore::UShort)HCore::PCI::PciConfigKind::ConfigAddress,
target);
}
-namespace hCore::PCI {
+namespace HCore::PCI {
Device::Device(UShort bus, UShort device, UShort func, UShort bar)
: m_Bus(bus), m_Device(device), m_Function(func), m_Bar(bar) {}
@@ -109,4 +109,4 @@ UShort Device::Vendor() {
}
Device::operator bool() { return VendorId() != (UShort)PciConfigKind::Invalid; }
-} // namespace hCore::PCI
+} // namespace HCore::PCI
diff --git a/Private/HALKit/AMD64/PCI/Dma.cpp b/Private/HALKit/AMD64/PCI/Dma.cpp
index e52ef743..03394628 100644
--- a/Private/HALKit/AMD64/PCI/Dma.cpp
+++ b/Private/HALKit/AMD64/PCI/Dma.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -9,7 +9,7 @@
#include <KernelKit/PCI/Dma.hpp>
-namespace hCore {
+namespace HCore {
DMAWrapper::operator bool() { return m_Address; }
bool DMAWrapper::operator!() { return !m_Address; }
@@ -63,4 +63,4 @@ DMAWrapper &DMAWrapper::operator=(voidPtr Ptr) {
m_Address = Ptr;
return *this;
}
-} // namespace hCore
+} // namespace HCore
diff --git a/Private/HALKit/AMD64/PCI/Express.cpp b/Private/HALKit/AMD64/PCI/Express.cpp
index eaf886b7..4a7bf20c 100644
--- a/Private/HALKit/AMD64/PCI/Express.cpp
+++ b/Private/HALKit/AMD64/PCI/Express.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -9,4 +9,4 @@
#include <KernelKit/PCI/Express.hpp>
-namespace hCore {}
+namespace HCore {}
diff --git a/Private/HALKit/AMD64/PCI/IO.cpp b/Private/HALKit/AMD64/PCI/IO.cpp
index fb3ffb27..0e168477 100644
--- a/Private/HALKit/AMD64/PCI/IO.cpp
+++ b/Private/HALKit/AMD64/PCI/IO.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
diff --git a/Private/HALKit/AMD64/PCI/Iterator.cpp b/Private/HALKit/AMD64/PCI/Iterator.cpp
index 3d357901..35d0916a 100644
--- a/Private/HALKit/AMD64/PCI/Iterator.cpp
+++ b/Private/HALKit/AMD64/PCI/Iterator.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -12,7 +12,7 @@
#define PCI_ITERATOR_FIND_AND_UNWRAP(DEV, SZ) \
if (DEV.Leak()) return DEV.Leak();
-namespace hCore::PCI {
+namespace HCore::PCI {
Iterator::Iterator(const Types::PciDeviceKind &type) {
// probe devices.
for (int bus = 0; bus < ME_BUS_COUNT; ++bus) {
@@ -34,4 +34,4 @@ Ref<PCI::Device> Iterator::operator[](const Size &sz) {
PCI_ITERATOR_FIND_AND_UNWRAP(m_Devices[sz], sz);
return {};
}
-} // namespace hCore::PCI
+} // namespace HCore::PCI
diff --git a/Private/HALKit/AMD64/PCI/PCI.cpp b/Private/HALKit/AMD64/PCI/PCI.cpp
index 833bce22..ea239e6f 100644
--- a/Private/HALKit/AMD64/PCI/PCI.cpp
+++ b/Private/HALKit/AMD64/PCI/PCI.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
diff --git a/Private/HALKit/AMD64/PlatformAMD64.cpp b/Private/HALKit/AMD64/PlatformAMD64.cpp
index 3005cc07..1c0d560d 100644
--- a/Private/HALKit/AMD64/PlatformAMD64.cpp
+++ b/Private/HALKit/AMD64/PlatformAMD64.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -9,7 +9,7 @@
#include <ArchKit/Arch.hpp>
-namespace hCore::HAL {
+namespace HCore::HAL {
namespace Detail {
struct RegisterAMD64 final {
UIntPtr base;
@@ -44,4 +44,4 @@ void IDTLoader::Load(Register64 &idt) {
void GDTLoader::Load(Ref<Register64> &gdt) { GDTLoader::Load(gdt.Leak()); }
void IDTLoader::Load(Ref<Register64> &idt) { IDTLoader::Load(idt.Leak()); }
-} // namespace hCore::HAL
+} // namespace HCore::HAL
diff --git a/Private/HALKit/AMD64/ProcessPrimitives.cxx b/Private/HALKit/AMD64/ProcessPrimitives.cxx
index 557eb7f0..8d0554f3 100644
--- a/Private/HALKit/AMD64/ProcessPrimitives.cxx
+++ b/Private/HALKit/AMD64/ProcessPrimitives.cxx
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -11,7 +11,7 @@
#include "NewKit/Defines.hpp"
-using namespace hCore;
+using namespace HCore;
Void Process::AssignStart(UIntPtr &imageStart) noexcept {
if (imageStart == 0) this->Crash();
diff --git a/Private/HALKit/AMD64/Processor.cpp b/Private/HALKit/AMD64/Processor.cpp
index 893f4a58..3d509f79 100644
--- a/Private/HALKit/AMD64/Processor.cpp
+++ b/Private/HALKit/AMD64/Processor.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -14,7 +14,7 @@
* @brief This file is about processor specific functions (in/out...)
*/
-namespace hCore::HAL {
+namespace HCore::HAL {
void out8(UInt16 port, UInt8 value) {
asm volatile("outb %%al, %1" : : "a"(value), "Nd"(port) : "memory");
}
@@ -55,4 +55,4 @@ void rt_cli() { asm volatile("cli"); }
void rt_sti() { asm volatile("sti"); }
void rt_cld() { asm volatile("cld"); }
-} // namespace hCore::HAL
+} // namespace HCore::HAL
diff --git a/Private/HALKit/AMD64/Processor.hpp b/Private/HALKit/AMD64/Processor.hpp
index 82eed130..dc258bcc 100644
--- a/Private/HALKit/AMD64/Processor.hpp
+++ b/Private/HALKit/AMD64/Processor.hpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -16,7 +16,7 @@
#define IsActiveLow(flag) (flag & 2)
#define IsLevelTriggered(flag) (flag & 8)
-namespace hCore::HAL {
+namespace HCore::HAL {
extern "C" UChar in8(UInt16 port);
extern "C" UShort in16(UInt16 port);
extern "C" UInt in32(UInt16 port);
@@ -112,12 +112,12 @@ class IDTLoader final {
};
void system_get_cores(voidPtr rsdPtr);
-} // namespace hCore::HAL
-
-extern "C" void idt_handle_system_call(hCore::UIntPtr rsp);
-extern "C" void idt_handle_generic(hCore::UIntPtr rsp);
-extern "C" void load_idt(hCore::voidPtr ptr);
-extern "C" void load_gdt(hCore::voidPtr ptr);
-extern "C" void idt_handle_gpf(hCore::UIntPtr rsp);
-extern "C" void idt_handle_math(hCore::UIntPtr rsp);
-extern "C" void idt_handle_pf(hCore::UIntPtr rsp);
+} // namespace HCore::HAL
+
+extern "C" void idt_handle_system_call(HCore::UIntPtr rsp);
+extern "C" void idt_handle_generic(HCore::UIntPtr rsp);
+extern "C" void load_idt(HCore::voidPtr ptr);
+extern "C" void load_gdt(HCore::voidPtr ptr);
+extern "C" void idt_handle_gpf(HCore::UIntPtr rsp);
+extern "C" void idt_handle_math(HCore::UIntPtr rsp);
+extern "C" void idt_handle_pf(HCore::UIntPtr rsp);
diff --git a/Private/HALKit/AMD64/SMPCoreManager.asm b/Private/HALKit/AMD64/SMPCoreManager.asm
index 40664a7e..575375ae 100644
--- a/Private/HALKit/AMD64/SMPCoreManager.asm
+++ b/Private/HALKit/AMD64/SMPCoreManager.asm
@@ -1,7 +1,7 @@
;; /*
;; * ========================================================
;; *
-;; * hCore
+;; * HCore
;; * Copyright 2024 Mahrouss Logic, all rights reserved.
;; *
;; * ========================================================
diff --git a/Private/HALKit/AMD64/StartSequence.asm b/Private/HALKit/AMD64/StartSequence.asm
index efb90843..a6f0c3b5 100644
--- a/Private/HALKit/AMD64/StartSequence.asm
+++ b/Private/HALKit/AMD64/StartSequence.asm
@@ -1,7 +1,7 @@
;; /*
;; * ========================================================
;; *
-;; * hCore
+;; * HCore
;; * Copyright 2024 Mahrouss Logic, all rights reserved.
;; *
;; * ========================================================
diff --git a/Private/HALKit/Alpha/CoreSyscallHandlerDEC.cpp b/Private/HALKit/Alpha/CoreSyscallHandlerDEC.cpp
index 3f8cf800..0881f9c6 100644
--- a/Private/HALKit/Alpha/CoreSyscallHandlerDEC.cpp
+++ b/Private/HALKit/Alpha/CoreSyscallHandlerDEC.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -10,11 +10,11 @@
#include <ArchKit/Arch.hpp>
#include <HALKit/Alpha/Processor.hpp>
-hCore::Array<void (*)(hCore::Int32 id, hCore::HAL::StackFrame *), kMaxSyscalls> kSyscalls;
+HCore::Array<void (*)(HCore::Int32 id, HCore::HAL::StackFrame *), kMaxSyscalls> kSyscalls;
-extern "C" void rt_syscall_handle(hCore::HAL::StackFrame *stack)
+extern "C" void rt_syscall_handle(HCore::HAL::StackFrame *stack)
{
- for (hCore::SizeT index = 0UL; index < kMaxSyscalls; ++index)
+ for (HCore::SizeT index = 0UL; index < kMaxSyscalls; ++index)
{
(kSyscalls[index].Leak().Leak())(stack->ID, stack);
}
diff --git a/Private/HALKit/Alpha/Processor.hpp b/Private/HALKit/Alpha/Processor.hpp
index 7c744e19..e6a00db3 100644
--- a/Private/HALKit/Alpha/Processor.hpp
+++ b/Private/HALKit/Alpha/Processor.hpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright Mahrouss Logic, all rights reserved.
*
* ========================================================
diff --git a/Private/HALKit/PowerPC/CoreContextSwitchPowerPC.s b/Private/HALKit/PowerPC/CoreContextSwitchPowerPC.s
index a33ff931..04a0cbbf 100644
--- a/Private/HALKit/PowerPC/CoreContextSwitchPowerPC.s
+++ b/Private/HALKit/PowerPC/CoreContextSwitchPowerPC.s
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
diff --git a/Private/HALKit/PowerPC/CoreSyscallHandlerPowerPC.cpp b/Private/HALKit/PowerPC/CoreSyscallHandlerPowerPC.cpp
index ee300501..6985f964 100644
--- a/Private/HALKit/PowerPC/CoreSyscallHandlerPowerPC.cpp
+++ b/Private/HALKit/PowerPC/CoreSyscallHandlerPowerPC.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -10,11 +10,11 @@
#include <ArchKit/Arch.hpp>
#include <NewKit/Array.hpp>
-hCore::Array<void (*)(hCore::Int32 id, hCore::HAL::StackFrame *), kMaxSyscalls>
+HCore::Array<void (*)(HCore::Int32 id, HCore::HAL::StackFrame *), kMaxSyscalls>
kSyscalls;
-extern "C" void rt_syscall_handle(hCore::HAL::StackFrame *stack) {
- for (hCore::SizeT index = 0UL; index < kMaxSyscalls; ++index) {
+extern "C" void rt_syscall_handle(HCore::HAL::StackFrame *stack) {
+ for (HCore::SizeT index = 0UL; index < kMaxSyscalls; ++index) {
(kSyscalls[index].Leak().Leak())(stack->ID, stack);
}
}
diff --git a/Private/HALKit/PowerPC/Processor.cpp b/Private/HALKit/PowerPC/Processor.cpp
index e3b207c6..9ac0953e 100644
--- a/Private/HALKit/PowerPC/Processor.cpp
+++ b/Private/HALKit/PowerPC/Processor.cpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -12,9 +12,9 @@
extern "C" void flush_tlb() {}
extern "C" void rt_wait_for_io() {}
-extern "C" hCore::HAL::StackFrame* rt_get_current_context() {}
+extern "C" HCore::HAL::StackFrame* rt_get_current_context() {}
-namespace hCore {
+namespace HCore {
namespace HAL {
UIntPtr hal_create_page(bool rw, bool user) { return 0; }
@@ -44,5 +44,5 @@ void system_io_print(const char* bytes) {
}
}
-TerminalDevice kcout(hCore::system_io_print, nullptr);
-} // namespace hCore
+TerminalDevice kcout(HCore::system_io_print, nullptr);
+} // namespace HCore
diff --git a/Private/HALKit/PowerPC/Processor.hpp b/Private/HALKit/PowerPC/Processor.hpp
index 5fc0dcb2..a29454c9 100644
--- a/Private/HALKit/PowerPC/Processor.hpp
+++ b/Private/HALKit/PowerPC/Processor.hpp
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * hCore
+ * HCore
* Copyright 2024 Mahrouss Logic, all rights reserved.
*
* ========================================================
@@ -14,7 +14,7 @@
#define __aligned __attribute__((aligned(4)))
-namespace hCore::HAL {
+namespace HCore::HAL {
typedef UIntPtr Reg;
struct __aligned StackFrame {
@@ -37,8 +37,8 @@ inline void rt_halt() {
}
inline void rt_cli() {}
-} // namespace hCore::HAL
+} // namespace HCore::HAL
-extern "C" void int_handle_math(hCore::UIntPtr sp);
-extern "C" void int_handle_pf(hCore::UIntPtr sp);
+extern "C" void int_handle_math(HCore::UIntPtr sp);
+extern "C" void int_handle_pf(HCore::UIntPtr sp);
extern "C" void* __ppc_alloca(size_t sz);