diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-03 06:05:26 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-03 06:05:26 +0100 |
| commit | bdfc8770e68da75c20e4127a9dd10f8a7c36810d (patch) | |
| tree | 9c451f9109b9992ef595bd77b63d187ffcb6d86a /dev/Kernel/HALKit/AMD64 | |
| parent | 6249f2078e0c024dc2cd52436ba11baf6f70bc2a (diff) | |
ADD: Format source code and define __wm_msg struct (public version)
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/HALKit/AMD64')
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/HalDebugOutput.cc | 2 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/AHCI.cc | 12 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/DMA.cc | 4 | ||||
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/Storage/PIO.cc | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc b/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc index f41160eb..55b67dea 100644 --- a/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc +++ b/dev/Kernel/HALKit/AMD64/HalDebugOutput.cc @@ -24,7 +24,7 @@ namespace NeOS namespace Detail { constexpr const UInt16 kPort = 0x3F8; - static UInt16 kState = kStateInvalid; + static UInt16 kState = kStateInvalid; /// @brief Init COM1. /// @return diff --git a/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc b/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc index a59e50f8..30bd4e78 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/AHCI.cc @@ -41,7 +41,7 @@ #define kSATAPortCnt (0x20) -#define kSATASig (0x00000101) +#define kSATASig (0x00000101) #define kSATAPISig (0xEB140101) #define kSATAProgIfAHCI (0x01) @@ -58,9 +58,9 @@ STATIC Int32 drv_find_cmd_slot(HbaPort* port) noexcept; STATIC Void drv_compute_disk_ahci() noexcept; STATIC PCI::Device kPCIDevice; -STATIC HbaMem* kSATA = nullptr; -STATIC SizeT kSATAIndex = 0UL; -STATIC Lba kHighestLBA = 0UL; +STATIC HbaMem* kSATA = nullptr; +STATIC SizeT kSATAIndex = 0UL; +STATIC Lba kHighestLBA = 0UL; STATIC UInt16 kSATAPortsImplemented = 0U; @@ -142,7 +142,7 @@ STATIC Void drv_std_input_output(UInt64 lba, UInt8* buffer, SizeT sector_sz, Siz if (Identify) h2d_fis->Command = kAHCICmdIdentify; - h2d_fis->Lba0 = (lba) & 0xFF; + h2d_fis->Lba0 = (lba)&0xFF; h2d_fis->Lba1 = (lba >> 8) & 0xFF; h2d_fis->Lba2 = (lba >> 16) & 0xFF; @@ -152,7 +152,7 @@ STATIC Void drv_std_input_output(UInt64 lba, UInt8* buffer, SizeT sector_sz, Siz h2d_fis->Lba4 = (lba >> 32) & 0xFF; h2d_fis->Lba5 = (lba >> 40) & 0xFF; - h2d_fis->CountLow = (size_buffer) & 0xFF; + h2d_fis->CountLow = (size_buffer)&0xFF; h2d_fis->CountHigh = (size_buffer >> 8) & 0xFF; while ((kSATA->Ports[kSATAIndex].Tfd & (kSATASRBsy | kSATASRDrq))) diff --git a/dev/Kernel/HALKit/AMD64/Storage/DMA.cc b/dev/Kernel/HALKit/AMD64/Storage/DMA.cc index 2793c1ec..fe5aab84 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/DMA.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/DMA.cc @@ -163,7 +163,7 @@ Void drv_std_read(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorSz rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + SectorSz - 1) / SectorSz)); - rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); + rt_out8(IO + ATA_REG_LBA0, (Lba)&0xFF); rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8); rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16); rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24); @@ -205,7 +205,7 @@ Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorS rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + (SectorSz - 1)) / SectorSz)); - rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); + rt_out8(IO + ATA_REG_LBA0, (Lba)&0xFF); rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8); rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16); rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24); diff --git a/dev/Kernel/HALKit/AMD64/Storage/PIO.cc b/dev/Kernel/HALKit/AMD64/Storage/PIO.cc index 96232e4b..8a8042cf 100644 --- a/dev/Kernel/HALKit/AMD64/Storage/PIO.cc +++ b/dev/Kernel/HALKit/AMD64/Storage/PIO.cc @@ -125,7 +125,7 @@ Void drv_std_read(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorSz rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + SectorSz) / SectorSz)); - rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); + rt_out8(IO + ATA_REG_LBA0, (Lba)&0xFF); rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8); rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16); rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24); @@ -152,7 +152,7 @@ Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf, SizeT SectorS rt_out8(IO + ATA_REG_SEC_COUNT0, ((Size + (SectorSz)) / SectorSz)); - rt_out8(IO + ATA_REG_LBA0, (Lba) & 0xFF); + rt_out8(IO + ATA_REG_LBA0, (Lba)&0xFF); rt_out8(IO + ATA_REG_LBA1, (Lba) >> 8); rt_out8(IO + ATA_REG_LBA2, (Lba) >> 16); rt_out8(IO + ATA_REG_LBA3, (Lba) >> 24); |
