Why are you looking at this and how do you expect to use this info with
Windows?
What you are looking at is the definition of the Config Address register,
I/O address CF8h, when using Configuration Mechanism 1 (the only one ever
implimented) to access Configuration space on a PC. Bit 31 enables the
access through the Config Data register, I/O address CFCh. Bits 16-23 are
the PCI bus number, bits 11-15 are the PCI Device number, and 8-10 are the
Function number. Bits 7-2 are bits 7-2 of the device’s register number.
The bottom two bits must be zero. All accesses are full DWORDs retrieved
by reading or writing the Config Data register. So in the example you
cite, you would write 0x800004C0C (Enable, bus 0, device 11, function 0,
register 0c-0f) to CF8h and read the DWORD from CF8h. Then you would
extract the second byte from that DWORD, bits 8-15, to see the Latency
Timer.
Ref. PCI Local Bus Specification 3.0, 3.2.2.3.2, Software Generation of
Configuration Transactions
Do not use this under Windows; access to the CF8/CFC registers needs to be
coordinates and there are no methods to do so. You will hose Windows.
But playing with them under MS-DOS is OK.
chandra97 97
Sent by: xxxxx@lists.osr.com
04/27/2009 10:08 AM
Please respond to
“Windows System Software Devs Interest List”
To
“Windows System Software Devs Interest List”
cc
Subject
Re: [ntdev] PCI CONFADD to register number mapping
Sorry Maxim, I couldn’t quite follow what you said. As I indicated CONFADD
looks like
ULONG confaddr=(1<<31) | (0 << 16) | ((ULONG)11 << 11) | (0 << 8) |
(0x0C);
and the least significant byte (LSB) is 0xC and not 0xd and register
number as per the datasheet is calculated from bits 7:2 of LSB, which in
the above example is comes to 0x3.
On Mon, Apr 27, 2009 at 3:19 AM, Maxim S. Shatskih > wrote:
00001100 is 0xc, and you probably have 00001101 which is 0xd
The junior 1 probably means “read a single byte, not the whole 32bit
word”.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
“chandra97 97” wrote in message news:xxxxx@ntdev…
Hi,
Note sure this is the right forum to ask this question. Its more of a
hardware related question. But, I’m going to give it a try…
This is regarding mapping PCI CONFADD DWORD value to register number
mapping. I tried to folllow the datasheet but when I saw an example, I
couldn’t correlate the datasheet specification to the example.
Here is an example of a CONFADD to register number mapping, I saw in a
sample code
ULONG confaddr=(1<<31) | (0 << 16) | ((ULONG)11 << 11) | (0 << 8) |
(0x0C);
and according to the code it maps to register number 0xd for master
latency timer.
How can be so? According to the datasheet (82434LX/82434NX PCI, CACHE AND
MEMORY CONTROLLER) the register number is calculated as from bit 7-2 of
CONFADDR DWORD and by that logic the register number should 3.
Specifically, 0x0C <==> 00001100 in binary and bit 7-2 correspond to
000011 <==> 3.
So the register number should be 3 not 0xd. Can someone explain that?
Thanks,
Chandra
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
— NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer