diff --git a/kernel/kernel/Storage/ATABus.cpp b/kernel/kernel/Storage/ATABus.cpp index 268069b54..7557be314 100644 --- a/kernel/kernel/Storage/ATABus.cpp +++ b/kernel/kernel/Storage/ATABus.cpp @@ -265,6 +265,8 @@ namespace Kernel io_write(ATA_PORT_LBA2, (uint8_t)(lba >> 16)); io_write(ATA_PORT_COMMAND, ATA_COMMAND_READ_SECTORS); + PIT::sleep(1); + for (uint32_t sector = 0; sector < sector_count; sector++) { block_until_irq(); @@ -297,6 +299,8 @@ namespace Kernel io_write(ATA_PORT_LBA2, (uint8_t)(lba >> 16)); io_write(ATA_PORT_COMMAND, ATA_COMMAND_WRITE_SECTORS); + PIT::sleep(1); + for (uint32_t sector = 0; sector < sector_count; sector++) { write_buffer(ATA_PORT_DATA, (uint16_t*)buffer + sector * device->m_sector_words, device->m_sector_words);