diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-10-11 17:32:44 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-10-11 17:32:44 +0200 |
| commit | ad999c3e2e5ca4379e90d4e019b7671a1eaa3fbd (patch) | |
| tree | 9b8df3af900389d9e693ac32a3c28af7519db384 /dev/zka/HALKit | |
| parent | 25fa708c31a5a189fac7ad98d61f5541f3f7fa84 (diff) | |
IMP: Add new targets for OS X, Xcode.
FIX: Refactored kernel's source code according to codebase standards.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/zka/HALKit')
| -rw-r--r-- | dev/zka/HALKit/AMD64/CPUID.hxx | 120 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/HalAPICController.cxx | 2 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/Processor.hxx | 4 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/Storage/AHCI.cxx | 2 | ||||
| -rw-r--r-- | dev/zka/HALKit/AMD64/Storage/ATA-PIO.cxx | 4 |
5 files changed, 66 insertions, 66 deletions
diff --git a/dev/zka/HALKit/AMD64/CPUID.hxx b/dev/zka/HALKit/AMD64/CPUID.hxx index 966996fd..81d3b86d 100644 --- a/dev/zka/HALKit/AMD64/CPUID.hxx +++ b/dev/zka/HALKit/AMD64/CPUID.hxx @@ -15,67 +15,67 @@ enum { - eCPUFeatureSSE3 = 1 << 0, - eCPUFeaturePCLMUL = 1 << 1, - eCPUFeatureDTES64 = 1 << 2, - eCPUFeatureMONITOR = 1 << 3, - eCPUFeatureDS_CPL = 1 << 4, - eCPUFeatureVMX = 1 << 5, - eCPUFeatureSMX = 1 << 6, - eCPUFeatureEST = 1 << 7, - eCPUFeatureTM2 = 1 << 8, - eCPUFeatureSSSE3 = 1 << 9, - eCPUFeatureCID = 1 << 10, - eCPUFeatureSDBG = 1 << 11, - eCPUFeatureFMA = 1 << 12, - eCPUFeatureCX16 = 1 << 13, - eCPUFeatureXTPR = 1 << 14, - eCPUFeaturePDCM = 1 << 15, - eCPUFeaturePCID = 1 << 17, - eCPUFeatureDCA = 1 << 18, - eCPUFeatureSSE4_1 = 1 << 19, - eCPUFeatureSSE4_2 = 1 << 20, - eCPUFeatureX2APIC = 1 << 21, - eCPUFeatureMOVBE = 1 << 22, - eCPUFeaturePOP3C = 1 << 23, - eCPUFeatureECXTSC = 1 << 24, - eCPUFeatureAES = 1 << 25, - eCPUFeatureXSAVE = 1 << 26, - eCPUFeatureOSXSAVE = 1 << 27, - eCPUFeatureAVX = 1 << 28, - eCPUFeatureF16C = 1 << 29, - eCPUFeatureRDRAND = 1 << 30, + eCPUFeatureSSE3 = 1 << 0, + eCPUFeaturePCLMUL = 1 << 1, + eCPUFeatureDTES64 = 1 << 2, + eCPUFeatureMONITOR = 1 << 3, + eCPUFeatureDS_CPL = 1 << 4, + eCPUFeatureVMX = 1 << 5, + eCPUFeatureSMX = 1 << 6, + eCPUFeatureEST = 1 << 7, + eCPUFeatureTM2 = 1 << 8, + eCPUFeatureSSSE3 = 1 << 9, + eCPUFeatureCID = 1 << 10, + eCPUFeatureSDBG = 1 << 11, + eCPUFeatureFMA = 1 << 12, + eCPUFeatureCX16 = 1 << 13, + eCPUFeatureXTPR = 1 << 14, + eCPUFeaturePDCM = 1 << 15, + eCPUFeaturePCID = 1 << 17, + eCPUFeatureDCA = 1 << 18, + eCPUFeatureSSE4_1 = 1 << 19, + eCPUFeatureSSE4_2 = 1 << 20, + eCPUFeatureX2APIC = 1 << 21, + eCPUFeatureMOVBE = 1 << 22, + eCPUFeaturePOP3C = 1 << 23, + eCPUFeatureECXTSC = 1 << 24, + eCPUFeatureAES = 1 << 25, + eCPUFeatureXSAVE = 1 << 26, + eCPUFeatureOSXSAVE = 1 << 27, + eCPUFeatureAVX = 1 << 28, + eCPUFeatureF16C = 1 << 29, + eCPUFeatureRDRAND = 1 << 30, eCPUFeatureHYPERVISOR = 1 << 31, - eCPUFeatureFPU = 1 << 0, - eCPUFeatureVME = 1 << 1, - eCPUFeatureDE = 1 << 2, - eCPUFeaturePSE = 1 << 3, - eCPUFeatureEDXTSC = 1 << 4, - eCPUFeatureMSR = 1 << 5, - eCPUFeaturePAE = 1 << 6, - eCPUFeatureMCE = 1 << 7, - eCPUFeatureCX8 = 1 << 8, - eCPUFeatureAPIC = 1 << 9, - eCPUFeatureSEP = 1 << 11, - eCPUFeatureMTRR = 1 << 12, - eCPUFeaturePGE = 1 << 13, - eCPUFeatureMCA = 1 << 14, - eCPUFeatureCMOV = 1 << 15, - eCPUFeaturePAT = 1 << 16, - eCPUFeaturePSE36 = 1 << 17, - eCPUFeaturePSN = 1 << 18, - eCPUFeatureCLFLUSH = 1 << 19, - eCPUFeatureDS = 1 << 21, - eCPUFeatureACPI = 1 << 22, - eCPUFeatureMMX = 1 << 23, - eCPUFeatureFXSR = 1 << 24, - eCPUFeatureSSE = 1 << 25, - eCPUFeatureSSE2 = 1 << 26, - eCPUFeatureSS = 1 << 27, - eCPUFeatureHTT = 1 << 28, - eCPUFeatureTM = 1 << 29, - eCPUFeatureIA64 = 1 << 30, - eCPUFeaturePBE = 1 << 31 + eCPUFeatureFPU = 1 << 0, + eCPUFeatureVME = 1 << 1, + eCPUFeatureDE = 1 << 2, + eCPUFeaturePSE = 1 << 3, + eCPUFeatureEDXTSC = 1 << 4, + eCPUFeatureMSR = 1 << 5, + eCPUFeaturePAE = 1 << 6, + eCPUFeatureMCE = 1 << 7, + eCPUFeatureCX8 = 1 << 8, + eCPUFeatureAPIC = 1 << 9, + eCPUFeatureSEP = 1 << 11, + eCPUFeatureMTRR = 1 << 12, + eCPUFeaturePGE = 1 << 13, + eCPUFeatureMCA = 1 << 14, + eCPUFeatureCMOV = 1 << 15, + eCPUFeaturePAT = 1 << 16, + eCPUFeaturePSE36 = 1 << 17, + eCPUFeaturePSN = 1 << 18, + eCPUFeatureCLFLUSH = 1 << 19, + eCPUFeatureDS = 1 << 21, + eCPUFeatureACPI = 1 << 22, + eCPUFeatureMMX = 1 << 23, + eCPUFeatureFXSR = 1 << 24, + eCPUFeatureSSE = 1 << 25, + eCPUFeatureSSE2 = 1 << 26, + eCPUFeatureSS = 1 << 27, + eCPUFeatureHTT = 1 << 28, + eCPUFeatureTM = 1 << 29, + eCPUFeatureIA64 = 1 << 30, + eCPUFeaturePBE = 1 << 31 }; typedef __INT64_TYPE__ hal_cpu_feature_type; diff --git a/dev/zka/HALKit/AMD64/HalAPICController.cxx b/dev/zka/HALKit/AMD64/HalAPICController.cxx index 2c2c8765..0d8846ab 100644 --- a/dev/zka/HALKit/AMD64/HalAPICController.cxx +++ b/dev/zka/HALKit/AMD64/HalAPICController.cxx @@ -19,7 +19,7 @@ namespace Kernel::HAL MUST_PASS(this->fApic); UInt32 volatile* io_apic = (UInt32 volatile*)this->fApic; - io_apic[cIOAPICRegReg] = (reg & 0xFF); + io_apic[cIOAPICRegReg] = (reg & 0xFF); return io_apic[cIOAPICRegVal]; } diff --git a/dev/zka/HALKit/AMD64/Processor.hxx b/dev/zka/HALKit/AMD64/Processor.hxx index 25ea105d..b0a8aa0a 100644 --- a/dev/zka/HALKit/AMD64/Processor.hxx +++ b/dev/zka/HALKit/AMD64/Processor.hxx @@ -21,13 +21,13 @@ EXTERN_C { -# include <cpuid.h> +#include <cpuid.h> } #include <HALKit/AMD64/CPUID.hxx> /// @brief Maximum entries of the interrupt descriptor table. -#define kKernelIdtSize (0x100) +#define kKernelIdtSize (0x100) /// @brief interrupt for system call. #define kKernelInterruptId (0x32) diff --git a/dev/zka/HALKit/AMD64/Storage/AHCI.cxx b/dev/zka/HALKit/AMD64/Storage/AHCI.cxx index aa701112..60ea6d46 100644 --- a/dev/zka/HALKit/AMD64/Storage/AHCI.cxx +++ b/dev/zka/HALKit/AMD64/Storage/AHCI.cxx @@ -26,7 +26,7 @@ enum }; STATIC Kernel::PCI::Device kAhciDevice; -STATIC HbaPort* kAhciPort = nullptr; +STATIC HbaPort* kAhciPort = nullptr; /// @brief Initializes an AHCI disk. /// @param PortsImplemented the amount of port that have been detected. diff --git a/dev/zka/HALKit/AMD64/Storage/ATA-PIO.cxx b/dev/zka/HALKit/AMD64/Storage/ATA-PIO.cxx index f3d0c54b..0a80787f 100644 --- a/dev/zka/HALKit/AMD64/Storage/ATA-PIO.cxx +++ b/dev/zka/HALKit/AMD64/Storage/ATA-PIO.cxx @@ -123,7 +123,7 @@ Void drv_std_read(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorSz Out8(IO + ATA_REG_SEC_COUNT0, ((Size + SectorSz) / SectorSz)); - Out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); + Out8(IO + ATA_REG_LBA0, (Lba)&0xFF); Out8(IO + ATA_REG_LBA1, (Lba) >> 8); Out8(IO + ATA_REG_LBA2, (Lba) >> 16); Out8(IO + ATA_REG_LBA3, (Lba) >> 24); @@ -155,7 +155,7 @@ Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorS Out8(IO + ATA_REG_SEC_COUNT0, ((Size + (SectorSz)) / SectorSz)); - Out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); + Out8(IO + ATA_REG_LBA0, (Lba)&0xFF); Out8(IO + ATA_REG_LBA1, (Lba) >> 8); Out8(IO + ATA_REG_LBA2, (Lba) >> 16); Out8(IO + ATA_REG_LBA3, (Lba) >> 24); |
