PCI related

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
Cemre

PCI related

Post by Cemre »

Which configuration method should I use to access PCI configuration registers?
PORT 0CF8-0CFF - PCI Configuration Mechanism 1 - Configuration Registers
SeeAlso: PORT 0CF8h"Mechanism 2"

0CF8d -W configuration address port (see #P0944)
0CFCd RW configuration data port (when PORT 0CF8h bit 31 is set)

Bitfields for PCI configuration address port:
Bit(s) Description (Table P0944)
1-0 reserved (00)
7-2 configuration register number (see #00878)
10-8 function
15-11 device number
23-16 bus number
30-24 reserved (0)
31 enable configuration space mapping
Note: configuration registers are considered DWORDs, so the number in bits
7-2 is the configuration space address shifted right two bits
SeeAlso: #P0945
or
PORT 0CF8-0CFA - PCI Configuration Mechanism 2 - Configuration Registers
Notes: this configuration mechanism is deprecated as of PCI version 2.1;
only mechanism 1 should be used for new systems
to access the configuration space, write the target bus number to
the Forward Register, then write to the Configuration Space
Enable register, and finally read or write the appropriate I/O
port(s) in the range C000h to CFFFh (where Cxrrh accesses location
'rr' in physical device 'x's configuration data)
the Intel "Saturn" and "Neptune" chipsets use configuration mechanism 2
SeeAlso: PORT 0CF8h"Mechanism 1",PORT C000h"PCI Configuration",PORT 0CFBh

0CF8 RW Configuration Space Enable (CSE) (see #P0945)
0CFA RW Forward Register (selects target bus number)

Bitfields for PCI Configuration Space Enable:
Bit(s) Description (Table P0945)
0 Special Cycle Enable (SCE)
3-1 target function number (PCI logical device within physical device)
7-4 key (non-zero to allow configuration)
SeeAlso: #P0944
Method 2 says it is deprecated but I'm still not sure...
thanks...
...Engin...
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PCI related

Post by Pype.Clicker »

well, i read the same kind of thing when i googled for PCI.
the best approach is probably to use method #1 by default except if you can detect the chipset on the motherboard is supporting #2 only ...

wouldn't PCI BIOS32 solve the problem for you ?

btw, where did you found this ? that's the kind of thing i found only in 'pentium emulator for VME bus' document ...

off-topic : if you could avoid big-blod-zones for the next time, my eyes would thank you ;D
Cemre

Re:PCI related

Post by Cemre »

I found these on ralph brown port list.

Actually I am writing an operating system and i thought plug and play also recognized PCI, where i understood i was mistaken, because PnP ( port 0x279 0xA79 thing ) didn't list my PCI devices, so i decided to learn PCI.

the real thing is ... I want to ( completely ) bypass bios, i know bios32 does that ( all pnp and PCI can be done by bios ) but i want to make something even if BIOS doesn't do it...

well thanks anyway, probably the non-deprecated method is best for me...
...Engin...
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PCI related

Post by Pype.Clicker »

Cemre wrote: well thanks anyway, probably the non-deprecated method is best for me...
That sounds the most reasonable. As a final move, you could have method #2 shipped as a plug-in module and let the user decide whether he will load it or not through configuration files...
User avatar
kataklinger
Member
Member
Posts: 381
Joined: Fri Nov 04, 2005 12:00 am
Location: Serbia

Re:PCI related

Post by kataklinger »

Pype.Clicker wrote: btw, where did you found this ? that's the kind of thing i found only in 'pentium emulator for VME bus' document ...
User avatar
kataklinger
Member
Member
Posts: 381
Joined: Fri Nov 04, 2005 12:00 am
Location: Serbia

Re:PCI related

Post by kataklinger »

User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PCI related

Post by Pype.Clicker »

muchos gracias - thanks - harikato - spasiba - merci - bedank - tak
Post Reply