Plug and Play BIOS Specification

Plug and Play BIOS Specification 1.0A Page 45
4.7.1 Function 9 - Set Statically Allocated Resource Information
Synopsis:
int FAR (*entryPoint)(Function, ResourceBlock, BiosSelector);
int Function; /* PnP BIOS Function 9 */
unsigned char FAR *ResourceBlock; /* Block of statically allocated resources */
unsigned int BiosSelector; /* PnP BIOS readable/writable selector */
Description:
Optional. This function will allow system software to report the system resources that are being utilized
by the static ISA devices installed in the system. The system software must pass a complete list of system
resources used by ALL of the legacy ISA devices that are not located on the system board. Therefore, any
time a legacy ISA device is added or removed from the system, the system software must construct a new
resource map and pass the information to the system BIOS by making this function call. This information
is important to the Plug and Play BIOS POST functionality for achieving the ability to bootstrap the
operating system from a Plug and Play boot device by allowing the Plug and Play BIOS to configure the
boot device around the legacy ISA devices. The resources allocated to the legacy ISA devices in the
system are reported in the ResourceBlock parameter. The format of the data contained in the block
follows the format defined in the Plug and Play ISA Specification under the section labeled Plug and Play
Resources. This data is provided as a series of data structures with each structure having a unique tag or
identifier. The resource descriptors supported by this function are the descriptors that describe IRQ,
DMA, I/O addresses, and memory resources. The resource information specified in this block must be
terminated with an END_TAG resource descriptor.
The BiosSelector parameter enables the system BIOS, if necessary, to update system variables that are
contained in the system BIOS memory space. If this function is called from protected mode, the caller
must create a data segment descriptor using the 16-bit Protected Mode data segment base address
specified in the Plug and Play Installation Check data structure, a limit of 64KB, and the descriptor must
be read/write capable. If this function is called from real mode, BiosSelector should be set to the Real
Mode 16-bit data segment address as specified in the Plug and Play Installation Check structure. Refer to
section 4.4 above for more information on the Plug and Play Installation Check Structure and the
elements that make up the structure.
If this function returns USE_ESCD_SUPPORT, then reporting resources allocated to devices to the
system BIOS must be handled through the interface defined by the ESCD Specification (see sections 4.7.4
- 4.7.6, functions 41h, 42h and 43h.).
This function is available in real mode and 16-bit protected mode.
Returns:
0 if successful - SUCCESS
!0 if an error (Bit 7 set) or a warning occurred or no pending events - error code (The function return
codes are described in Appendix C)
The FLAGS and registers will be preserved, except for AX which contains the return code.
Example:
The following example illustrates how the 'C' style call interface could be made from an assembly
language module:
.
.
.
push Bios Selector
push segment/selector of the Resource Block ; Pointer to the data structure of isa resources
push offset of Resource Block
push SET_STATICALLY_ALLOCATED_RESOURCES ; Function 9
call FAR PTR entryPoint
add sp,8 ; Clean up stack
cmp ax,SUCCESS ; Function completed successfully?
jne error ; No-handle error condition
.