Specifications

Design Discussion
11
PrepareToBootEfi() Allows an external agent to prepare for booting to an EFI-aware OS. It
is a subset of actions taken by
LegacyBoot(). It causes legacy
drive numbers to be assigned.
ShadowAllLegacyOproms() Allows an external agent to force the loading of legacy OpROMs. A side
affect of this function is that all EFI drivers are disconnected and must
be reconnected for proper EFI functioning.
UpdateKeyboardLedStatus() Allows the EfiCompatibility code to synchronize the traditional BIOS BDA
with the state that EFI has programmed the keyboard LEDs. This
function does not touch hardware. The Compatibility16 code is invoked
with the state of the LEDs in case any proprietary information needs to
be updated.
GetBbsInfo(), LegacyBoot(), ShadowAllLegacyOproms(), and
PrepareToBootEfi()
BDS and BIOS Setup require certain information to intelligently determine boot devices
and require different actions to occur depending upon the type of OS being booted.
Determining what boot devices are available
Both BDS and BIOS Setup need to know the complete list of boot devices to
present a comprehensive list to the user. It is possible that a device
controller by both an EFI and legacy OpROM may report different results. EFI
drivers generate a list of boot devices and then the
EFI_LEGACY_BIOS_PROTOCOL.ShadowAllLegacyOproms() call is
issued. The internal CSM BBS table information is updated during the OpROM
initializations. The
EFI_LEGACY_BIOS_PROTOCOL.ShadowAllLegacyOproms()
function will disconnect all EFI devices so a reconnect must be performed
after the invocation.
EFI_LEGACY_BIOS_PROTOCOL.GetBbsInfo()
returns the list of legacy boot devices that were discovered. Note that at this
time no legacy drive numbers 0x8y have been assigned because the
Compatibility16 code has not been issued the
EFI_LEGACY_BIOS_PROTOCOL.PrepareToBootEfi() function.
Determining the boot OS type
Once the list of boot devices is available, the user selects the boot device. If
booting to a traditional OS, BDS issues the
EFI_LEGACY_BIOS_PROTOCOL.LegacyBoot() function. If booting to
an EFI-aware OS and any legacy OpROMs have been initialized, then
EFI_LEGACY_BIOS_PROTOCOL.PrepareToBootEfi() is issued.
2.4.2.2 Legacy BIOS Platform Protocol
The Legacy BIOS Platform Protocol provides the customization of CSM for both platform
configuration and for OEM differentiation. The table below lists the functions that are
included in the Legacy BIOS Platform Protocol. See
EFI_LEGACY_BIOS_PLATFORM_PROTOCOL in Code Definitions for the definitions of
these functions.
Table 4 Functions in the Legacy BIOS Platform Protocol
Function Description
GetPlatformHandle() Finds all handles for the requested entity and returns them sorted
by priority. Handle[0] is highest priority.