diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-10-21 20:23:36 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-10-21 20:23:36 +0200 |
| commit | d48cbe75ef29a9c67c9d176bf58e56ea6448fb9e (patch) | |
| tree | 89cbd6b7e23802f92bf3158868f4dc33c088e516 /dev/zka/HALKit/AMD64 | |
| parent | 21b3da78f806d6765f9dffa6a84c21346f171cee (diff) | |
IMP: Major refactor of header and source files extensions.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/zka/HALKit/AMD64')
| -rw-r--r-- | dev/zka/HALKit/AMD64/CPUID.h (renamed from dev/zka/HALKit/AMD64/CPUID.hxx) | 4 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalACPIFactoryInterface.cc (renamed from dev/zka/HALKit/AMD64/HalACPIFactoryInterface.cxx) | 10 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalAPICController.cc (renamed from dev/zka/HALKit/AMD64/HalAPICController.cxx) | 4 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalCPU.cc (renamed from dev/zka/HALKit/AMD64/HalCPU.cxx) | 4 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc (renamed from dev/zka/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cxx) | 6 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalCoreMPScheduler.cc (renamed from dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx) | 22 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalDebugOutput.cc (renamed from dev/zka/HALKit/AMD64/HalDebugOutput.cxx) | 8 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalDebugPort.cc (renamed from dev/zka/HALKit/AMD64/HalDebugPort.cxx) | 4 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalDescriptorLoader.cc (renamed from dev/zka/HALKit/AMD64/HalDescriptorLoader.cxx) | 4 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalKernelMain.cc (renamed from dev/zka/HALKit/AMD64/HalKernelMain.cxx) | 16 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalPagingMgr.cc (renamed from dev/zka/HALKit/AMD64/HalPagingMgr.cxx) | 4 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalSchedulerCore.cc (renamed from dev/zka/HALKit/AMD64/HalSchedulerCore.cxx) | 4 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalTimer.cc (renamed from dev/zka/HALKit/AMD64/HalTimer.cxx) | 6 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/Hypervisor.h (renamed from dev/zka/HALKit/AMD64/Hypervisor.hxx) | 2 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/PCI/DMA.cc (renamed from dev/zka/HALKit/AMD64/PCI/DMA.cxx) | 2 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/PCI/Database.cc (renamed from dev/zka/HALKit/AMD64/PCI/Express.cxx) | 2 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/PCI/Device.cc (renamed from dev/zka/HALKit/AMD64/PCI/Device.cxx) | 4 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/PCI/Express.cc (renamed from dev/zka/HALKit/AMD64/PCI/Database.cxx) | 2 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/PCI/IO.cc (renamed from dev/zka/HALKit/AMD64/PCI/IO.cxx) | 2 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/PCI/Iterator.cc (renamed from dev/zka/HALKit/AMD64/PCI/Iterator.cxx) | 2 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/PCI/PCI.cc (renamed from dev/zka/HALKit/AMD64/PCI/PCI.cxx) | 2 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/Paging.h (renamed from dev/zka/HALKit/AMD64/Paging.hxx) | 2 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/Processor.h (renamed from dev/zka/HALKit/AMD64/Processor.hxx) | 14 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/Storage/AHCI.cc (renamed from dev/zka/HALKit/AMD64/Storage/AHCI.cxx) | 33 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/Storage/ATA-DMA.cc (renamed from dev/zka/HALKit/AMD64/Storage/ATA-DMA.cxx) | 6 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/Storage/ATA-PIO.cc (renamed from dev/zka/HALKit/AMD64/Storage/ATA-PIO.cxx) | 4 |
26 files changed, 87 insertions, 86 deletions
diff --git a/dev/zka/HALKit/AMD64/CPUID.hxx b/dev/zka/HALKit/AMD64/CPUID.h index 49421586..6eda5736 100644 --- a/dev/zka/HALKit/AMD64/CPUID.hxx +++ b/dev/zka/HALKit/AMD64/CPUID.h @@ -2,7 +2,7 @@ Copyright ZKA Web Services Co. - File: CPUID.hxx + File: CPUID.h Purpose: CPUID flags. Revision History: @@ -13,7 +13,7 @@ #pragma once -#include <NewKit/Defines.hxx> +#include <NewKit/Defines.h> enum { diff --git a/dev/zka/HALKit/AMD64/HalACPIFactoryInterface.cxx b/dev/zka/HALKit/AMD64/HalACPIFactoryInterface.cc index 443d6a5d..2ed013ef 100644 --- a/dev/zka/HALKit/AMD64/HalACPIFactoryInterface.cxx +++ b/dev/zka/HALKit/AMD64/HalACPIFactoryInterface.cc @@ -4,11 +4,11 @@ ------------------------------------------- */ -#include <modules/ACPI/ACPIFactoryInterface.hxx> -#include <HALKit/AMD64/Processor.hxx> -#include <NewKit/String.hxx> -#include <ArchKit/ArchKit.hxx> -#include <KernelKit/Heap.hxx> +#include <modules/ACPI/ACPIFactoryInterface.h> +#include <HALKit/AMD64/Processor.h> +#include <NewKit/String.h> +#include <ArchKit/ArchKit.h> +#include <KernelKit/Heap.h> namespace Kernel { diff --git a/dev/zka/HALKit/AMD64/HalAPICController.cxx b/dev/zka/HALKit/AMD64/HalAPICController.cc index 47c55657..3a8bc23d 100644 --- a/dev/zka/HALKit/AMD64/HalAPICController.cxx +++ b/dev/zka/HALKit/AMD64/HalAPICController.cc @@ -4,8 +4,8 @@ ------------------------------------------- */ -#include <modules/ACPI/ACPIFactoryInterface.hxx> -#include <HALKit/AMD64/Processor.hxx> +#include <modules/ACPI/ACPIFactoryInterface.h> +#include <HALKit/AMD64/Processor.h> #define cIOAPICRegVal (4) #define cIOAPICRegReg (0) diff --git a/dev/zka/HALKit/AMD64/HalCPU.cxx b/dev/zka/HALKit/AMD64/HalCPU.cc index a96ceb34..80729346 100644 --- a/dev/zka/HALKit/AMD64/HalCPU.cxx +++ b/dev/zka/HALKit/AMD64/HalCPU.cc @@ -7,8 +7,8 @@ ------------------------------------------- */ -#include <HALKit/AMD64/Paging.hxx> -#include <HALKit/AMD64/Processor.hxx> +#include <HALKit/AMD64/Paging.h> +#include <HALKit/AMD64/Processor.h> /** * @file HalCPU.cxx diff --git a/dev/zka/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cxx b/dev/zka/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc index 4ff168cd..7dd0b68e 100644 --- a/dev/zka/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cxx +++ b/dev/zka/HALKit/AMD64/HalCoreInterruptHandlerAMD64.cc @@ -4,9 +4,9 @@ ------------------------------------------- */ -#include <ArchKit/ArchKit.hxx> -#include <KernelKit/UserProcessScheduler.hxx> -#include <NewKit/String.hxx> +#include <ArchKit/ArchKit.h> +#include <KernelKit/UserProcessScheduler.h> +#include <NewKit/String.h> namespace Kernel { diff --git a/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx b/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cc index e763475a..9feddbfb 100644 --- a/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cxx +++ b/dev/zka/HALKit/AMD64/HalCoreMPScheduler.cc @@ -4,19 +4,19 @@ ------------------------------------------- */ -#include <modules/ACPI/ACPIFactoryInterface.hxx> -#include <KernelKit/UserProcessScheduler.hxx> -#include <HALKit/AMD64/Processor.hxx> -#include <NewKit/Stop.hxx> -#include <ArchKit/ArchKit.hxx> -#include <KernelKit/Semaphore.hxx> -#include <KernelKit/UserProcessScheduler.hxx> -#include <KernelKit/Timer.hxx> -#include <modules/FB/Text.hxx> +#include <modules/ACPI/ACPIFactoryInterface.h> +#include <KernelKit/UserProcessScheduler.h> +#include <HALKit/AMD64/Processor.h> +#include <NewKit/Stop.h> +#include <ArchKit/ArchKit.h> +#include <KernelKit/Semaphore.h> +#include <KernelKit/UserProcessScheduler.h> +#include <KernelKit/Timer.h> +#include <modules/FB/Text.h> // Needed for SMP. // -#include <FirmwareKit/EFI.hxx> -#include <KernelKit/HardwareThreadScheduler.hxx> +#include <FirmwareKit/EFI.h> +#include <KernelKit/HardwareThreadScheduler.h> #define kApicSignature "APIC" diff --git a/dev/zka/HALKit/AMD64/HalDebugOutput.cxx b/dev/zka/HALKit/AMD64/HalDebugOutput.cc index e6f4148b..49cdc964 100644 --- a/dev/zka/HALKit/AMD64/HalDebugOutput.cxx +++ b/dev/zka/HALKit/AMD64/HalDebugOutput.cc @@ -4,10 +4,10 @@ ------------------------------------------- */ -#include <ArchKit/ArchKit.hxx> -#include <KernelKit/DebugOutput.hxx> -#include <NewKit/Utils.hxx> -#include <NewKit/New.hxx> +#include <ArchKit/ArchKit.h> +#include <KernelKit/DebugOutput.h> +#include <NewKit/Utils.h> +#include <NewKit/New.h> namespace Kernel { diff --git a/dev/zka/HALKit/AMD64/HalDebugPort.cxx b/dev/zka/HALKit/AMD64/HalDebugPort.cc index 4e28f637..6c8ebf2b 100644 --- a/dev/zka/HALKit/AMD64/HalDebugPort.cxx +++ b/dev/zka/HALKit/AMD64/HalDebugPort.cc @@ -7,8 +7,8 @@ //! @file DebuggerPort.cxx //! @brief UART debug via packets. -#include <ArchKit/ArchKit.hxx> -#include <KernelKit/DebugOutput.hxx> +#include <ArchKit/ArchKit.h> +#include <KernelKit/DebugOutput.h> // after that we have start of additional data. diff --git a/dev/zka/HALKit/AMD64/HalDescriptorLoader.cxx b/dev/zka/HALKit/AMD64/HalDescriptorLoader.cc index 822d7dac..f0eff4e1 100644 --- a/dev/zka/HALKit/AMD64/HalDescriptorLoader.cxx +++ b/dev/zka/HALKit/AMD64/HalDescriptorLoader.cc @@ -4,8 +4,8 @@ ------------------------------------------- */ -#include <ArchKit/ArchKit.hxx> -#include <HALKit/AMD64/Processor.hxx> +#include <ArchKit/ArchKit.h> +#include <HALKit/AMD64/Processor.h> namespace Kernel::HAL { diff --git a/dev/zka/HALKit/AMD64/HalKernelMain.cxx b/dev/zka/HALKit/AMD64/HalKernelMain.cc index 1a4fc830..08d91062 100644 --- a/dev/zka/HALKit/AMD64/HalKernelMain.cxx +++ b/dev/zka/HALKit/AMD64/HalKernelMain.cc @@ -4,14 +4,14 @@ ------------------------------------------- */ -#include <ArchKit/ArchKit.hxx> -#include <KernelKit/UserProcessScheduler.hxx> -#include <KernelKit/HardwareThreadScheduler.hxx> -#include <KernelKit/CodeMgr.hxx> -#include <modules/ACPI/ACPIFactoryInterface.hxx> -#include <NetworkKit/IPC.hxx> -#include <CFKit/Property.hxx> -#include <modules/FB/Text.hxx> +#include <ArchKit/ArchKit.h> +#include <KernelKit/UserProcessScheduler.h> +#include <KernelKit/HardwareThreadScheduler.h> +#include <KernelKit/CodeMgr.h> +#include <modules/ACPI/ACPIFactoryInterface.h> +#include <NetworkKit/IPC.h> +#include <CFKit/Property.h> +#include <modules/FB/Text.h> namespace Kernel::HAL { diff --git a/dev/zka/HALKit/AMD64/HalPagingMgr.cxx b/dev/zka/HALKit/AMD64/HalPagingMgr.cc index fe6aea0f..afc86eeb 100644 --- a/dev/zka/HALKit/AMD64/HalPagingMgr.cxx +++ b/dev/zka/HALKit/AMD64/HalPagingMgr.cc @@ -7,8 +7,8 @@ ------------------------------------------- */ -#include <HALKit/AMD64/Paging.hxx> -#include <HALKit/AMD64/Processor.hxx> +#include <HALKit/AMD64/Paging.h> +#include <HALKit/AMD64/Processor.h> namespace Kernel::HAL { diff --git a/dev/zka/HALKit/AMD64/HalSchedulerCore.cxx b/dev/zka/HALKit/AMD64/HalSchedulerCore.cc index e5396c92..214b889b 100644 --- a/dev/zka/HALKit/AMD64/HalSchedulerCore.cxx +++ b/dev/zka/HALKit/AMD64/HalSchedulerCore.cc @@ -4,8 +4,8 @@ ------------------------------------------- */ -#include <HALKit/AMD64/Processor.hxx> -#include <KernelKit/UserProcessScheduler.hxx> +#include <HALKit/AMD64/Processor.h> +#include <KernelKit/UserProcessScheduler.h> using namespace Kernel; diff --git a/dev/zka/HALKit/AMD64/HalTimer.cxx b/dev/zka/HALKit/AMD64/HalTimer.cc index 75102c15..6d552a09 100644 --- a/dev/zka/HALKit/AMD64/HalTimer.cxx +++ b/dev/zka/HALKit/AMD64/HalTimer.cc @@ -11,9 +11,9 @@ ------------------------------------------- */
-#include <modules/ACPI/ACPIFactoryInterface.hxx>
-#include <ArchKit/ArchKit.hxx>
-#include <KernelKit/Timer.hxx>
+#include <modules/ACPI/ACPIFactoryInterface.h>
+#include <ArchKit/ArchKit.h>
+#include <KernelKit/Timer.h>
// timer slot 0
diff --git a/dev/zka/HALKit/AMD64/Hypervisor.hxx b/dev/zka/HALKit/AMD64/Hypervisor.h index f4c0c5ac..5a0a9aeb 100644 --- a/dev/zka/HALKit/AMD64/Hypervisor.hxx +++ b/dev/zka/HALKit/AMD64/Hypervisor.h @@ -6,7 +6,7 @@ #pragma once -#include <NewKit/Defines.hxx> +#include <NewKit/Defines.h> namespace Kernel { diff --git a/dev/zka/HALKit/AMD64/PCI/DMA.cxx b/dev/zka/HALKit/AMD64/PCI/DMA.cc index 3670b7e4..056cdf19 100644 --- a/dev/zka/HALKit/AMD64/PCI/DMA.cxx +++ b/dev/zka/HALKit/AMD64/PCI/DMA.cc @@ -4,7 +4,7 @@ ------------------------------------------- */ -#include <KernelKit/PCI/DMA.hxx> +#include <KernelKit/PCI/DMA.h> namespace Kernel { diff --git a/dev/zka/HALKit/AMD64/PCI/Express.cxx b/dev/zka/HALKit/AMD64/PCI/Database.cc index b1f69a6e..897c51f4 100644 --- a/dev/zka/HALKit/AMD64/PCI/Express.cxx +++ b/dev/zka/HALKit/AMD64/PCI/Database.cc @@ -4,7 +4,7 @@ ------------------------------------------- */ -#include <KernelKit/PCI/Express.hxx> +#include <KernelKit/PCI/Database.h> namespace Kernel { diff --git a/dev/zka/HALKit/AMD64/PCI/Device.cxx b/dev/zka/HALKit/AMD64/PCI/Device.cc index d55683d5..19b0886c 100644 --- a/dev/zka/HALKit/AMD64/PCI/Device.cxx +++ b/dev/zka/HALKit/AMD64/PCI/Device.cc @@ -4,8 +4,8 @@ ------------------------------------------- */ -#include <ArchKit/ArchKit.hxx> -#include <KernelKit/PCI/Device.hxx> +#include <ArchKit/ArchKit.h> +#include <KernelKit/PCI/Device.h> Kernel::UInt ZKA_PCIReadRaw(Kernel::UInt bar, Kernel::UShort bus, Kernel::UShort dev, Kernel::UShort fun) { diff --git a/dev/zka/HALKit/AMD64/PCI/Database.cxx b/dev/zka/HALKit/AMD64/PCI/Express.cc index 5441397c..c1481616 100644 --- a/dev/zka/HALKit/AMD64/PCI/Database.cxx +++ b/dev/zka/HALKit/AMD64/PCI/Express.cc @@ -4,7 +4,7 @@ ------------------------------------------- */ -#include <KernelKit/PCI/Database.hxx> +#include <KernelKit/PCI/Express.h> namespace Kernel { diff --git a/dev/zka/HALKit/AMD64/PCI/IO.cxx b/dev/zka/HALKit/AMD64/PCI/IO.cc index 43970e2a..c8535c54 100644 --- a/dev/zka/HALKit/AMD64/PCI/IO.cxx +++ b/dev/zka/HALKit/AMD64/PCI/IO.cc @@ -4,4 +4,4 @@ ------------------------------------------- */ -#include <KernelKit/PCI/IO.hxx> +#include <KernelKit/PCI/IO.h> diff --git a/dev/zka/HALKit/AMD64/PCI/Iterator.cxx b/dev/zka/HALKit/AMD64/PCI/Iterator.cc index f0d52c5d..edafe07b 100644 --- a/dev/zka/HALKit/AMD64/PCI/Iterator.cxx +++ b/dev/zka/HALKit/AMD64/PCI/Iterator.cc @@ -4,7 +4,7 @@ ------------------------------------------- */ -#include <KernelKit/PCI/Iterator.hxx> +#include <KernelKit/PCI/Iterator.h> namespace Kernel::PCI { diff --git a/dev/zka/HALKit/AMD64/PCI/PCI.cxx b/dev/zka/HALKit/AMD64/PCI/PCI.cc index 02ba1e73..7e056bf9 100644 --- a/dev/zka/HALKit/AMD64/PCI/PCI.cxx +++ b/dev/zka/HALKit/AMD64/PCI/PCI.cc @@ -4,4 +4,4 @@ ------------------------------------------- */ -#include <KernelKit/PCI/PCI.hxx> +#include <KernelKit/PCI/PCI.h> diff --git a/dev/zka/HALKit/AMD64/Paging.hxx b/dev/zka/HALKit/AMD64/Paging.h index 2720bbf9..0d109bb0 100644 --- a/dev/zka/HALKit/AMD64/Paging.hxx +++ b/dev/zka/HALKit/AMD64/Paging.h @@ -12,7 +12,7 @@ ------------------------------------------------------- */ -#include <NewKit/Defines.hxx> +#include <NewKit/Defines.h> #ifndef kPageMax #define kPageMax (0x200) diff --git a/dev/zka/HALKit/AMD64/Processor.hxx b/dev/zka/HALKit/AMD64/Processor.h index 2fd62820..8dbac715 100644 --- a/dev/zka/HALKit/AMD64/Processor.hxx +++ b/dev/zka/HALKit/AMD64/Processor.h @@ -2,7 +2,7 @@ Copyright ZKA Web Services Co. - File: Prcoessor.hxx + File: Prcoessor.h Purpose: AMD64 processor abstraction. Revision History: @@ -13,11 +13,11 @@ #pragma once -#include <NewKit/Array.hxx> -#include <NewKit/Defines.hxx> -#include <NewKit/Utils.hxx> -#include <FirmwareKit/Handover.hxx> -#include <HALKit/AMD64/Paging.hxx> +#include <NewKit/Array.h> +#include <NewKit/Defines.h> +#include <NewKit/Utils.h> +#include <FirmwareKit/Handover.h> +#include <HALKit/AMD64/Paging.h> #define kPITControlPort 0x43 #define kPITChannel0Port 0x40 @@ -33,7 +33,7 @@ EXTERN_C #include <cpuid.h> } -#include <HALKit/AMD64/CPUID.hxx> +#include <HALKit/AMD64/CPUID.h> /// @brief Maximum entries of the interrupt descriptor table. #define kKernelIdtSize (0x100) diff --git a/dev/zka/HALKit/AMD64/Storage/AHCI.cxx b/dev/zka/HALKit/AMD64/Storage/AHCI.cc index 0a318d6d..abc4603c 100644 --- a/dev/zka/HALKit/AMD64/Storage/AHCI.cxx +++ b/dev/zka/HALKit/AMD64/Storage/AHCI.cc @@ -15,15 +15,16 @@ * */ -#include <modules/AHCI/AHCI.hxx> -#include <KernelKit/PCI/Iterator.hxx> -#include <NewKit/Utils.hxx> +#include <modules/AHCI/AHCI.h> +#include <KernelKit/PCI/Iterator.h> +#include <NewKit/Utils.h> #ifdef __AHCI__ enum { kSATAProgIfAHCI = 0x01, - kSATASubClass = 0x06 + kSATASubClass = 0x06, + kSATABar5 = 0x24, }; STATIC Kernel::PCI::Device kAhciDevice; @@ -51,7 +52,7 @@ Kernel::Boolean drv_std_init(Kernel::UInt16& PortsImplemented) HbaMem* mem_ahci = (HbaMem*)kAhciDevice.Bar(0x24); Kernel::UInt32 ports_implemented = mem_ahci->Pi; - Int32 ahci_index = 0; + Int32 ahci_index = 0; const auto cMaxAhciDevices = 32; const auto cAhciSig = 0x00000101; @@ -126,31 +127,31 @@ Kernel::Void drv_std_read(Kernel::UInt64 Lba, Kernel::Char* Buf, Kernel::SizeT S HbaCmdTbl* cmd_tbl = (HbaCmdTbl*)cmd_header->Ctba; Kernel::rt_set_memory(cmd_tbl, 0, sizeof(HbaCmdTbl)); - Kernel::UInt64 size = Size * kAHCISectorSize; + Kernel::UInt64 size = Size * kAHCISectorSize; Kernel::Int64 index_byte = 0L; for (index_byte = 0; index_byte < cmd_header->Prdtl - 1; index_byte++) { - cmd_tbl->prdtEntries[index_byte].Dba = (Kernel::UInt32)(Kernel::UIntPtr)Buf; - cmd_tbl->prdtEntries[index_byte].Dbc = (8 * 1024) - 1; // 8KB Buf size - cmd_tbl->prdtEntries[index_byte].InterruptBit = 1; // Interrupt on completion + cmd_tbl->prdtEntries[index_byte].Dba = (Kernel::UInt32)(Kernel::UIntPtr)Buf; + cmd_tbl->prdtEntries[index_byte].Dbc = (8 * 1024) - 1; // 8KB Buf size + cmd_tbl->prdtEntries[index_byte].InterruptBit = 1; // Interrupt on completion Size -= 8 * 1024; Buf += 4 * 1024; // Move the Buf pointer forward } // Last PRDT entry - cmd_tbl->prdtEntries[index_byte].Dba = (Kernel::UInt32)(Kernel::UIntPtr)Buf; - cmd_tbl->prdtEntries[index_byte].Dbc = Size - 1; // Byte count left - cmd_tbl->prdtEntries[index_byte].InterruptBit = 1; + cmd_tbl->prdtEntries[index_byte].Dba = (Kernel::UInt32)(Kernel::UIntPtr)Buf; + cmd_tbl->prdtEntries[index_byte].Dbc = Size - 1; // Byte count left + cmd_tbl->prdtEntries[index_byte].InterruptBit = 1; // 5. Prepare the command FIS (Frame Information Structure) FisRegH2D* cmd_fis = (FisRegH2D*)(&cmd_tbl->Cfis); Kernel::rt_set_memory(cmd_fis, 0, sizeof(FisRegH2D)); - cmd_fis->FisType = kFISTypeRegH2D; - cmd_fis->CmdOrCtrl = 1; // Command - cmd_fis->Command = kAHCICmdReadDmaEx; + cmd_fis->FisType = kFISTypeRegH2D; + cmd_fis->CmdOrCtrl = 1; // Command + cmd_fis->Command = kAHCICmdReadDmaEx; cmd_fis->Lba0 = (Kernel::UInt8)Lba; cmd_fis->Lba1 = (Kernel::UInt8)(Lba >> 8); @@ -161,7 +162,7 @@ Kernel::Void drv_std_read(Kernel::UInt64 Lba, Kernel::Char* Buf, Kernel::SizeT S cmd_fis->Lba4 = (Kernel::UInt8)(Lba >> 32); cmd_fis->Lba5 = (Kernel::UInt8)(Lba >> 40); - cmd_fis->CountLow = Size & 0xFF; + cmd_fis->CountLow = Size & 0xFF; cmd_fis->CountHigh = (Size >> 8) & 0xFF; // 6. Issue the command by writing to the kAhciPort's command issue register (CI) diff --git a/dev/zka/HALKit/AMD64/Storage/ATA-DMA.cxx b/dev/zka/HALKit/AMD64/Storage/ATA-DMA.cc index cc74d1ac..ddf08501 100644 --- a/dev/zka/HALKit/AMD64/Storage/ATA-DMA.cxx +++ b/dev/zka/HALKit/AMD64/Storage/ATA-DMA.cc @@ -15,10 +15,10 @@ * */ -#include <StorageKit/PRDT.hxx> +#include <StorageKit/PRDT.h> -#include <modules/ATA/ATA.hxx> -#include <ArchKit/ArchKit.hxx> +#include <modules/ATA/ATA.h> +#include <ArchKit/ArchKit.h> using namespace Kernel; diff --git a/dev/zka/HALKit/AMD64/Storage/ATA-PIO.cxx b/dev/zka/HALKit/AMD64/Storage/ATA-PIO.cc index d0a1cf45..96e7eb35 100644 --- a/dev/zka/HALKit/AMD64/Storage/ATA-PIO.cxx +++ b/dev/zka/HALKit/AMD64/Storage/ATA-PIO.cc @@ -15,8 +15,8 @@ * */ -#include <modules/ATA/ATA.hxx> -#include <ArchKit/ArchKit.hxx> +#include <modules/ATA/ATA.h> +#include <ArchKit/ArchKit.h> #ifdef __ATA_PIO__ |
