Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Extensible Firmware Interface Specification
E-92 12/01/02 Version 1.10
E.5 UNDI as an EFI Runtime Driver
This section defines the interface between UNDI and EFI and how UNDI must be initialized as an
EFI runtime driver.
In the EFI environment, UNDI must implement the Network Interface Identifier (NII) protocol and
install an interface pointer of the type NII protocol with EFI. It must also install a device path
protocol with a device path that includes the hardware device path (such as PCI) appended with the
NICs MAC address. If the UNDI drives more than one NIC device, it must install one set of NII
and device path protocols for each device it controls.
UNDI must be compiled as a runtime driver so that when the operating system loads, a universal
protocol driver can use the UNDI driver to access the NIC hardware.
For the universal driver to be able to find UNDI, UNDI must install a configuration table (using the
EFI boot service InstallConfigurationTable()
) for the GUID
NETWORK_INTERFACE_IDENTIFIER_PROTOCOL
. The format of the configuration table for
UNDI is defined as follows.
struct undiconfig_table {
UINT32 NumberOfInterfaces; // The number of NIC devices
// that this UNDI controls.
UINT32 reserved;
struct undiconfigtable *nextlink;
// A pointer to the next UNDI
// configuration table.
struct {
VOID *NII_InterfacePointer;
// Pointer to the NII interface structure.
VOID *DevicePathPointer;
// pointer to the device path for this NIC
} NII_entry[n]; // The length of this array is given in
// the NumberOfInterfaces field.
} UNDI_CONFIG_TABLE;
Since there can only be one configuration table associated with any GUID and there can be more
than one UNDI loaded, every instance of UNDI must check for any previous installations of the
configuration tables and if there are any, it must traverse through the list of all UNDI configuration
tables using the nextlink and install itself as the nextlink of the last table in the list.
The universal protocol driver is responsible for converting all the pointers in the
UNDI_CONFIGURATION_TABLE to virtual addresses before accessing them. However, UNDI
must install an event handler for the SET_VIRTUAL_ADDRESS event and convert all its internal
pointers into virtual addresses when the event occurs for the universal protocol driver to be able
to use UNDI.