EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Data Structures | Defines | Typedefs | Enumerations | Variables

IntelFrameworkPkg/Include/Protocol/LegacyBios.h File Reference

Go to the source code of this file.

Data Structures

struct  EFI_COMPATIBILITY16_TABLE
struct  EFI_DISPATCH_OPROM_TABLE
struct  EFI_TO_COMPATIBILITY16_INIT_TABLE
struct  DEVICE_PRODUCER_SERIAL
struct  DEVICE_PRODUCER_PARALLEL
 @) More...
struct  DEVICE_PRODUCER_FLOPPY
struct  LEGACY_DEVICE_FLAGS
struct  DEVICE_PRODUCER_DATA_HEADER
struct  ATAPI_IDENTIFY
struct  HDD_INFO
struct  BBS_STATUS_FLAGS
struct  BBS_TABLE
struct  SMM_ATTRIBUTES
struct  SMM_FUNCTION
struct  SMM_ENTRY
struct  SMM_TABLE
struct  UDC_ATTRIBUTES
struct  UD_TABLE
struct  EFI_TO_COMPATIBILITY16_BOOT_TABLE
struct  EFI_LEGACY_INSTALL_PCI_HANDLER
struct  EFI_EFLAGS_REG
struct  EFI_DWORD_REGS
struct  EFI_FLAGS_REG
struct  EFI_WORD_REGS
struct  EFI_BYTE_REGS
union  EFI_IA32_REGISTER_SET
struct  _EFI_LEGACY_BIOS_PROTOCOL

Defines

#define EFI_COMPATIBILITY16_TABLE_SIGNATURE   SIGNATURE_32 ('I', 'F', 'E', '$')
#define HDD_PRIMARY   0x01
#define HDD_SECONDARY   0x02
#define HDD_MASTER_ATAPI_CDROM   0x04
#define HDD_SLAVE_ATAPI_CDROM   0x08
#define HDD_MASTER_IDE   0x20
#define HDD_SLAVE_IDE   0x40
#define HDD_MASTER_ATAPI_ZIPDISK   0x10
#define HDD_SLAVE_ATAPI_ZIPDISK   0x80
#define EFI_TO_LEGACY_MAJOR_VERSION   0x02
#define EFI_TO_LEGACY_MINOR_VERSION   0x00
#define MAX_IDE_CONTROLLER   8
#define EFI_LEGACY_BIOS_PROTOCOL_GUID
#define NO_ROM   0x00
#define ROM_FOUND   0x01
#define VALID_LEGACY_ROM   0x02
#define ROM_WITH_CONFIG   0x04
 Not defined in the Framework CSM Specification.
#define CARRY_FLAG   0x01
#define DEVICE_SERIAL_MODE_NORMAL   0x00
#define DEVICE_SERIAL_MODE_IRDA   0x01
#define DEVICE_SERIAL_MODE_ASK_IR   0x02
#define DEVICE_SERIAL_MODE_DUPLEX_HALF   0x00
#define DEVICE_SERIAL_MODE_DUPLEX_FULL   0x10
#define DEVICE_PARALLEL_MODE_MODE_OUTPUT_ONLY   0x00
#define DEVICE_PARALLEL_MODE_MODE_BIDIRECTIONAL   0x01
#define DEVICE_PARALLEL_MODE_MODE_EPP   0x02
#define DEVICE_PARALLEL_MODE_MODE_ECP   0x03
#define BBS_FLOPPY   0x01
#define BBS_HARDDISK   0x02
#define BBS_CDROM   0x03
#define BBS_PCMCIA   0x04
#define BBS_USB   0x05
#define BBS_EMBED_NETWORK   0x06
#define BBS_BEV_DEVICE   0x80
#define BBS_UNKNOWN   0xff
#define BBS_DO_NOT_BOOT_FROM   0xFFFC
#define BBS_LOWEST_PRIORITY   0xFFFD
#define BBS_UNPRIORITIZED_ENTRY   0xFFFE
#define BBS_IGNORE_ENTRY   0xFFFF
#define STANDARD_IO   0x00
#define STANDARD_MEMORY   0x01
#define PORT_SIZE_8   0x00
#define PORT_SIZE_16   0x01
#define PORT_SIZE_32   0x02
#define PORT_SIZE_64   0x03
#define DATA_SIZE_8   0x00
#define DATA_SIZE_16   0x01
#define DATA_SIZE_32   0x02
#define DATA_SIZE_64   0x03
#define INT15_D042   0x0000
#define GET_USB_BOOT_INFO   0x0001
#define DMI_PNP_50_57   0x0002
#define STANDARD_OWNER   0x0
#define OEM_OWNER   0x1
#define EFI_SEGMENT(_Adr)   (UINT16) ((UINT16) (((UINTN) (_Adr)) >> 4) & 0xf000)
#define EFI_OFFSET(_Adr)   (UINT16) (((UINT16) ((UINTN) (_Adr))) & 0xffff)

