Specifications

v
Table of Contents
1 Introduction ..................................................................................................... 1
1.1 Overview .............................................................................................. 1
1.2 Scope ................................................................................................... 1
1.3 Rationale .............................................................................................. 1
2 Design Discussion ............................................................................................. 2
2.1 Definitions of Terms ................................................................................ 2
2.2 CSM-Specific References ......................................................................... 3
2.3 CSM Overview ....................................................................................... 3
2.3.1 Legacy Overview ....................................................................... 3
2.3.2 Differences between Traditional BIOS and EFI ............................... 4
2.3.3 BDS Legacy Flow ....................................................................... 5
2.3.4 Components of CSM .................................................................. 6
2.4 CSM Architecture ................................................................................... 6
2.4.1 Overview ................................................................................. 6
2.4.2 EfiCompatibility ......................................................................... 8
2.4.3 Compatibility16 ....................................................................... 14
2.4.4 CompatibilitySmm ................................................................... 16
2.4.5 Thunk and Reverse Thunk Overview ........................................... 16
2.5 Interactions between CSM and Legacy BIOS ............................................. 18
2.5.1 BDS and Legacy Drivers ........................................................... 18
2.5.2 16-Bit Traditional Code ............................................................ 20
2.6 Assumptions ........................................................................................ 22
2.6.1 External Assumptions .............................................................. 22
2.6.2 Internal Assumptions ............................................................... 22
2.6.3 Design Assumptions ................................................................ 23
2.7 Valid EFI and Legacy Combinations ......................................................... 24
3 Code Definitions ............................................................................................. 26
3.1 Introduction ........................................................................................ 26
3.2 EfiCompatibility Code ............................................................................ 27
3.2.1 Legacy BIOS Protocol ............................................................... 27
EFI_LEGACY_BIOS_PROTOCOL .............................................................. 27
EFI_LEGACY_BIOS_PROTOCOL.Int86() ................................................... 29
EFI_LEGACY_BIOS_PROTOCOL.FarCall86() .............................................. 35
EFI_LEGACY_BIOS_PROTOCOL.CheckPciRom() ........................................ 37
EFI_LEGACY_BIOS_PROTOCOL.InstallPciRom() ........................................ 38
EFI_LEGACY_BIOS_PROTOCOL.LegacyBoot() ........................................... 40
EFI_LEGACY_BIOS_PROTOCOL.UpdateKeyboardLedStatus() ...................... 43
EFI_LEGACY_BIOS_PROTOCOL.GetBbsInfo()............................................ 44
EFI_LEGACY_BIOS_PROTOCOL.ShadowAllLegacyOproms() ........................ 45
EFI_LEGACY_BIOS_PROTOCOL.PrepareToBootEfi() ................................... 46
EFI_LEGACY_BIOS_PROTOCOL.GetLegacyRegion() ................................... 47
EFI_LEGACY_BIOS_PROTOCOL.CopyLegacyRegion() ................................. 49
EFI_LEGACY_BIOS_PROTOCOL.BootUnconventionalDevice() ...................... 50
3.2.2 Legacy BIOS Platform Protocol .................................................. 52
EFI_LEGACY_BIOS_PLATFORM_PROTOCOL .............................................. 52
EFI_LEGACY_BIOS_PLATFORM_PROTOCOL.GetPlatformInfo() ..................... 54
EfiGetPlatformBinaryMpTable ................................................................. 57
EfiGetPlatformBinaryOemIntData ........................................................... 59
EfiGetPlatformBinaryOem16Data ............................................................ 61