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

Re: PCI BIOS



Hello,
 
the answer to your question depends entirely on your protected mode environment.
The document "Standard BIOS 32-bit Service Directory Proposal, Revision 0.4"
(which could be got from phoenix web site) defines this environment in very clear
manner. Probably, there's no good of the BIOS32 Service Directory and any of
services it points to, if you mean to use these under control of any PM OS (and
virtually any PM OS has its own PCI subsystem).
 
At a level of an OS, you probably need some locking mechanism to perform PCI
conf. accesses (imagine, the task switch has occured at the moment when your task
(i.e. any code running in context of your task -- PCI BIOS code, for example) has
written to the CONFIG_ADDRESS register (assuming that the mech. #1 is in use)
but not yet has used the CONFIG_DATA. After your task has been switched from,
someone else could destroy the value in CONFIG_ADDRESS).
 
What about accessing device configuration under Windows (from a device driver),
see for details articles Q140730 and Q253232 and also functions HalGetBusData*
and HalSetBusData*.
 
Also note that PCI bus numbers are dynamic in Windows and can change at any
moment. Usually, you do not need to scan PCI bus nor do any PCI access to locate
your device. With enough priviledges, you can obtain this information from the
HKLM\System\CurrentControlSet\Enum  and the
HKLM\System\CurrentControlSet\Services branches in the registry. The
former lists devices in a system, the latter defines correspondence between devices
and their drivers. You can set a notification for specific keys or analyze the
stream of incoming messages (see WM_DEVICECHANGE message) in order
to determine that the location of your device has changed (the bus number is
changed).
 
I hope the above answers your questions.
 
Regards,
Alexander Bezrukov.
 

Hello,

I need to scan the System Physical address range 0E0000h to 0FFFFFh in order to detect the presence of BIOS32 Service Directory on a 32 bit Protected mode. Do the programmers have the access to scan this address. I did this in C but got an memory exception.

So Please do let me know how can i go about this in order to get the PCI bus number and PCI device number.

----- Original Message -----
Sent: Wednesday, 12 June, 2002 16:24
Subject: PCI BIOS

Hello,

Does anyone know how to read the PCI configuration space with C under Windows?

thanks