Typedefs

typedef UINT8 SERIAL_MODE
typedef UINT8 PARALLEL_MODE
typedef struct
_EFI_LEGACY_BIOS_PROTOCOL 
EFI_LEGACY_BIOS_PROTOCOL
typedef BOOLEAN(EFIAPI * EFI_LEGACY_BIOS_INT86 )(IN EFI_LEGACY_BIOS_PROTOCOL *This, IN UINT8 BiosInt, IN OUT EFI_IA32_REGISTER_SET *Regs)
typedef BOOLEAN(EFIAPI * EFI_LEGACY_BIOS_FARCALL86 )(IN EFI_LEGACY_BIOS_PROTOCOL *This, IN UINT16 Segment, IN UINT16 Offset, IN EFI_IA32_REGISTER_SET *Regs, IN VOID *Stack, IN UINTN StackSize)
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_CHECK_ROM )(IN EFI_LEGACY_BIOS_PROTOCOL *This, IN EFI_HANDLE PciHandle, OUT VOID **RomImage, OPTIONAL OUT UINTN *RomSize, OPTIONAL OUT UINTN *Flags)
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_INSTALL_ROM )(IN EFI_LEGACY_BIOS_PROTOCOL *This, IN EFI_HANDLE PciHandle, IN VOID **RomImage, OUT UINTN *Flags, OUT UINT8 *DiskStart, OPTIONAL OUT UINT8 *DiskEnd, OPTIONAL OUT VOID **RomShadowAddress, OPTIONAL OUT UINT32 *ShadowedRomSize OPTIONAL)
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_BOOT )(IN EFI_LEGACY_BIOS_PROTOCOL *This, IN BBS_BBS_DEVICE_PATH *BootOption, IN UINT32 LoadOptionsSize, IN VOID *LoadOptions)
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_UPDATE_KEYBOARD_LED_STATUS )(IN EFI_LEGACY_BIOS_PROTOCOL *This, IN UINT8 Leds)
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_GET_BBS_INFO )(IN EFI_LEGACY_BIOS_PROTOCOL *This, OUT UINT16 *HddCount, OUT HDD_INFO **HddInfo, OUT UINT16 *BbsCount, IN OUT BBS_TABLE **BbsTable)
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_PREPARE_TO_BOOT_EFI )(IN EFI_LEGACY_BIOS_PROTOCOL *This, OUT UINT16 *BbsCount, OUT BBS_TABLE **BbsTable)
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_BOOT_UNCONVENTIONAL_DEVICE )(IN EFI_LEGACY_BIOS_PROTOCOL *This, IN UDC_ATTRIBUTES Attributes, IN UINTN BbsEntry, IN VOID *BeerData, IN VOID *ServiceAreaData)
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_SHADOW_ALL_LEGACY_OPROMS )(IN EFI_LEGACY_BIOS_PROTOCOL *This)
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_GET_LEGACY_REGION )(IN EFI_LEGACY_BIOS_PROTOCOL *This, IN UINTN LegacyMemorySize, IN UINTN Region, IN UINTN Alignment, OUT VOID **LegacyMemoryAddress)
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_COPY_LEGACY_REGION )(IN EFI_LEGACY_BIOS_PROTOCOL *This, IN UINTN LegacyMemorySize, IN VOID *LegacyMemoryAddress, IN VOID *LegacyMemorySourceAddress)

Enumerations

