PCI scan for ATA Base Address Registers (BAR)?

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
fei
Posts: 10
Joined: Sat Jul 07, 2007 4:40 am

PCI scan for ATA Base Address Registers (BAR)?

Post by fei »

I need to do PCI scan to find the Bus Master Registers for ATA since I want to have DMA for my ATA driver. I followed the T13 1510D document. When I printed out the BAR addresses, I got:

base_class: 00000001, sub_class: 00000001
BAR00: 00000000, BAR01: 00000000, BAR02: 00000000
BAR03: 00000000, BAR04: 0000C000, BAR05: 00000000

According to the specification, BAR04 should be the base address for Bus Master registers. But all other BARs are all zeros. IS THIS CORRECT???

By default, ATA Command block and control block registers are mapped to ISA. That's why I can use 0x1F0-0x1F7 and 0x170-0x177 to do PIO read/write. This is the "compatibility mode". If I switch to "native mode", does that mean the BARs will not be all zeros?

Do I have to swith to "native mode" in order to enable DMA for ATA drives?

Reading Specs does not always help :-(

Thanks in advance!
Pavia
Posts: 23
Joined: Mon Jun 25, 2007 2:54 pm
Location: Russia

Post by Pavia »

IS THIS CORRECT???
Yes correct.
Zero BAR mean register not use or specific. For ATA if BAR zero use
01F0h
03F4h
0170h
0374h

Remembe Control Block =Control Block Base Address+2
If I switch to "native mode", does that mean the BARs will not be all zeros?
Yes the right.

I read many specifications.
Sorry, my bed english. =)
Post Reply