summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-29 10:12:36 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-04-29 10:12:36 +0200
commit461fe537aa1f9533bfa5c2504cb84843b9eac501 (patch)
tree271395a293f788775c09abffdc0861dbf24af4ca /Private/HALKit
parent346558208d39a036effe3a4ec232fa5df5a3c8e7 (diff)
MHR-18: Filesystem fixes and improvements see ticket.
- Implement CreateCatalog for file creation, an implementation of RemoveCatalog is also needed. - Boot Kit only takes a single root file now. Must be ending with '/'. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit')
-rw-r--r--Private/HALKit/AMD64/Storage/ATA-PIO.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Private/HALKit/AMD64/Storage/ATA-PIO.cxx b/Private/HALKit/AMD64/Storage/ATA-PIO.cxx
index 6fe1e29a..9b37e248 100644
--- a/Private/HALKit/AMD64/Storage/ATA-PIO.cxx
+++ b/Private/HALKit/AMD64/Storage/ATA-PIO.cxx
@@ -106,7 +106,8 @@ Void drv_std_read(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf,
Out8(IO + ATA_REG_HDDEVSEL, (Command) | (((Lba) >> 24) & 0x0F));
- Out8(IO + ATA_REG_SEC_COUNT0, 2);
+ /// Compute sector count.
+ Out8(IO + ATA_REG_SEC_COUNT0, SectorSz / (SectorSz / 2));
Out8(IO + ATA_REG_LBA0, (Lba));
Out8(IO + ATA_REG_LBA1, (Lba) >> 8);
@@ -133,9 +134,10 @@ Void drv_std_write(UInt64 Lba, UInt16 IO, UInt8 Master, Char* Buf,
drv_std_wait_io(IO);
drv_std_select(IO);
+ /// Compute sector count.
Out8(IO + ATA_REG_HDDEVSEL, (Command) | (((Lba) >> 24) & 0x0F));
- Out8(IO + ATA_REG_SEC_COUNT0, 2);
+ Out8(IO + ATA_REG_SEC_COUNT0, SectorSz / (SectorSz / 2));
Out8(IO + ATA_REG_LBA0, (Lba));
Out8(IO + ATA_REG_LBA1, (Lba) >> 8);