enum  EFI_COMPATIBILITY_FUNCTIONS {
  Compatibility16InitializeYourself = 0x0000, Compatibility16UpdateBbs = 0x0001, Compatibility16PrepareToBoot = 0x0002, Compatibility16Boot = 0x0003,
  Compatibility16RetrieveLastBootDevice = 0x0004, Compatibility16DispatchOprom = 0x0005, Compatibility16GetTableAddress = 0x0006, Compatibility16SetKeyboardLeds = 0x0007,
  Compatibility16InstallPciHandler = 0x0008, Legacy16InitializeYourself = 0x0000, Legacy16UpdateBbs = 0x0001, Legacy16PrepareToBoot = 0x0002,
  Legacy16Boot = 0x0003, Legacy16RetrieveLastBootDevice = 0x0004, Legacy16DispatchOprom = 0x0005, Legacy16GetTableAddress = 0x0006,
  Legacy16SetKeyboardLeds = 0x0007, Legacy16InstallPciHandler = 0x0008
}

Variables

EFI_GUID gEfiLegacyBiosProtocolGuid

Detailed Description

The EFI Legacy BIOS Protocol is used to abstract legacy Option ROM usage under EFI and Legacy OS boot. This file also includes all the related COMPATIBILIY16 structures and defintions.

Note: The names for EFI_IA32_REGISTER_SET elements were picked to follow well known naming conventions.

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.

Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Revision Reference:
This protocol is defined in Framework for EFI Compatibility Support Module spec Version 0.97.

Definition in file LegacyBios.h.


Define Documentation

#define BBS_BEV_DEVICE   0x80

Definition at line 710 of file LegacyBios.h.

#define BBS_CDROM   0x03

Definition at line 706 of file LegacyBios.h.

#define BBS_DO_NOT_BOOT_FROM   0xFFFC

BBS boot priority values

Definition at line 717 of file LegacyBios.h.

#define BBS_EMBED_NETWORK   0x06

Definition at line 709 of file LegacyBios.h.

#define BBS_FLOPPY   0x01

BBS device type values

Definition at line 704 of file LegacyBios.h.

#define BBS_HARDDISK   0x02

Definition at line 705 of file LegacyBios.h.

#define BBS_IGNORE_ENTRY   0xFFFF

Definition at line 720 of file LegacyBios.h.

#define BBS_LOWEST_PRIORITY   0xFFFD

Definition at line 718 of file LegacyBios.h.

#define BBS_PCMCIA   0x04

Definition at line 707 of file LegacyBios.h.

#define BBS_UNKNOWN   0xff

Definition at line 711 of file LegacyBios.h.

#define BBS_UNPRIORITIZED_ENTRY   0xFFFE

Definition at line 719 of file LegacyBios.h.

#define BBS_USB   0x05

Definition at line 708 of file LegacyBios.h.

#define CARRY_FLAG   0x01

Definition at line 995 of file LegacyBios.h.

#define DATA_SIZE_16   0x01

Definition at line 769 of file LegacyBios.h.

#define DATA_SIZE_32   0x02

Definition at line 770 of file LegacyBios.h.

#define DATA_SIZE_64   0x03

Definition at line 771 of file LegacyBios.h.

#define DATA_SIZE_8   0x00

SMM_ATTRIBUTES data size constants.

Definition at line 768 of file LegacyBios.h.

#define DEVICE_PARALLEL_MODE_MODE_BIDIRECTIONAL   0x01

Definition at line 462 of file LegacyBios.h.

#define DEVICE_PARALLEL_MODE_MODE_ECP   0x03

Definition at line 464 of file LegacyBios.h.

#define DEVICE_PARALLEL_MODE_MODE_EPP   0x02

Definition at line 463 of file LegacyBios.h.

#define DEVICE_PARALLEL_MODE_MODE_OUTPUT_ONLY   0x00

DEVICE_PRODUCER_PARALLEL's modes.

Definition at line 461 of file LegacyBios.h.

#define DEVICE_SERIAL_MODE_ASK_IR   0x02

Definition at line 443 of file LegacyBios.h.

#define DEVICE_SERIAL_MODE_DUPLEX_FULL   0x10

Definition at line 445 of file LegacyBios.h.

#define DEVICE_SERIAL_MODE_DUPLEX_HALF   0x00

Definition at line 444 of file LegacyBios.h.

#define DEVICE_SERIAL_MODE_IRDA   0x01

Definition at line 442 of file LegacyBios.h.

#define DEVICE_SERIAL_MODE_NORMAL   0x00

DEVICE_PRODUCER_SERIAL's modes.

Definition at line 441 of file LegacyBios.h.

