summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-29 16:32:49 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-29 16:34:06 +0100
commitf3992c78790af42c53ed149cf04751261393d8e8 (patch)
tree065fc8b2c6bb9305aefe5e4c2bf585b6cc20dafe /Private/HALKit
parent1a22cb4fd330bf01f1c94bd12fcad9ab278b4f80 (diff)
Kernel: Pre-Release
- Kernel - Bootloader Working on AHCI support, AHCI is very important to bring fast I/O support, ACPI and APIC is also in WiP for AMD64 HAL this time. Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit')
-rw-r--r--Private/HALKit/AMD64/HalACPIManager.cpp13
-rw-r--r--Private/HALKit/AMD64/HalCoreInterruptHandler.cpp42
-rw-r--r--Private/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cpp13
-rw-r--r--Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp13
-rw-r--r--Private/HALKit/AMD64/HalCoreSyscallHandlerAMD64.cpp25
-rw-r--r--Private/HALKit/AMD64/HalDebugOutput.cxx15
-rw-r--r--Private/HALKit/AMD64/HalDebugPort.cxx13
-rw-r--r--Private/HALKit/AMD64/HalDescriptorLoader.cpp57
-rw-r--r--Private/HALKit/AMD64/HalHardwareAPIC.cpp22
-rw-r--r--Private/HALKit/AMD64/HalInterruptRouting.asm3
-rw-r--r--Private/HALKit/AMD64/HalKernelMain.cxx26
-rw-r--r--Private/HALKit/AMD64/HalPageAlloc.cpp13
-rw-r--r--Private/HALKit/AMD64/HalPageAlloc.hpp13
-rw-r--r--Private/HALKit/AMD64/HalProcessor.cpp13
-rw-r--r--Private/HALKit/AMD64/HalSMPCore.cxx13
-rw-r--r--Private/HALKit/AMD64/Hypervisor.hpp13
-rw-r--r--Private/HALKit/AMD64/PCI/Database.cpp12
-rw-r--r--Private/HALKit/AMD64/PCI/Database.cxx9
-rw-r--r--Private/HALKit/AMD64/PCI/Device.cxx (renamed from Private/HALKit/AMD64/PCI/Device.cpp)35
-rw-r--r--Private/HALKit/AMD64/PCI/Dma.cxx (renamed from Private/HALKit/AMD64/PCI/Dma.cpp)13
-rw-r--r--Private/HALKit/AMD64/PCI/Express.cpp12
-rw-r--r--Private/HALKit/AMD64/PCI/Express.cxx9
-rw-r--r--Private/HALKit/AMD64/PCI/IO.cpp10
-rw-r--r--Private/HALKit/AMD64/PCI/IO.cxx7
-rw-r--r--Private/HALKit/AMD64/PCI/Iterator.cxx (renamed from Private/HALKit/AMD64/PCI/Iterator.cpp)13
-rw-r--r--Private/HALKit/AMD64/PCI/PCI.cpp10
-rw-r--r--Private/HALKit/AMD64/PCI/PCI.cxx7
-rw-r--r--Private/HALKit/AXP/CoreSyscallHandlerDEC.cpp13
-rw-r--r--Private/HALKit/AXP/Processor.hpp13
-rw-r--r--Private/HALKit/PowerPC/HalCoreContextSwitchPowerPC.s13
-rw-r--r--Private/HALKit/PowerPC/HalCoreSyscallHandlerPowerPC.cpp13
-rw-r--r--Private/HALKit/PowerPC/HalHardware.cxx13
-rw-r--r--Private/HALKit/PowerPC/HalThread.cxx13
-rw-r--r--Private/HALKit/PowerPC/Processor.hpp13
34 files changed, 190 insertions, 345 deletions
diff --git a/Private/HALKit/AMD64/HalACPIManager.cpp b/Private/HALKit/AMD64/HalACPIManager.cpp
index 6cac4eca..db9263a1 100644
--- a/Private/HALKit/AMD64/HalACPIManager.cpp
+++ b/Private/HALKit/AMD64/HalACPIManager.cpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <HALKit/AMD64/ACPI/ACPIManager.hpp>
#include <HALKit/AMD64/Processor.hpp>
diff --git a/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp b/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
deleted file mode 100644
index c35d52cc..00000000
--- a/Private/HALKit/AMD64/HalCoreInterruptHandler.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
-
-#include <ArchKit/ArchKit.hpp>
-#include <NewKit/String.hpp>
-
-/// BUGS = 1
-
-/// @brief System call interrupt (like DOS and NT)
-#define kKernelSyscallInterrupt (0x21)
-
-EXTERN_C {
- HCore::Void rt_handle_interrupts(HCore::HAL::StackFramePtr stack) {
- HCore::kcout << "HCoreKrnl: Interrupting Hart...\r\n";
-
- switch (stack->IntNum) {
- case kKernelSyscallInterrupt: {
- HCore::kcout << "HCoreKrnl: System call raised, checking.."
- << HCore::end_line();
- rt_syscall_handle(stack);
- break;
- }
-
- default:
- break;
- }
-
- if ((stack->IntNum - 32) >= 12) {
- HCore::kcout << "HCoreKrnl: EOI Master PIC...\r\n";
- HCore::HAL::Out8(0xA0, 0x20);
- }
-
- HCore::kcout << "HCoreKrnl: EOI Slave PIC...\r\n";
- HCore::HAL::Out8(0x20, 0x20);
- }
-} \ No newline at end of file
diff --git a/Private/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cpp b/Private/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cpp
index 486c1513..90c29ea3 100644
--- a/Private/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cpp
+++ b/Private/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <ArchKit/ArchKit.hpp>
#include <KernelKit/ProcessManager.hpp>
diff --git a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
index 73c995c4..98ddb646 100644
--- a/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
+++ b/Private/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <HALKit/AMD64/ACPI/ACPIManager.hpp>
#include <HALKit/AMD64/Processor.hpp>
diff --git a/Private/HALKit/AMD64/HalCoreSyscallHandlerAMD64.cpp b/Private/HALKit/AMD64/HalCoreSyscallHandlerAMD64.cpp
deleted file mode 100644
index 7d0178fe..00000000
--- a/Private/HALKit/AMD64/HalCoreSyscallHandlerAMD64.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
-
-#include <ArchKit/ArchKit.hpp>
-#include <HALKit/AMD64/Processor.hpp>
-#include <KernelKit/PermissionSelector.hxx>
-
-typedef HCore::Void (*rt_syscall_proc)(HCore::HAL::StackFramePtr);
-
-HCore::Array<rt_syscall_proc, kKernelMaxSystemCalls> kSyscalls;
-
-/// @brief Interrupt system call handler.
-EXTERN_C void rt_syscall_handle(HCore::HAL::StackFramePtr stack) {
- if (!stack) return;
-
- if (stack->Rcx < kKernelMaxSystemCalls && kSyscalls[stack->Rcx] != 0) {
- (kSyscalls[stack->Rcx].Leak().Leak())(stack);
- }
-}
diff --git a/Private/HALKit/AMD64/HalDebugOutput.cxx b/Private/HALKit/AMD64/HalDebugOutput.cxx
index 4a949fc1..fb80365e 100644
--- a/Private/HALKit/AMD64/HalDebugOutput.cxx
+++ b/Private/HALKit/AMD64/HalDebugOutput.cxx
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <ArchKit/ArchKit.hpp>
#include <KernelKit/DebugOutput.hpp>
@@ -58,7 +55,7 @@ bool serial_init() noexcept {
}
} // namespace Detail
-void ke_io_print(const char* bytes) {
+EXTERN_C void ke_io_print(const char* bytes) {
Detail::serial_init();
if (!bytes || Detail::kState != kStateReady) return;
diff --git a/Private/HALKit/AMD64/HalDebugPort.cxx b/Private/HALKit/AMD64/HalDebugPort.cxx
index 510aa421..326bb8bc 100644
--- a/Private/HALKit/AMD64/HalDebugPort.cxx
+++ b/Private/HALKit/AMD64/HalDebugPort.cxx
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
//! @file DebuggerPort.cxx
//! @brief UART debug via packets.
diff --git a/Private/HALKit/AMD64/HalDescriptorLoader.cpp b/Private/HALKit/AMD64/HalDescriptorLoader.cpp
index fb41f654..8552b958 100644
--- a/Private/HALKit/AMD64/HalDescriptorLoader.cpp
+++ b/Private/HALKit/AMD64/HalDescriptorLoader.cpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <ArchKit/ArchKit.hpp>
@@ -25,6 +22,28 @@ STATIC ::HCore::Detail::AMD64::InterruptDescriptorAMD64
kInterruptVectorTable[kKernelIdtSize];
void IDTLoader::Load(Register64 &idt) {
+ volatile ::HCore::UIntPtr **baseIdt = (volatile ::HCore::UIntPtr **)idt.Base;
+
+ MUST_PASS(baseIdt[0]);
+
+ for (UInt16 i = 0; i < kKernelIdtSize; i++) {
+ kInterruptVectorTable[i].Selector = kGdtCodeSelector;
+ kInterruptVectorTable[i].Ist = 0x0;
+ kInterruptVectorTable[i].TypeAttributes = kInterruptGate;
+ kInterruptVectorTable[i].OffsetLow = ((UIntPtr)baseIdt[i] & 0xFFFF);
+ kInterruptVectorTable[i].OffsetMid = (((UIntPtr)baseIdt[i] >> 16) & 0xFFFF);
+ kInterruptVectorTable[i].OffsetHigh =
+ (((UIntPtr)baseIdt[i] >> 32) & 0xFFFFFFFF);
+ kInterruptVectorTable[i].Zero = 0x0;
+ }
+
+ kRegIdt.Base = (UIntPtr)kInterruptVectorTable;
+ kRegIdt.Limit = sizeof(::HCore::Detail::AMD64::InterruptDescriptorAMD64) *
+ kKernelIdtSize -
+ 1;
+
+ rt_load_idt(kRegIdt);
+
UInt8 a1, a2;
a1 = HAL::In8(0x21); // save masks
@@ -50,28 +69,6 @@ void IDTLoader::Load(Register64 &idt) {
HAL::Out8(0x21, a1);
HAL::rt_wait_400ns();
HAL::Out8(0xA1, a2);
-
- volatile ::HCore::UIntPtr **baseIdt = (volatile ::HCore::UIntPtr **)idt.Base;
-
- MUST_PASS(baseIdt[0]);
-
- for (UInt16 i = 0; i < kKernelIdtSize; i++) {
- kInterruptVectorTable[i].Selector = kGdtCodeSelector;
- kInterruptVectorTable[i].Ist = 0x0;
- kInterruptVectorTable[i].TypeAttributes = kInterruptGate;
- kInterruptVectorTable[i].OffsetLow = ((UIntPtr)baseIdt[i] & 0xFFFF);
- kInterruptVectorTable[i].OffsetMid = (((UIntPtr)baseIdt[i] >> 16) & 0xFFFF);
- kInterruptVectorTable[i].OffsetHigh =
- (((UIntPtr)baseIdt[i] >> 32) & 0xFFFFFFFF);
- kInterruptVectorTable[i].Zero = 0x0;
- }
-
- kRegIdt.Base = (UIntPtr)kInterruptVectorTable;
- kRegIdt.Limit = sizeof(::HCore::Detail::AMD64::InterruptDescriptorAMD64) *
- kKernelIdtSize -
- 1;
-
- rt_load_idt(kRegIdt);
}
void GDTLoader::Load(Ref<RegisterGDT> &gdt) { GDTLoader::Load(gdt.Leak()); }
diff --git a/Private/HALKit/AMD64/HalHardwareAPIC.cpp b/Private/HALKit/AMD64/HalHardwareAPIC.cpp
index d587975e..d2b99ed3 100644
--- a/Private/HALKit/AMD64/HalHardwareAPIC.cpp
+++ b/Private/HALKit/AMD64/HalHardwareAPIC.cpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <ArchKit/ArchKit.hpp>
@@ -23,17 +20,18 @@ void rt_wakeup_thread(HAL::StackFrame* stack) {
}
static void __rt_hang_proc(void) {
- while (1)
- ;
+ while (1) {
+
+ }
}
// @brief makes thread sleep.
// hooks and hangs thread to prevent code from executing.
void rt_hang_thread(HAL::StackFrame* stack) {
- __asm__ volatile("cli");
+ HAL::rt_cli();
// TODO
- __asm__ volatile("sti");
+ HAL::rt_sti();
}
} // namespace HCore
diff --git a/Private/HALKit/AMD64/HalInterruptRouting.asm b/Private/HALKit/AMD64/HalInterruptRouting.asm
index cd3c8bcf..84429482 100644
--- a/Private/HALKit/AMD64/HalInterruptRouting.asm
+++ b/Private/HALKit/AMD64/HalInterruptRouting.asm
@@ -81,9 +81,6 @@ IntNormal 31
;; this one is doing a POST for us.
;; testing interrupts.
_ke_power_on_self_test:
- mov rcx, 0x00
- mov rdx, 0x01
-
int 0x21
int 0x21
int 0x21
diff --git a/Private/HALKit/AMD64/HalKernelMain.cxx b/Private/HALKit/AMD64/HalKernelMain.cxx
index 27c12509..d6b87bb4 100644
--- a/Private/HALKit/AMD64/HalKernelMain.cxx
+++ b/Private/HALKit/AMD64/HalKernelMain.cxx
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <ArchKit/ArchKit.hpp>
#include <Drivers/PS2/Mouse.hxx>
@@ -98,9 +95,8 @@ EXTERN_C void RuntimeMain(
/// START POST
Detail::_ke_power_on_self_test();
- HCore::ProcessManager::Shared().Leak().GetCurrent().Leak().Crash();
-
- HCore::kcout << "HCoreKrnl: POST done, everything is OK...\r\n";
+
+ HCore::kcout << "HCoreKrnl: Everything is OK...\r\n";
/// END POST
@@ -109,14 +105,10 @@ EXTERN_C void RuntimeMain(
/// We already have an install of HCore.
if (HandoverHeader->f_Bootloader == kInstalledMedia) {
- // Open file from first hard-drive.
- HCore::PEFLoader img("A:/System/HCoreServer.exe");
-
- /// Run the server executive.
- HCore::Utils::execute_from_image(img);
+ /// TODO: Parse system configuration.
} else {
// Open file from first hard-drive.
- HCore::PEFLoader img("A:/System/HCoreInstallWizard.exe");
+ HCore::PEFLoader img("/System/HCoreInstallWizard.exe");
/// Run the server executive.
HCore::Utils::execute_from_image(img);
diff --git a/Private/HALKit/AMD64/HalPageAlloc.cpp b/Private/HALKit/AMD64/HalPageAlloc.cpp
index 30996d19..a52eb646 100644
--- a/Private/HALKit/AMD64/HalPageAlloc.cpp
+++ b/Private/HALKit/AMD64/HalPageAlloc.cpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <ArchKit/ArchKit.hpp>
#include <HALKit/AMD64/HalPageAlloc.hpp>
diff --git a/Private/HALKit/AMD64/HalPageAlloc.hpp b/Private/HALKit/AMD64/HalPageAlloc.hpp
index 8717f3db..f6b57a6d 100644
--- a/Private/HALKit/AMD64/HalPageAlloc.hpp
+++ b/Private/HALKit/AMD64/HalPageAlloc.hpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#pragma once
diff --git a/Private/HALKit/AMD64/HalProcessor.cpp b/Private/HALKit/AMD64/HalProcessor.cpp
index 80efed3a..0c246a9d 100644
--- a/Private/HALKit/AMD64/HalProcessor.cpp
+++ b/Private/HALKit/AMD64/HalProcessor.cpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <HALKit/AMD64/Processor.hpp>
diff --git a/Private/HALKit/AMD64/HalSMPCore.cxx b/Private/HALKit/AMD64/HalSMPCore.cxx
index bff14236..9e98fb3c 100644
--- a/Private/HALKit/AMD64/HalSMPCore.cxx
+++ b/Private/HALKit/AMD64/HalSMPCore.cxx
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <KernelKit/ProcessManager.hpp>
diff --git a/Private/HALKit/AMD64/Hypervisor.hpp b/Private/HALKit/AMD64/Hypervisor.hpp
index c1e5ddef..07d69e02 100644
--- a/Private/HALKit/AMD64/Hypervisor.hpp
+++ b/Private/HALKit/AMD64/Hypervisor.hpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#pragma once
diff --git a/Private/HALKit/AMD64/PCI/Database.cpp b/Private/HALKit/AMD64/PCI/Database.cpp
deleted file mode 100644
index 0d12cd8a..00000000
--- a/Private/HALKit/AMD64/PCI/Database.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
-
-#include <KernelKit/PCI/Database.hpp>
-
-namespace HCore {}
diff --git a/Private/HALKit/AMD64/PCI/Database.cxx b/Private/HALKit/AMD64/PCI/Database.cxx
new file mode 100644
index 00000000..7b78079d
--- /dev/null
+++ b/Private/HALKit/AMD64/PCI/Database.cxx
@@ -0,0 +1,9 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
+
+#include <KernelKit/PCI/Database.hpp>
+
+namespace HCore {}
diff --git a/Private/HALKit/AMD64/PCI/Device.cpp b/Private/HALKit/AMD64/PCI/Device.cxx
index b353d2a6..2b1ec3a5 100644
--- a/Private/HALKit/AMD64/PCI/Device.cpp
+++ b/Private/HALKit/AMD64/PCI/Device.cxx
@@ -1,16 +1,13 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <ArchKit/ArchKit.hpp>
#include <KernelKit/PCI/Device.hpp>
-HCore::UInt LumiaPCIReadRaw(HCore::UInt bar, HCore::UShort bus,
+HCore::UInt HCorePCIReadRaw(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) |
@@ -22,7 +19,7 @@ HCore::UInt LumiaPCIReadRaw(HCore::UInt bar, HCore::UShort bus,
return HCore::HAL::In32((HCore::UShort)HCore::PCI::PciConfigKind::ConfigData);
}
-void LumiaPCISetCfgTarget(HCore::UInt bar, HCore::UShort bus, HCore::UShort dev,
+void HCorePCISetCfgTarget(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) |
@@ -39,7 +36,7 @@ Device::Device(UShort bus, UShort device, UShort func, UShort bar)
Device::~Device() {}
UInt Device::Read(UInt bar, Size sz) {
- LumiaPCISetCfgTarget(bar, m_Bus, m_Device, m_Function);
+ HCorePCISetCfgTarget(bar, m_Bus, m_Device, m_Function);
if (sz == 4)
return HAL::In32((UShort)PciConfigKind::ConfigData + (m_Bar & 3));
@@ -51,7 +48,7 @@ UInt Device::Read(UInt bar, Size sz) {
}
void Device::Write(UInt bar, UIntPtr data, Size sz) {
- LumiaPCISetCfgTarget(bar, m_Bus, m_Device, m_Function);
+ HCorePCISetCfgTarget(bar, m_Bus, m_Device, m_Function);
if (sz == 4)
HAL::Out32((UShort)PciConfigKind::ConfigData + (m_Bar & 3), (UInt)data);
@@ -62,31 +59,31 @@ void Device::Write(UInt bar, UIntPtr data, Size sz) {
}
UShort Device::DeviceId() {
- return (UShort)(LumiaPCIReadRaw(0x0 >> 16, m_Bus, m_Device, m_Function));
+ return (UShort)(HCorePCIReadRaw(0x0 >> 16, m_Bus, m_Device, m_Function));
}
UShort Device::VendorId() {
- return (UShort)(LumiaPCIReadRaw(0x0, m_Bus, m_Device, m_Function) >> 16);
+ return (UShort)(HCorePCIReadRaw(0x0, m_Bus, m_Device, m_Function) >> 16);
}
UShort Device::InterfaceId() {
- return (UShort)(LumiaPCIReadRaw(0x0, m_Bus, m_Device, m_Function) >> 16);
+ return (UShort)(HCorePCIReadRaw(0x0, m_Bus, m_Device, m_Function) >> 16);
}
UChar Device::Class() {
- return (UChar)(LumiaPCIReadRaw(0x08, m_Bus, m_Device, m_Function) >> 24);
+ return (UChar)(HCorePCIReadRaw(0x08, m_Bus, m_Device, m_Function) >> 24);
}
UChar Device::Subclass() {
- return (UChar)(LumiaPCIReadRaw(0x08, m_Bus, m_Device, m_Function) >> 16);
+ return (UChar)(HCorePCIReadRaw(0x08, m_Bus, m_Device, m_Function) >> 16);
}
UChar Device::ProgIf() {
- return (UChar)(LumiaPCIReadRaw(0x08, m_Bus, m_Device, m_Function) >> 8);
+ return (UChar)(HCorePCIReadRaw(0x08, m_Bus, m_Device, m_Function) >> 8);
}
UChar Device::HeaderType() {
- return (UChar)(LumiaPCIReadRaw(0xC, m_Bus, m_Device, m_Function) >> 16);
+ return (UChar)(HCorePCIReadRaw(0xC, m_Bus, m_Device, m_Function) >> 16);
}
void Device::EnableMmio() {
diff --git a/Private/HALKit/AMD64/PCI/Dma.cpp b/Private/HALKit/AMD64/PCI/Dma.cxx
index 14e16163..5b754ea4 100644
--- a/Private/HALKit/AMD64/PCI/Dma.cpp
+++ b/Private/HALKit/AMD64/PCI/Dma.cxx
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <KernelKit/PCI/Dma.hpp>
diff --git a/Private/HALKit/AMD64/PCI/Express.cpp b/Private/HALKit/AMD64/PCI/Express.cpp
deleted file mode 100644
index 812d1401..00000000
--- a/Private/HALKit/AMD64/PCI/Express.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
-
-#include <KernelKit/PCI/Express.hpp>
-
-namespace HCore {}
diff --git a/Private/HALKit/AMD64/PCI/Express.cxx b/Private/HALKit/AMD64/PCI/Express.cxx
new file mode 100644
index 00000000..9633711e
--- /dev/null
+++ b/Private/HALKit/AMD64/PCI/Express.cxx
@@ -0,0 +1,9 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
+
+#include <KernelKit/PCI/Express.hpp>
+
+namespace HCore {}
diff --git a/Private/HALKit/AMD64/PCI/IO.cpp b/Private/HALKit/AMD64/PCI/IO.cpp
deleted file mode 100644
index 7ebae15a..00000000
--- a/Private/HALKit/AMD64/PCI/IO.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
-
-#include <KernelKit/PCI/IO.hpp>
diff --git a/Private/HALKit/AMD64/PCI/IO.cxx b/Private/HALKit/AMD64/PCI/IO.cxx
new file mode 100644
index 00000000..7bf6adb0
--- /dev/null
+++ b/Private/HALKit/AMD64/PCI/IO.cxx
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
+
+#include <KernelKit/PCI/IO.hpp>
diff --git a/Private/HALKit/AMD64/PCI/Iterator.cpp b/Private/HALKit/AMD64/PCI/Iterator.cxx
index fb90dfcb..98cb8016 100644
--- a/Private/HALKit/AMD64/PCI/Iterator.cpp
+++ b/Private/HALKit/AMD64/PCI/Iterator.cxx
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <KernelKit/PCI/Iterator.hpp>
diff --git a/Private/HALKit/AMD64/PCI/PCI.cpp b/Private/HALKit/AMD64/PCI/PCI.cpp
deleted file mode 100644
index d13b018a..00000000
--- a/Private/HALKit/AMD64/PCI/PCI.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
-
-#include <KernelKit/PCI/PCI.hpp>
diff --git a/Private/HALKit/AMD64/PCI/PCI.cxx b/Private/HALKit/AMD64/PCI/PCI.cxx
new file mode 100644
index 00000000..9d67445d
--- /dev/null
+++ b/Private/HALKit/AMD64/PCI/PCI.cxx
@@ -0,0 +1,7 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
+
+#include <KernelKit/PCI/PCI.hpp>
diff --git a/Private/HALKit/AXP/CoreSyscallHandlerDEC.cpp b/Private/HALKit/AXP/CoreSyscallHandlerDEC.cpp
index 51b1fa0d..49a0062c 100644
--- a/Private/HALKit/AXP/CoreSyscallHandlerDEC.cpp
+++ b/Private/HALKit/AXP/CoreSyscallHandlerDEC.cpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <ArchKit/ArchKit.hpp>
#include <HALKit/Alpha/Processor.hpp>
diff --git a/Private/HALKit/AXP/Processor.hpp b/Private/HALKit/AXP/Processor.hpp
index e6a00db3..a3f4030f 100644
--- a/Private/HALKit/AXP/Processor.hpp
+++ b/Private/HALKit/AXP/Processor.hpp
@@ -1,10 +1,7 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#pragma once \ No newline at end of file
diff --git a/Private/HALKit/PowerPC/HalCoreContextSwitchPowerPC.s b/Private/HALKit/PowerPC/HalCoreContextSwitchPowerPC.s
index 5ca6b5ef..a6c2a90f 100644
--- a/Private/HALKit/PowerPC/HalCoreContextSwitchPowerPC.s
+++ b/Private/HALKit/PowerPC/HalCoreContextSwitchPowerPC.s
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
.align 4
.type name, @function
diff --git a/Private/HALKit/PowerPC/HalCoreSyscallHandlerPowerPC.cpp b/Private/HALKit/PowerPC/HalCoreSyscallHandlerPowerPC.cpp
index 71554dc4..eac04e47 100644
--- a/Private/HALKit/PowerPC/HalCoreSyscallHandlerPowerPC.cpp
+++ b/Private/HALKit/PowerPC/HalCoreSyscallHandlerPowerPC.cpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <ArchKit/ArchKit.hpp>
#include <NewKit/Array.hpp>
diff --git a/Private/HALKit/PowerPC/HalHardware.cxx b/Private/HALKit/PowerPC/HalHardware.cxx
index e6c0f85c..340f515e 100644
--- a/Private/HALKit/PowerPC/HalHardware.cxx
+++ b/Private/HALKit/PowerPC/HalHardware.cxx
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <HALKit/PowerPC/Processor.hpp>
#include <KernelKit/DebugOutput.hpp>
diff --git a/Private/HALKit/PowerPC/HalThread.cxx b/Private/HALKit/PowerPC/HalThread.cxx
index 0c6cfa4b..4b8ef8d8 100644
--- a/Private/HALKit/PowerPC/HalThread.cxx
+++ b/Private/HALKit/PowerPC/HalThread.cxx
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#include <HALKit/PowerPC/Processor.hpp>
#include <KernelKit/DebugOutput.hpp>
diff --git a/Private/HALKit/PowerPC/Processor.hpp b/Private/HALKit/PowerPC/Processor.hpp
index b1673f97..e5f04455 100644
--- a/Private/HALKit/PowerPC/Processor.hpp
+++ b/Private/HALKit/PowerPC/Processor.hpp
@@ -1,11 +1,8 @@
-/*
- * ========================================================
- *
- * HCore
- * Copyright Mahrouss Logic, all rights reserved.
- *
- * ========================================================
- */
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
#pragma once