[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PCIRf: How to access PCI Exp. cards in DOS



Keith Jasinski <jasinski@mortara.com> asks...
> I am looking for any information (either direct information or good book
> recommendations) on how to access PCI cards in DOS (command prompt only,
> not a console window with a Windows driver).  I am looking to learn how
> to find the cards on the bus (I believe the BIOS enumerates the bus on
> power up, so that info is somewhere), perform configuration cycles, and
> memory accesses.

the PCI 2.1 BIOS specification has what you need to do the configuration
cycles.

In DOS, you find devices by using the BIOS calls to scan all possible
BUS/DEV/FUNC combinations, looking for your devices ID.  Once you have a
device's BUS/DEV/FUNC 'key' you can then read the rest of its configuration
space, including base registers.

Many PCI devices use memory apertures that are not normally assigned to the
DOS-addressable lower 1MB.  You'll need some sort of 'DOS extender' to let you
get into 32bit protected mode in order to address these high locations.

-jrp