How to identify PCI resources and read PCI configuration in the 32-bit mode?
In 16-bit there's the int 1A method. What is in 32-bit mode?
Posted on 2002-06-20 02:55:26 by Vaxon
There are variants.
You can write 32-bit application with some DOS extender, e.g. WDOSX or with Watcom Linker in DOS32 mode etc. Program addresses all memory that presents on your machine but you use interrupts.
Programs that work under Win9x can use Virtual Drivers - they look like 16-bit interrupts.
But in Win2k there are no interrupts but you can write kernel mode driver.
If you want to write some program for detection computer devices types and so on I can recommend you DOS extender because you MUST work immediately with concrete chip.

Regards, Mike
Posted on 2002-06-20 05:49:39 by Mike
Thank you, Mike.
Actually I need to write a virtual driver.
I have read in the PCI specification, that it's possible to access PCI BIOS functions in 32-bit mode using BIOS32 Service Directory, which is located somewhere in the physical address range of 0E0000h - 0FFFFFh and holds the physical address of the service entry point. But how can I scan the physical address range in the vxd? Should I use MapPhysToLinear VMMservice of should I change the GDT? The latter option seems to be a bad idea?
I'm new to this stuff. Please help me to find the right path.
Posted on 2002-06-20 06:22:20 by Vaxon
When you program any chip you use IN and OUT commands for byte i/o or DMA. Both send/recieve data into memory, those are I/O PORTS. E.g. video use ports 03B0-03BB, 03C0-03DF, memory adresses A0000-AFFFF, B0000-BFFFF and so on. I am shure that you know all this. You can work under single task DOS or multitusk Windows or UNIX but be sure: programs that calculate some formulas never write some data into A0124. So you can do the same that in DOS. But be carefull: when two drivers do other things with the same device they clinch one another. So when I need to write some data to the screen I use DirectX functions. But sometimes I write vxd that prepare data and write (or read) them into absolute address. For example I attach source of VGA driver and "Beeper". You can download also 98DDK (Device Development Kit) but it is too large (about 52Mb unpacked). There are examples of drivers for all types of
units. Read those sources.
Regards, Mike
Posted on 2002-06-20 09:47:06 by Mike
Thanx, Mike.
Gonna explore your attachment now.
BTW, Are you russian?
I found some russian comments in one of the sorce codes.
Just curious...
Posted on 2002-06-20 16:13:42 by Vaxon
i used

VxDCall _PCI_Read_Config (win9x vxd)
invoke HalGetBusData (win2k kmd)

to find pci adapter resources..

Reading directly from pci-bus io resources has some compatibility problemes with some boards.
Posted on 2002-06-21 06:20:47 by kamilh