Specifications

16
Compatibility16InstallPciHandler() Allows the Compatibility16 code to install an IRQ handler for mass
storage devices that do not have an OpROM associated with them.
An example is Serial ATA (SATA).
Compatibility16 Function Data Structures
There are two major structures passed from EfiCompatibility to Compatibility16:
EFI_TO_COMPATIBILITY16_INIT_TABLE
EFI_TO_COMPATIBILITY16_BOOT_TABLE
These tables describe the state of the machine at the time the function is issued.
EFI_TO_COMPATIBILITY16_INIT_TABLE is passed in during the
Compatibility16InitializeYourself() function.
EFI_TO_COMPATIBILITY16_BOOT_TABLE is passed in during the
Compatibility16PrepareToBoot() function.
2.4.3.2 Compatibility16 Support
The Compatibility16 support includes all runtime support and all software interrupts,
other than OpROMs and traditional hardware interrupt service routines.
CompatibilitySmm
The CompatibilitySmm code is optional. User requirements or traditional features may
force it to become a required piece of code. CompatibilitySmm is expected to be chipset
and/or platform specific. The following are possible examples:
System configuration data for INT15 D042 support
USB legacy support provided for keyboard and mouse
Update BBS with USB boot devices information
Thunk and Reverse Thunk Overview
Thunk is the code that switches from 32-bit protected environment into the 16-bit real-
mode environment. Reverse thunk is the code that does the opposite. The code ensures
that the 8259 PIC is correct for the environment. This piece of code is arcane.
The transition from EfiCompatibility to Compatibility16 code or to OpROM code requires a
“thunk.”. This code does the following:
Handles any APIC and PIC reprogramming and loading of new GDT and IDT
tables.
Performs the requested action.
Saves the 16-bit code interrupt state.
Restores the 32-bit interrupt environment and returns to EFI.