Plug and Play BIOS Specification

Plug and Play BIOS Specification 1.0A Page 33
4.5.3 Function 2 - Set System Device Node
Synopsis:
int FAR (*entryPoint)(Function, Node, devNodeBuffer, Control, BiosSelector);
int Function; /* PnP BIOS Function 2 */
unsigned char Node; /* Node number/handle to set */
struct DEV_NODE FAR *devNodeBuffer; /* Buffer containing device node data */
unsigned int Control; /* Control Flag */
unsigned int BiosSelector; /* PnP BIOS readable/writable selector */
Description:
Required. This function will allow system software to set the system resource configuration for the
specified System Device Node. The Node argument will contain the unique node number (handle) for the
device that is to be set, and devNodeBuffer contains the pointer to the node data structure that specifies the
new resource allocation request. The node data structure must completely describe the resource settings
for the device. A node data structure that contains partial settings will result in the improper set up of the
device. It cannot be assumed that any previous resource allocations will remain when this call is made.
It is important to note that the resource descriptors that define the resource allocation must be specified in
the same order as listed in the allocated resource configuration block for the system device node to be set.
The allocated resource configuration block should be used as a template for setting the new resources for
the device to ensure that the descriptors are specified in the correct format. In fact, the devNodeBuffer can
be a copy of the fetched System Device Node with its allocated resource configuration block modified to
reflect the desired new device configuration. Therefore, this function must be implemented to extract and
use only the relevant new resource configuration information while ignoring all other extraneous node
information. This function will not validate the resource settings or the checksum passed by the caller,
and may not return an error code.
To disable a device, all resource descriptors in the allocated resource configuration block of the System
Device Node must be set to zero. The resource attribute information field and the tag field are "Don't
Care" and may be zeroed.
The Control flag provides a mechanism for allowing the system software to indicate whether the
systemboard device configuration specified by this call is to take affect immediately or at the next boot.
Control is defined as:
Bits 15:2: Reserved (0)
Bit 1: 0=Do not set the device configuration for the next boot.
1=Set the device configuration for the next boot (static configuration).
Bit 0: 0=Do not set the device configuration dynamically.
1=Set the device configuration right now (dynamic configuration).
If Control flag is 0, neither bit 0 nor bit 1 is set and this function should return BAD_PARAMETER. If
both bits are set, then the system BIOS will attempt to set the configuration of the device right now
(dynamic configuration), as well as set the device configuration for the next boot (static configuration).
When both bits are set, it is possible that the NOT_SET_STATICALLY warning could be generated.
This indicates that the device was configured dynamically, but could not be configured statically (See
Appendix C, Error Codes).
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 64k, 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.
The function is available in real mode and 16-bit protected mode.
Returns: