[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Reading a device's BAR
- To: Mailing List Recipients <pci-sig-request@znyx.com>
- Subject: RE: Reading a device's BAR
- From: John Keefe <keefe@magma.COM>
- Date: Thu, 16 Jan 97 09:35:06 -0800
- Resent-Date: Thu, 16 Jan 97 09:35:06 -0800
- Resent-From: pci-sig-request@znyx.com
- Resent-Message-Id: <"uMlHk1.0.8v6.3Qcto"@dart>
- Resent-Sender: pci-sig-request@znyx.com
>As I understand the way a PCI driver should be written, the BAR register
>should be read from the device for each access of the application to
>the PCI target, in order to know its location in the PCI address space.
Yes, but ordinary device drivers usually only need to read the BAR once.
The BAR is set up at configuration time (by your BIOS or console firmware)
and is not changed (at least, I've never seen one get changed once the
configuration is complete).
>This means a latency of 10 microseconds for reading/writing a PCI device
>!!!
>
>Am I right, or am I missing something ?
You are right. But the part you're missing is that the BAR is read once
and once only. All subsequent accesses are then based off of the data
obtained from the BAR (and saved somewhere in your driver's static data
area).
/john
------------------------------------------------------------
_/ _/ _/ _/_/_/ _/ _/ _/
_/_/ _/_/ _/ _/ _/ _/ _/_/ _/_/ _/ _/
_/ _/_/ _/ _/ _/ _/ _/ _/_/ _/ _/ _/
_/ _/ _/ _/_/_/_/ _/ _/_/_/ _/ _/ _/ _/_/_/_/
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/_/_/ _/ _/ _/ _/
------------------------------------------------------------
John M. Keefe, Jr. PCI Expansion Box Prod Mgr
Mesa Ridge Technologies -- MAGMA email: keefe@magma.com
6725 Mesa Ridge Road #100 Tel: (619)457-0750
San Diego, CA 92121 FAX: (619)457-0798
Have you seen our Web page yet? URL: <http://www.magma.com>
------------------------------------------------------------
ë