#define DMI_PNP_50_57   0x0002

Definition at line 787 of file LegacyBios.h.

#define EFI_COMPATIBILITY16_TABLE_SIGNATURE   SIGNATURE_32 ('I', 'F', 'E', '$')

Definition at line 38 of file LegacyBios.h.

#define EFI_LEGACY_BIOS_PROTOCOL_GUID
Value:
{ \
    0xdb9a1e3d, 0x45cb, 0x4abb, {0x85, 0x3b, 0xe5, 0x38, 0x7f, 0xdb, 0x2e, 0x2d } \
  }

Definition at line 970 of file LegacyBios.h.

#define EFI_OFFSET (   _Adr)    (UINT16) (((UINT16) ((UINTN) (_Adr))) & 0xffff)

Definition at line 992 of file LegacyBios.h.

#define EFI_SEGMENT (   _Adr)    (UINT16) ((UINT16) (((UINTN) (_Adr)) >> 4) & 0xf000)

The following macros do not appear in the Framework CSM Specification and are kept for backward compatibility only. They convert 32-bit address (_Adr) to Segment:Offset 16-bit form.

Definition at line 991 of file LegacyBios.h.

#define EFI_TO_LEGACY_MAJOR_VERSION   0x02

Definition at line 902 of file LegacyBios.h.

#define EFI_TO_LEGACY_MINOR_VERSION   0x00

Definition at line 903 of file LegacyBios.h.

#define GET_USB_BOOT_INFO   0x0001

Definition at line 786 of file LegacyBios.h.

#define HDD_MASTER_ATAPI_CDROM   0x04

Definition at line 558 of file LegacyBios.h.

#define HDD_MASTER_ATAPI_ZIPDISK   0x10

Definition at line 562 of file LegacyBios.h.

#define HDD_MASTER_IDE   0x20

Definition at line 560 of file LegacyBios.h.

#define HDD_PRIMARY   0x01

HDD_INFO status bits

Definition at line 556 of file LegacyBios.h.

#define HDD_SECONDARY   0x02

Definition at line 557 of file LegacyBios.h.

#define HDD_SLAVE_ATAPI_CDROM   0x08

Definition at line 559 of file LegacyBios.h.

#define HDD_SLAVE_ATAPI_ZIPDISK   0x80

Definition at line 563 of file LegacyBios.h.

#define HDD_SLAVE_IDE   0x40

Definition at line 561 of file LegacyBios.h.

#define INT15_D042   0x0000

SMM_FUNCTION Function constants.

Definition at line 785 of file LegacyBios.h.

#define MAX_IDE_CONTROLLER   8

Definition at line 904 of file LegacyBios.h.

#define NO_ROM   0x00

Flags returned by CheckPciRom().

Definition at line 980 of file LegacyBios.h.

#define OEM_OWNER   0x1

Definition at line 794 of file LegacyBios.h.

#define PORT_SIZE_16   0x01

Definition at line 760 of file LegacyBios.h.

#define PORT_SIZE_32   0x02

Definition at line 761 of file LegacyBios.h.

#define PORT_SIZE_64   0x03

Definition at line 762 of file LegacyBios.h.

#define PORT_SIZE_8   0x00

SMM_ATTRIBUTES port size constants.

Definition at line 759 of file LegacyBios.h.

#define ROM_FOUND   0x01

Definition at line 981 of file LegacyBios.h.

#define ROM_WITH_CONFIG   0x04

Not defined in the Framework CSM Specification.

Definition at line 983 of file LegacyBios.h.

#define STANDARD_IO   0x00

SMM_ATTRIBUTES type values.

Definition at line 752 of file LegacyBios.h.

#define STANDARD_MEMORY   0x01

Definition at line 753 of file LegacyBios.h.

#define STANDARD_OWNER   0x0

SMM_FUNCTION Owner constants.

Definition at line 793 of file LegacyBios.h.

#define VALID_LEGACY_ROM   0x02

Definition at line 982 of file LegacyBios.h.


Typedef Documentation

