Specifications

Design Discussion
17
EFI can use either of the following functions to accomplish the thunk:
EFI_LEGACY_BIOS_PROTOCOL.Int86()
EFI_LEGACY_BIOS_PROTOCOL.FarCall86()
The 16-bit code returns to the EFI environment by performing an IRET or FAR RET.
The reverse thunk is similar to a thunk but is used on the 16-bit to 32-bit to 16-bit
transitions. There are no defined reverse thunks at this time. Its code is added for
completeness.
The figure below shows how the thunk and reverse thunk operate between the 16-bit
and 32-bit environments.
EfiCompatibility 32-bit environment
Compatibility16 16-bit environment
Thunk
Reverse
Thunk
Figure 3 Thunk and Reverse Thunk in a Traditional Code Environment