IDE Emulation Modes Inconsistency
Posted: Thu Jun 22, 2017 11:12 am
Hi,
I'm writing a bootloader for windows. In order to perform i/o with the HDD in real mode code, SATA AHCI is not an easy option, so I'm relying on IDE emulation modes. ATA commands works fine and for R/W i'm using BIOS int 13h.
In this Q965 chipset mobo I can set the emulation mode to "Compatible" or "Enhanced". I believe it shouldn't make any difference in how my code works, but I'm having some weird behavior. Works perfectly in virtual machines and other chipsets (tested in motherboards equipped with Q57 and Q77) and in "Compatible" mode in this Q965 (actually tested in 2 distinct machines with the same motherboard). When set to "Enhanced", a specific int13h read routine call returns with no error codes, but writes everything zeroed in the buffer.
It stops behaving like this if i disconnect the CD Drive (or disable it in cmos setup). Could it be a bad implementation of IDE emulation? Anything known to this chipset?
In the same bootloader, when loaded to a Q67 machine, the situations is inverse. "Enhanced" mode works just fine (ATA port i/o and int13h read/write). But in "Compatible" mode, port i/o with the emulated controllers returns FFh in every register.
I'm writing a bootloader for windows. In order to perform i/o with the HDD in real mode code, SATA AHCI is not an easy option, so I'm relying on IDE emulation modes. ATA commands works fine and for R/W i'm using BIOS int 13h.
In this Q965 chipset mobo I can set the emulation mode to "Compatible" or "Enhanced". I believe it shouldn't make any difference in how my code works, but I'm having some weird behavior. Works perfectly in virtual machines and other chipsets (tested in motherboards equipped with Q57 and Q77) and in "Compatible" mode in this Q965 (actually tested in 2 distinct machines with the same motherboard). When set to "Enhanced", a specific int13h read routine call returns with no error codes, but writes everything zeroed in the buffer.
It stops behaving like this if i disconnect the CD Drive (or disable it in cmos setup). Could it be a bad implementation of IDE emulation? Anything known to this chipset?
In the same bootloader, when loaded to a Q67 machine, the situations is inverse. "Enhanced" mode works just fine (ATA port i/o and int13h read/write). But in "Compatible" mode, port i/o with the emulated controllers returns FFh in every register.