AHCI Question

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

AHCI Question

Post by BrightLight »

I've just noticed something in the Windows Device Manager. My laptop's AHCI controller uses I/O ranges 0x3088 to 0x308F, 0x3094 to 0x3097, 0x3080 to 0x3087, 0x3090 to 0x3093 and 0x3060 to 0x307F. Let's say the first I/O range, 0x3088 to 0x308F, can it be used as an ATA bus? For example, can 0x3088 be the data port, 0x308E be the drive select port, and so on?
If not, how does IDE emulation from AHCI work?
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: AHCI Question

Post by Kevin »

IDE emulation is usually activated in the BIOS setup. It means that already on the PCI bus a different device appears. So if you see an AHCI device there, you can't access it as IDE; and vice versa, if IDE emulation is activated, you can't access the AHCI interface. Switching the device between these modes requires chipset specific code, so you probably don't want to do that. Just write both an IDE and an AHCI driver.
Developer of tyndur - community OS of Lowlevel (German)
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: AHCI Question

Post by BrightLight »

Kevin wrote:IDE emulation is usually activated in the BIOS setup. It means that already on the PCI bus a different device appears. So if you see an AHCI device there, you can't access it as IDE; and vice versa, if IDE emulation is activated, you can't access the AHCI interface. Switching the device between these modes requires chipset specific code, so you probably don't want to do that. Just write both an IDE and an AHCI driver.
Thanks! Actually, after I configure my laptop's BIOS to use IDE emulation, my OS detects a PCI IDE controller and my ATA driver works on my SATA drive! Yay! :D
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Post Reply