This function attempts to traditionally boot the specified BootOption. If the EFI context has been compromised, this function will not return. This procedure is not used for loading an EFI-aware OS off a traditional device. The following actions occur:

  • Get EFI SMBIOS data structures, convert them to a traditional format, and copy to Compatibility16.
  • Get a pointer to ACPI data structures and copy the Compatibility16 RSD PTR to F0000 block.
  • Find the traditional SMI handler from a firmware volume and register the traditional SMI handler with the EFI SMI handler.
  • Build onboard IDE information and pass this information to the Compatibility16 code.
  • Make sure all PCI Interrupt Line registers are programmed to match 8259.
  • Reconfigure SIO devices from EFI mode (polled) into traditional mode (interrupt driven).
  • Shadow all PCI ROMs.
  • Set up BDA and EBDA standard areas before the legacy boot.
  • Construct the Compatibility16 boot memory map and pass it to the Compatibility16 code.
  • Invoke the Compatibility16 table function Compatibility16PrepareToBoot(). This invocation causes a thunk into the Compatibility16 code, which sets all appropriate internal data structures. The boot device list is a parameter.
  • Invoke the Compatibility16 Table function Compatibility16Boot(). This invocation causes a thunk into the Compatibility16 code, which does an INT19.
  • If the Compatibility16Boot() function returns, then the boot failed in a graceful manner--meaning that the EFI code is still valid. An ungraceful boot failure causes a reset because the state of EFI code is unknown.
Parameters:
[in]ThisThe protocol instance pointer.
[in]BootOptionThe EFI Device Path from BootXXXX variable.
[in]LoadOptionSizeThe size of LoadOption in size.
[in]LoadOptionLThe oadOption from BootXXXX variable.
Return values:
EFI_DEVICE_ERRORFailed to boot from any boot device and memory is uncorrupted. Note: This function normally does not returns. It will either boot the OS or reset the system if memory has been "corrupted" by loading a boot sector and passing control to it.

Definition at line 1262 of file LegacyBios.h.

To boot from an unconventional device like parties and/or execute HDD diagnostics.

Parameters:
[in]ThisThe protocol instance pointer.
[in]AttributesHow to interpret the other input parameters.
[in]BbsEntryThe 0-based index into the BbsTable for the parent device.
[in]BeerDataA pointer to the 128 bytes of ram BEER data.
[in]ServiceAreaDataA pointer to the 64 bytes of raw Service Area data. The caller must provide a pointer to the specific Service Area and not the start all Service Areas.
Return values:
EFI_INVALID_PARAMETERIf error. Does NOT return if no error.

Definition at line 1351 of file LegacyBios.h.

Test to see if a legacy PCI ROM exists for this device. Optionally return the Legacy ROM instance for this PCI device.

Parameters:
[in]ThisThe protocol instance pointer.
[in]PciHandleThe PCI PC-AT OPROM from this devices ROM BAR will be loaded
[out]RomImageReturn the legacy PCI ROM for this device.
[out]RomSizeThe size of ROM Image.
[out]FlagsIndicates if ROM found and if PC-AT. Multiple bits can be set as follows:

  • 00 = No ROM.
  • 01 = ROM Found.
  • 02 = ROM is a valid legacy ROM.
Return values:
EFI_SUCCESSThe Legacy Option ROM availible for this device
EFI_UNSUPPORTEDThe Legacy Option ROM is not supported.

Definition at line 1181 of file LegacyBios.h.

Get a region from the LegacyBios for Tiano usage. Can only be invoked once.

Parameters:
[in]ThisThe protocol instance pointer.
[in]LegacyMemorySizeThe size of data to copy.
[in]LegacyMemoryAddressThe Legacy Region destination address. Note: must be in region assigned by LegacyBiosGetLegacyRegion.
[in]LegacyMemorySourceAddressThe source of the data to copy.
Return values:
EFI_SUCCESSThe Region assigned.
EFI_ACCESS_DENIEDDestination was outside an assigned region.

Definition at line 1420 of file LegacyBios.h.

Thunk to 16-bit real mode and call Segment:Offset. Regs will contain the 16-bit register context on entry and exit. Arguments can be passed on the Stack argument

Parameters:
[in]ThisThe protocol instance pointer.
[in]SegmentThe segemnt of 16-bit mode call.
[in]OffsetThe offset of 16-bit mdoe call.
[in]RegRegister contexted passed into (and returned) from thunk to 16-bit mode.
[in]StackThe caller allocated stack used to pass arguments.
[in]StackSizeThe size of Stack in bytes.
Return values:
FALSEThunk completed with no BIOS errors in the target code. See Regs for status.
TRUEThere was a BIOS error in the target code.

