summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Private/NewBoot/Source')
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/BootATA.cxx9
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/BootMain.cxx3
2 files changed, 4 insertions, 8 deletions
diff --git a/Private/NewBoot/Source/HEL/AMD64/BootATA.cxx b/Private/NewBoot/Source/HEL/AMD64/BootATA.cxx
index e55b2121..72340d01 100644
--- a/Private/NewBoot/Source/HEL/AMD64/BootATA.cxx
+++ b/Private/NewBoot/Source/HEL/AMD64/BootATA.cxx
@@ -154,6 +154,8 @@ Void boot_ata_read(UInt32 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf,
Out8(IO + ATA_REG_COMMAND, ATA_CMD_READ_PIO);
+ boot_ata_wait_io(IO);
+
BTextWriter writer;
writer.Write(L"NewBoot: Port: ").Write(IO).Write(L"\r\n");
@@ -162,8 +164,6 @@ Void boot_ata_read(UInt32 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf,
WideChar chr = In16(IO + ATA_REG_DATA);
Buf[IndexOff] = chr;
-
- boot_ata_wait_io(IO);
}
}
@@ -180,12 +180,11 @@ Void boot_ata_write(UInt32 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf,
Out8(IO + ATA_REG_COMMAND, ATA_CMD_WRITE_PIO);
+ boot_ata_wait_io(IO);
+
for (SizeT IndexOff = 0; IndexOff < Size; ++IndexOff) {
- // Send it two
Out16(IO + ATA_REG_DATA, Buf[IndexOff]);
- Out16(IO + ATA_REG_DATA, '\0');
- boot_ata_wait_io(IO);
}
}
diff --git a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx
index b90d9d60..5bff5929 100644
--- a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx
+++ b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx
@@ -38,9 +38,6 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle,
.Write(SystemTable->FirmwareVendor)
.Write(L"\r\n");
- /// Init ATA driver.
- BDeviceATA ataDrv;
-
/// Read Kernel blob.
BFileReader kernelImg(L".HCORE", ImageHandle);