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.
On the wiki I read that one of the ways to check wheter a controller exists or not is to write a value to two of the ports 0x1F2-0x1F5 and 0x172-0x175 and to read the values again and check if they're equal.
This method works on Bochs, Qemu and VMWare. But doesn't on VirtualBox and on (my) real hardware.
On my motherboard I've 6 SATA ports (ASUS Rampage II Extreme), but 0 controllers are detected... How's it possible? I would need at least 3 controllers.
How will I detect other controllers than the primary and secondary (do I need a PIIX driver... whatever it is)? And how will I fix that code?
Please, correct my English...
Motherboard: ASUS Rampage II Extreme
CPU: Core i7 950 @ 3.06 GHz OC at 3.6 GHz
RAM: 4 GB 1600 MHz DDR3
Video: nVidia GeForce 210 GTS... it sucks...
Maybe you could check the specifications and eventually put some sample code. I think that there are links to them in the wiki or searching with Google.
I have very well managed to detect standard ATA/ATAPI devices attached, you can read about the methods used here along with source code (watch mainly for the last posts which actually solve the issue):
I found ADVDRVR on ata-atapi.com, and now HD and CD detection works on any emulator. I didn't try VPC however. It still doesn't on my PC. I have a SATA HD and a IDE DVD drive. I expected at least the DVD drive to be detected. However I found in lspci:
OpenBSD has a special driver for a few (..older?) JMicron SATA/PATA host controllers, it acts as some sort of pass through device for pciide/ahci drivers.
SATA controllers should offer PCI IDE compatibility.. but this one might only support AHCI (Which is good, you'll get things like NCQ and device hot plugging).
Good luck.
EDIT: Try looking in your BIOS for a setting related to your SATA controller, perhaps you can force it into PCI IDE mode.
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.