Hi,
There seem to be a SATA and an IDE controller on a laptop (lspci on Linux):
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA controller [AHCI mode]
00:14.1 IDE Interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller (rev 40)
So the SATA is bus=0, device=0x11 and function=0, the IDE is bus=0, device=0x14 and function=1.
I already configured the SATA controller to be IDE and in compatibility mode according to the "SB700/710/750 Register Reference Guide" (datasheet) but it doesn't want to work (I have no AHCI driver).
I set bit0 of the 32bit-register 0x40 to 1 and its bit24 to 0 (val=inb(0x40), outb(0x40, val | 0x01) and val=inb(0x43), outb(0x43, val & 0xFE)) then
I changed the deviceID to 0x4390 (IDE, outw(0x02, 0x4390)) and also changed the subclassId to 0x01 (outb(0x0A, 0x01)),
finally I set the legacy mode by clearing bit0 and bit2 in register 0x09 (val=inb(0x09), outb(0x09, val & 0xFA))
My pcils command correctly shows the changed values (devId, subclass) and I also the values of the other changed regsiters are correct and I already implemented the same thing in case of an Intel (ICH7 datasheet) SATA controller and it works.
The winchester doesn't get detected. Probably because not the SATA but the IDE controller is used (but it's in compatibility mode). According to the datasheet in compatibility mode the BAR addresses are not used,
so how could I determine if the Primary Bus (0x1F0) is connected to the SATA or the IDE controller?
EDIT: I mean how will I know if the SATA controller is mapped to 0x1F0 or 0x170, or the IDE?
I hope it's not too silly a question.
PCI-related question [SOLVED]
PCI-related question [SOLVED]
Last edited by bigbob on Sat Oct 12, 2013 5:02 am, edited 1 time in total.
Re: PCI-related question
Only one controller should have a channel set to compatibility mode at a time. It is an error to configure multiple controllers with the same I/O address. You should set the IDE controller to native mode or disable it by writing a "0" to bit 0 of the command register.
Re: PCI-related question
Thank you!Gigasoft wrote:Only one controller should have a channel set to compatibility mode at a time. It is an error to configure multiple controllers with the same I/O address. You should set the IDE controller to native mode or disable it by writing a "0" to bit 0 of the command register.
EDIT: Setting the IDE controller to native mode solved it.