Definition at line 1153 of file LegacyBios.h.

Retrieve legacy BBS info and assign boot priority.

Parameters:
[in]ThisThe protocol instance pointer.
[out]HddCountThe number of HDD_INFO structures.
[out]HddInfoOnboard IDE controller information.
[out]BbsCountThe number of BBS_TABLE structures.
[in,out]BbsTablePoints to List of BBS_TABLE.
Return values:
EFI_SUCCESSTables were returned.

Definition at line 1306 of file LegacyBios.h.

Get a region from the LegacyBios for S3 usage.

Parameters:
[in]ThisThe protocol instance pointer.
[in]LegacyMemorySizeThe size of required region.
[in]RegionThe region to use. 00 = Either 0xE0000 or 0xF0000 block.

  • Bit0 = 1 0xF0000 block.
  • Bit1 = 1 0xE0000 block.
[in]AlignmentAddress alignment. Bit mapped. The first non-zero bit from right is alignment.
[out]LegacyMemoryAddressThe Region Assigned
Return values:
EFI_SUCCESSThe Region was assigned.
EFI_ACCESS_DENIEDThe function was previously invoked.
OtherThe Region was not assigned.

Definition at line 1396 of file LegacyBios.h.

Load a legacy PC-AT OPROM on the PciHandle device. Return information about how many disks were added by the OPROM and the shadow address and size. DiskStart & DiskEnd are INT 13h drive letters. Thus 0x80 is C:

Parameters:
[in]ThisThe protocol instance pointer.
[in]PciHandleThe PCI PC-AT OPROM from this devices ROM BAR will be loaded. This value is NULL if RomImage is non-NULL. This is the normal case.
[in]RomImageA PCI PC-AT ROM image. This argument is non-NULL if there is no hardware associated with the ROM and thus no PciHandle, otherwise is must be NULL. Example is PXE base code.
[out]FlagsThe type of ROM discovered. Multiple bits can be set, as follows:

  • 00 = No ROM.
  • 01 = ROM found.
  • 02 = ROM is a valid legacy ROM.
[out]DiskStartThe disk number of first device hooked by the ROM. If DiskStart is the same as DiskEnd no disked were hooked.
[out]DiskEnddisk number of the last device hooked by the ROM.
[out]RomShadowAddressShadow address of PC-AT ROM.
[out]RomShadowSizeSize of RomShadowAddress in bytes.
Return values:
EFI_SUCCESSThunk completed, see Regs for status.
EFI_INVALID_PARAMETERPciHandle not found

Definition at line 1218 of file LegacyBios.h.

Thunk to 16-bit real mode and execute a software interrupt with a vector of BiosInt. Regs will contain the 16-bit register context on entry and exit.

Parameters:
[in]ThisThe protocol instance pointer.
[in]BiosIntThe processor interrupt vector to invoke.
[in,out]RegRegister contexted passed into (and returned) from thunk to 16-bit mode.
Return values:
TRUEThunk completed with no BIOS errors in the target code. See Regs for status.
FALSEThere was a BIOS error in the target code.

Definition at line 1130 of file LegacyBios.h.

Assign drive number to legacy HDD drives prior to booting an EFI aware OS so the OS can access drives without an EFI driver.

Parameters:
[in]ThisThe protocol instance pointer.
[out]BbsCountThe number of BBS_TABLE structures
[out]BbsTableList of BBS entries
Return values:
EFI_SUCCESSDrive numbers assigned.

Definition at line 1327 of file LegacyBios.h.

Definition at line 975 of file LegacyBios.h.

Shadow all legacy16 OPROMs that haven't been shadowed. Warning: Use this with caution. This routine disconnects all EFI drivers. If used externally, then the caller must re-connect EFI drivers.

Parameters:
[in]ThisThe protocol instance pointer.
Return values:
EFI_SUCCESSOPROMs were shadowed.

Definition at line 1372 of file LegacyBios.h.

This function takes the Leds input parameter and sets/resets the BDA accordingly. Leds is also passed to Compatibility16 code, in case any special processing is required. This function is normally called from EFI Setup drivers that handle user-selectable keyboard options such as boot with NUM LOCK on/off. This function does not touch the keyboard or keyboard LEDs but only the BDA.

