Chapter 4 – Programming
4-9
You can access the BIOS32 Service Directory by doing a FAR CALL to the entry point
obtained from the Service data structure. However, you must meet several requirements
about the calling environment. You must set the CS code segment selector and the DS
data segment selector to encompass the physical page holding the entry point, as well as
the immediately following physical page. They must also have the same base. The SS
stack segment selector must be 32-bit and provide at least 1 Kbyte of stack space. The
calling environment must also allow access to I/O space.
The BIOS32 Service Directory provides a single function call to locate the PCI BIOS
service. All parameters to the function are passed in registers. Parameter descriptions are
provided below. Three values are returned by the call. The first is the base physical
address of the PCI BIOS service; the second is the length of the service; and the third is
the entry point to the service encoded as an offset from the base. The first and second
values can be used to build the code segment selector and data segment selector for
accessing the service.
ENTRY:
[EAX] Service Identifier = “$PCI” (049435024h)
[EBX]
Set to Zero
EXIT:
[AL]
Return Code:
00h = Successful
80h = Service Identifier not found
81h = Invalid value in [BL]
[EBX]
Physical address of the base of the PCI BIOS service
[ECX]
Length of the PCI BIOS service
[EDX] Entry point into the PCI BIOS Service. This is an offset from the base
provided in [EBX].
PCI BIOS Function Calls
Use the available function calls to identify the location of resources and to access
configuration space of the VMEbus interface. Special functions allow the reading and
writing of individual bytes, words, and dwords in the configuration space.
You must invoke PCI BIOS routines (for both 16- and 32-bit callers) with appropriate
privilege so that interrupts can be enabled/disabled and the routines can access I/O space.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com