OSDev.org

The Place to Start for Operating System Developers
It is currently Sun May 12, 2024 3:40 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: PCI scan for ATA Base Address Registers (BAR)?
PostPosted: Fri Aug 03, 2007 5:15 am 
Offline

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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 03, 2007 6:34 am 
Offline

Joined: Mon Jun 25, 2007 2:54 pm
Posts: 23
Location: Russia
Quote:
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

Quote:
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. =)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot] and 36 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group