Parameters:
[in]ThisThe protocol instance pointer.
[in]LedsThe status of current Scroll, Num & Cap lock LEDS:

  • Bit 0 is Scroll Lock 0 = Not locked.
  • Bit 1 is Num Lock.
  • Bit 2 is Caps Lock.
Return values:
EFI_SUCCESSThe BDA was updated successfully.

Definition at line 1287 of file LegacyBios.h.

Definition at line 36 of file LegacyBios.h.

typedef UINT8 SERIAL_MODE

Definition at line 35 of file LegacyBios.h.


Enumeration Type Documentation

Functions provided by the CSM binary which communicate between the EfiCompatibility and Compatability16 code.

Inconsistent with the specification here: The member's name started with "Compatibility16" [defined in Intel Framework Compatibility Support Module Specification / 0.97 version] has been changed to "Legacy16" since keeping backward compatible.

Enumerator:
Compatibility16InitializeYourself 
Compatibility16UpdateBbs 
Compatibility16PrepareToBoot 
Compatibility16Boot 
Compatibility16RetrieveLastBootDevice 
Compatibility16DispatchOprom 
Compatibility16GetTableAddress 
Compatibility16SetKeyboardLeds 
Compatibility16InstallPciHandler 
Legacy16InitializeYourself 

Causes the Compatibility16 code to do any internal initialization required. Input: AX = Compatibility16InitializeYourself ES:BX = Pointer to EFI_TO_COMPATIBILITY16_INIT_TABLE Return: AX = Return Status codes

Legacy16UpdateBbs 

Causes the Compatibility16 BIOS to perform any drive number translations to match the boot sequence. Input: AX = Compatibility16UpdateBbs ES:BX = Pointer to EFI_TO_COMPATIBILITY16_BOOT_TABLE Return: AX = Returned status codes

Legacy16PrepareToBoot 

Allows the Compatibility16 code to perform any final actions before booting. The Compatibility16 code is read/write. Input: AX = Compatibility16PrepareToBoot ES:BX = Pointer to EFI_TO_COMPATIBILITY16_BOOT_TABLE structure Return: AX = Returned status codes

Legacy16Boot 

Causes the Compatibility16 BIOS to boot. The Compatibility16 code is Read/Only. Input: AX = Compatibility16Boot Output: AX = Returned status codes

Legacy16RetrieveLastBootDevice 

Allows the Compatibility16 code to get the last device from which a boot was attempted. This is stored in CMOS and is the priority number of the last attempted boot device. Input: AX = Compatibility16RetrieveLastBootDevice Output: AX = Returned status codes BX = Priority number of the boot device.

Legacy16DispatchOprom 

Allows the Compatibility16 code rehook INT13, INT18, and/or INT19 after dispatching a legacy OpROM. Input: AX = Compatibility16DispatchOprom ES:BX = Pointer to EFI_DISPATCH_OPROM_TABLE Output: AX = Returned status codes BX = Number of non-BBS-compliant devices found. Equals 0 if BBS compliant.

Legacy16GetTableAddress 

Finds a free area in the 0xFxxxx or 0xExxxx region of the specified length and returns the address of that region. Input: AX = Compatibility16GetTableAddress BX = Allocation region 00 = Allocate from either 0xE0000 or 0xF0000 64 KB blocks. Bit 0 = 1 Allocate from 0xF0000 64 KB block Bit 1 = 1 Allocate from 0xE0000 64 KB block CX = Requested length in bytes. DX = Required address alignment. Bit mapped. First non-zero bit from the right is the alignment. Output: AX = Returned status codes DS:BX = Address of the region

Legacy16SetKeyboardLeds 

Enables the EfiCompatibility module to do any nonstandard processing of keyboard LEDs or state. Input: AX = Compatibility16SetKeyboardLeds CL = LED status. Bit 0 Scroll Lock 0 = Off Bit 1 NumLock Bit 2 Caps Lock Output: AX = Returned status codes

Legacy16InstallPciHandler 

Enables the EfiCompatibility module to install an interrupt handler for PCI mass media devices that do not have an OpROM associated with them. An example is SATA. Input: AX = Compatibility16InstallPciHandler ES:BX = Pointer to EFI_LEGACY_INSTALL_PCI_HANDLER structure Output: AX = Returned status codes

Definition at line 242 of file LegacyBios.h.


Variable Documentation

Definition at line 28 of file LegacyBios.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines