Specifications
Design Discussion
15
Compatibility16 Table
There is a new table, EFI_COMPATIBILITY16_TABLE, introduced to the traditional
legacy runtime BIOS for CSM support. This table is on a 16-byte boundary and has a
signature of “$EFI” when read as a DWORD. The Compatibility16 code has a default
table generated at build time. The most important fields are the
Compatibility16CallSegment:Offset. EfiCompatibility uses this address to
issue Compatability16 Functions. The appropriate side fills in the other fields during
normal CSM operation.
Compatibility16 Functions
These functions allow the EfiCompatibility code to communicate with the Compatibility16
code and are an addition to the traditional BIOS runtime code.
These 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.
The table below lists the Compatibility16 functions that are available.
Table 8 Compatibility16 Functions
Functions Description
Compatibility16InitializeYourself() The first function that is invoked and allows the Compatibility16
code to do any initialization. Because EFI performs the equivalent
of POST, this invocation is the first time the Compatibility16 code
gets control. The region from 0xE0000 to 0xFFFFF is read/write.
Compatibility16UpdateBbs() Allows the Compatibility16 code to update the CSM’s BBS data
structures for any OpROM that hooked INT13, INT18, or INT19.
The region from 0xE0000 to 0xFFFFF is read-write.
Compatibility16PrepareToBoot() Allows the Compatibility16 code to do any last minute cleanup or
bookkeeping prior to booting a traditional OS. The region from
0xE0000 to 0xFFFFF is read-write.
Compatibility16Boot() The last function invoked prior to booting a traditional OS. The
region from 0xE0000 to 0xFFFFF is write protected.
Compatibility16RetrieveLastBootDevice() Retrieves the last boot device priority number. This number allows
the CSM to determine the boot device when multiple boot devices
exist. The region from 0xE0000 to 0xFFFFF is write protected.
Compatibility16DispatchOprom() Passes control to the OpROM initialization address under
Compatibility16 control. This address allows the Compatibility16
code to re-hook INT13, INT18, and/or INT19 for non-BBS-
compliant OpROMs. The region from 0xE0000 to 0xFFFFF is write
protected.
Note: If the platform allows OpROMs to be placed in the 0xExxxx
region, then that region is read/write.
Compatibility16GetTableAddress() Asks the Compatibility16 to allocate an area of the indicated size in
the 0xE0000–0xFFFFF region. The EfiCompatibility code then
copies data into that region. The region from 0xE0000 to 0xFFFFF
is read-write.
Compatibility16SetKeyboardLeds() Allows the Compatibility16 code to update any nonstandard data
structures with the keyboard LED state. The region from 0xE0000
to 0xFFFFF is read-write.










