[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how do we write a single byte in the config. registers?
- To: Mailing List Recipients <pci-sig-request@znyx.com>
- Subject: Re: how do we write a single byte in the config. registers?
- From: "John R Pierce" <pierce@scruznet.com>
- Date: Tue, 19 Nov 1996 11:23:53 -0800
- Resent-Date: Tue, 19 Nov 1996 11:23:53 -0800
- Resent-From: pci-sig-request@znyx.com
- Resent-Message-Id: <"8-RNj.0.aR5.4dWao"@dart>
- Resent-Sender: pci-sig-request@znyx.com
> >Please lemme know I'd write a single byte in the 32 bit configuration
> >register without using the PCI BIOS, to put it the otherway, how would
> >one write a bios routine that'd write one byte into the configuration
> >register.
>
> This is described in section 3.7.4 in the PCI spec. rev 2.1. Note that
> you have to ask BIOS anyway to get the configuration mechanism (unless
> you're running you SW on selected systems).
Actually, its not that hard to test for config mech 1 and 2... I thought I had
a code fragment that did this, but I can't seem to locate it... Anyways, if I
recall correctly, you test for method 2 first, then method 1. Either method,
to write a single byte, you'd set the index register accordingly, then do a
byte output to the data port. The more complex task is locating your device in
configuration space, essentially you need to read the vendor and device ID at
every possible bus / dev / func location until you locate the vendor and device
ID you are looking for.
-jrp
( „ s