Searching the SATA AHCI controller

153 views
Skip to first unread message

look alterno

unread,
Nov 6, 2012, 1:28:09 PM11/6/12
to bareme...@googlegroups.com
Hi!

In my PC, lspci show the SATA AHCI controller in slot.function 1f.2

andres@dell:~/NetBeansProjects/Pure64 v0.5.0 Distribution/src$ lspci -vt -s 1f
-[0000:00]-+-1f.0  Intel Corporation 82801HEM (ICH8M) LPC Interface Controller
           +-1f.1  Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller
           +-1f.2  Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller
           \-1f.3  Intel Corporation 82801H (ICH8 Family) SMBus Controller


The SATA AHCI Controller entry give me the IO port number for accessing the HDD under legacy mode. I don't know if the controller is always at slot.function 1f.2. If not, where/how I can find it? Or, if you can post the result of command "lspci -vt" on your machine, it will be great.

I'm trying to find a general solution for booting pure64 from SATA AHCI disks.

Thanks

Andrés

Ian Seyler

unread,
Nov 6, 2012, 2:11:17 PM11/6/12
to bareme...@googlegroups.com
Is no SATA controller detected with Pure64? I have seen issues where the BIOS does not fully enable AHCI before.

-Ian

look alterno

unread,
Nov 6, 2012, 3:48:22 PM11/6/12
to bareme...@googlegroups.com
Dear Ian:

In init_hdd.asm (Pure64's sources):

hdd_setup:
; Probe for PATA hard drive
mov dx, 0x01F0
mov [ata_base], dx
add dx, 7 ; Primary ATA Regular Status Byte
in al, dx
cmp al, 0xFF ; Check for "float" value
je hdd_setup_try_sata ; No drive detected
test al, 0xA9 ; Is ERR, DRQ, DF, or BSY set?
jne hdd_setup_err_read
jmp hdd_setup_load_sector

Instruction "in al, dx" return 0x50 in my PC. What does it mean? I don't know.

Under SATA's legacy mode, my "ata_base" is really 0x6EB0, not 0x01F0.

All test done on real hardware; my Core Duo doesn't support 64 bit virtualization. My PC is a Dell Inspiron 1525 con BIOS setup to use AHCI (factory default). 

I know hardware is a bitch and lots of real tests is the only way to go. I will gladly help you with any test you need. Just ask.

Enjoy

Andrés

Ian Seyler

unread,
Dec 17, 2012, 7:26:38 PM12/17/12
to bareme...@googlegroups.com
This will be reviewed shortly. PATA support could be dropped in the next version so SATA can be the primary focus.

-Ian
Reply all
Reply to author
Forward
0 new messages