Get SATA AHCI BAR

Programming, for all ages and all languages.
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Get SATA AHCI BAR

Post by iansjack »

That's probably a good assumption for the primary channel on the first controller. But you should test that you are getting sane responses before actually using it.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Get SATA AHCI BAR

Post by Combuster »

An IDE controller on the chipset is often designed to appear as an ISA one. So even though it is most likely listed as a PCI device, it will respond to ports not listed in it's BAR. That however does not hold for AHCI interfaces as they lack legacy.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
nerdboy69
Posts: 17
Joined: Wed Apr 23, 2014 1:41 am

Re: Get SATA AHCI BAR

Post by nerdboy69 »

sortie wrote:Read the replies you already got! The first reply linked to the PCI tutorial that covers all this. See the section about recursive scans.
Thx sortie for your help. My problem now is how to send the logs found on HDD to a FTP server...
Gigasoft
Member
Member
Posts: 855
Joined: Sat Nov 21, 2009 5:11 pm

Re: Get SATA AHCI BAR

Post by Gigasoft »

Bender wrote:I'm sorry for asking an ignorant question, but does the same go for a IDE controller? For now I assumed it as port 0x1F0.
For an IDE controller, each channel can operate in either Native or Compatibility mode. This is controlled by the Programming Interface byte. In Native mode, the port ranges are indicated by BARs and the IRQ lines are connected to a single PCI interrupt pin. In Compatibility mode, the port ranges are fixed and the IRQ lines are connected to fixed ISA IRQs. Check the PCI IDE specification.
Post Reply