Specifications

Design Discussion
21
2.5.2.1 Legacy BIOS Interface and Functions
There is a table located within the traditional BIOS in either the 0xF000:xxxx or
0xE000:xxxx physical address range. The table is located on a 16-byte boundary and
provides the physical address of the entry point for the Compatibility16 Functions
.
The Compatibility16 functions provide the platform-specific information that is required
by the generic EfiCompatibility code. The functions are invoked via thunking by using
EFI_LEGACY_BIOS_PROTOCOL.FarCall86() with the 32-bit physical entry point
EFI_COMPATIBILITY16_TABLE.
See Compatibility16 Code in Code Definitions for definitions of the Compatibility16
functions and the 32-bit physical entry point.
2.5.2.2 EfiCompatibility to 16-Bit Legacy Transitions
There the following two cases of transitions:
Thunk
Reverse thunk
A thunk is the transition from EfiCompatibility to 16-bit traditional code and back. A
reverse thunk is the transition from 16-bit traditional code to EfiCompatibility and back.
See Thunk in CSM Architecture
for additional details.
2.5.2.3 EfiCompatibility Drivers
Three drivers are needed to emulate various traditional software INTs, as follows:
UGA emulation of INT10
Keyboard emulation of INT16
Block I/O emulation
The following sections provide more information on these INTs.
2.5.2.4 UGA Emulation of INT10
This situation occurs when traditional OpROMs are to be invoked. The UGA controller is
to be placed in VGA emulation mode and a VGA OpROM invoked. This driver must
translate EFI console-out data and requests into their VGA equivalent. The following
assumptions are used in this document:
All INT10 functions, both character and dot must be supported.
The OpROMs may access direct both VGA registers and video memory
buffers.
UGA hardware supports a VGA mode and can be switched between UGA/VGA
modes multiple times.
2.5.2.5 Keyboard Emulation of INT16
The Compatibility16 BIOS does not take over USB emulation until the final states of
traditional boot. Until that time, INT16 requests must be converted into EFI requests,
data received and converted back into INT16 format.