OvmfPkg[all]
0.1
|
Data Structures | |
struct | EFI_LEGACY_IRQ_PRIORITY_TABLE_ENTRY |
struct | EFI_LEGACY_PIRQ_TABLE_HEADER |
struct | EFI_LEGACY_PIRQ_ENTRY |
struct | EFI_LEGACY_IRQ_ROUTING_ENTRY |
struct | _EFI_LEGACY_BIOS_PLATFORM_PROTOCOL |
Macros | |
#define | EFI_LEGACY_BIOS_PLATFORM_PROTOCOL_GUID |
#define | PCI_UNUSED 0x00 |
#define | PCI_USED 0xFF |
#define | LEGACY_USED 0xFE |
#define | EFI_LEGACY_PIRQ_TABLE_SIGNATURE SIGNATURE_32 ('$', 'P', 'I', 'R') |
Typedefs | |
typedef struct _EFI_LEGACY_BIOS_PLATFORM_PROTOCOL | EFI_LEGACY_BIOS_PLATFORM_PROTOCOL |
typedef EFI_STATUS(EFIAPI * | EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_INFO )(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN EFI_GET_PLATFORM_INFO_MODE Mode, OUT VOID **Table, OUT UINTN *TableSize, OUT UINTN *Location, OUT UINTN *Alignment, IN UINT16 LegacySegment, IN UINT16 LegacyOffset) |
typedef EFI_STATUS(EFIAPI * | EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_HANDLE )(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN EFI_GET_PLATFORM_HANDLE_MODE Mode, IN UINT16 Type, OUT EFI_HANDLE **HandleBuffer, OUT UINTN *HandleCount, IN VOID **AdditionalData) |
typedef EFI_STATUS(EFIAPI * | EFI_LEGACY_BIOS_PLATFORM_SMM_INIT )(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN VOID *EfiToLegacy16BootTable) |
typedef EFI_STATUS(EFIAPI * | EFI_LEGACY_BIOS_PLATFORM_HOOKS )(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN EFI_GET_PLATFORM_HOOK_MODE Mode, IN UINT16 Type, IN EFI_HANDLE DeviceHandle, IN OUT UINTN *ShadowAddress, IN EFI_COMPATIBILITY16_TABLE *Compatibility16Table, OUT VOID **AdditionalData) |
typedef EFI_STATUS(EFIAPI * | EFI_LEGACY_BIOS_PLATFORM_GET_ROUTING_TABLE )(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, OUT VOID **RoutingTable, OUT UINTN *RoutingTableEntries, OUT VOID **LocalPirqTable, OUT UINTN *PirqTableSize, OUT VOID **LocalIrqPriorityTable, OUT UINTN *IrqPriorityTableEntries) |
typedef EFI_STATUS(EFIAPI * | EFI_LEGACY_BIOS_PLATFORM_TRANSLATE_PIRQ )(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN UINTN PciBus, IN UINTN PciDevice, IN UINTN PciFunction, IN OUT UINT8 *Pirq, OUT UINT8 *PciIrq) |
typedef EFI_STATUS(EFIAPI * | EFI_LEGACY_BIOS_PLATFORM_PREPARE_TO_BOOT )(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN BBS_BBS_DEVICE_PATH *BbsDevicePath, IN VOID *BbsTable, IN UINT32 LoadOptionsSize, IN VOID *LoadOptions, IN VOID *EfiToLegacy16BootTable) |
Enumerations | |
enum | EFI_GET_PLATFORM_INFO_MODE { EfiGetPlatformBinaryMpTable = 0, EfiGetPlatformBinaryOemIntData = 1, EfiGetPlatformBinaryOem16Data = 2, EfiGetPlatformBinaryOem32Data = 3, EfiGetPlatformBinaryTpmBinary = 4, EfiGetPlatformBinarySystemRom = 5, EfiGetPlatformPciExpressBase = 6, EfiGetPlatformPmmSize = 7, EfiGetPlatformEndOpromShadowAddr = 8 } |
enum | EFI_GET_PLATFORM_HANDLE_MODE { EfiGetPlatformVgaHandle = 0, EfiGetPlatformIdeHandle = 1, EfiGetPlatformIsaBusHandle = 2, EfiGetPlatformUsbHandle = 3 } |
enum | EFI_GET_PLATFORM_HOOK_MODE { EfiPlatformHookPrepareToScanRom = 0, EfiPlatformHookShadowServiceRoms = 1, EfiPlatformHookAfterRomInit = 2 } |
Variables | |
EFI_GUID | gEfiLegacyBiosPlatformProtocolGuid |
The EFI Legacy BIOS Platform Protocol is used to mate a Legacy16 implementation with this EFI code. The EFI driver that produces the Legacy BIOS protocol is generic and consumes this protocol. A driver that matches the Legacy16 produces this protocol
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
#define EFI_LEGACY_BIOS_PLATFORM_PROTOCOL_GUID |
Legacy BIOS Platform depends on HDD_INFO and EFI_COMPATIBILITY16_TABLE that are defined with the Legacy BIOS Protocol
#define EFI_LEGACY_PIRQ_TABLE_SIGNATURE SIGNATURE_32 ('$', 'P', 'I', 'R') |
#define LEGACY_USED 0xFE |
This IRQ has been used by an SIO legacy device and cannot be used by PCI.
#define PCI_UNUSED 0x00 |
This IRQ has not been assigned to PCI.
#define PCI_USED 0xFF |
This IRQ has been assigned to PCI.
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_HANDLE)(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN EFI_GET_PLATFORM_HANDLE_MODE Mode, IN UINT16 Type, OUT EFI_HANDLE **HandleBuffer, OUT UINTN *HandleCount, IN VOID **AdditionalData) |
Returns a buffer of handles for the requested subfunction.
This | The protocol instance pointer. |
Mode | Specifies what handle to return. See EFI_GET_PLATFORM_HANDLE_MODE enum. |
Type | Mode specific. See EFI_GET_PLATFORM_HANDLE_MODE enum. |
HandleBuffer | Mode specific. See EFI_GET_PLATFORM_HANDLE_MODE enum. |
HandleCount | Mode specific. See EFI_GET_PLATFORM_HANDLE_MODE enum. |
AdditionalData | Mode specific. See EFI_GET_PLATFORM_HANDLE_MODE enum. |
EFI_SUCCESS | Handle is valid. |
EFI_UNSUPPORTED | Mode is not supported on the platform. |
EFI_NOT_FOUND | Handle is not known. |
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_PLATFORM_GET_PLATFORM_INFO)(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN EFI_GET_PLATFORM_INFO_MODE Mode, OUT VOID **Table, OUT UINTN *TableSize, OUT UINTN *Location, OUT UINTN *Alignment, IN UINT16 LegacySegment, IN UINT16 LegacyOffset) |
Finds the binary data or other platform information.
This | The protocol instance pointer. |
Mode | Specifies what data to return. See See EFI_GET_PLATFORM_INFO_MODE enum. |
Table | Mode specific. See EFI_GET_PLATFORM_INFO_MODE enum. |
TableSize | Mode specific. See EFI_GET_PLATFORM_INFO_MODE enum. |
Location | Mode specific. See EFI_GET_PLATFORM_INFO_MODE enum. |
Alignment | Mode specific. See EFI_GET_PLATFORM_INFO_MODE enum. |
LegacySegment | Mode specific. See EFI_GET_PLATFORM_INFO_MODE enum. |
LegacyOffset | Mode specific. See EFI_GET_PLATFORM_INFO_MODE enum. |
EFI_SUCCESS | Data returned successfully. |
EFI_UNSUPPORTED | Mode is not supported on the platform. |
EFI_NOT_FOUND | Binary image or table not found. |
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_PLATFORM_GET_ROUTING_TABLE)(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, OUT VOID **RoutingTable, OUT UINTN *RoutingTableEntries, OUT VOID **LocalPirqTable, OUT UINTN *PirqTableSize, OUT VOID **LocalIrqPriorityTable, OUT UINTN *IrqPriorityTableEntries) |
Returns information associated with PCI IRQ routing. This function returns the following information associated with PCI IRQ routing: An IRQ routing table and number of entries in the table. The $PIR table and its size. A list of PCI IRQs and the priority order to assign them.
This | The protocol instance pointer. | |
RoutingTable | The pointer to PCI IRQ Routing table. This location is the $PIR table minus the header. | |
RoutingTableEntries | The number of entries in table. | |
LocalPirqTable | $PIR | table. |
PirqTableSize | $PIR | table size. |
LocalIrqPriorityTable | A list of interrupts in priority order to assign. | |
IrqPriorityTableEntries | The number of entries in the priority table. |
EFI_SUCCESS | Data was successfully returned. |
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_PLATFORM_HOOKS)(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN EFI_GET_PLATFORM_HOOK_MODE Mode, IN UINT16 Type, IN EFI_HANDLE DeviceHandle, IN OUT UINTN *ShadowAddress, IN EFI_COMPATIBILITY16_TABLE *Compatibility16Table, OUT VOID **AdditionalData) |
Allows platform to perform any required action after a LegacyBios operation. Invokes the specific sub function specified by Mode.
This | The protocol instance pointer. |
Mode | Specifies what handle to return. See EFI_GET_PLATFORM_HOOK_MODE enum. |
Type | Mode specific. See EFI_GET_PLATFORM_HOOK_MODE enum. |
DeviceHandle | Mode specific. See EFI_GET_PLATFORM_HOOK_MODE enum. |
ShadowAddress | Mode specific. See EFI_GET_PLATFORM_HOOK_MODE enum. |
Compatibility16Table | Mode specific. See EFI_GET_PLATFORM_HOOK_MODE enum. |
AdditionalData | Mode specific. See EFI_GET_PLATFORM_HOOK_MODE enum. |
EFI_SUCCESS | The operation performed successfully. Mode specific. |
EFI_UNSUPPORTED | Mode is not supported on the platform. |
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_PLATFORM_PREPARE_TO_BOOT)(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN BBS_BBS_DEVICE_PATH *BbsDevicePath, IN VOID *BbsTable, IN UINT32 LoadOptionsSize, IN VOID *LoadOptions, IN VOID *EfiToLegacy16BootTable) |
Attempt to legacy boot the BootOption. If the EFI contexted has been compromised this function will not return.
This | The protocol instance pointer. |
BbsDevicePath | The EFI Device Path from BootXXXX variable. |
BbsTable | The Internal BBS table. |
LoadOptionSize | The size of LoadOption in size. |
LoadOption | The LoadOption from BootXXXX variable |
EfiToLegacy16BootTable | A pointer to BootTable structure |
EFI_SUCCESS | Ready to boot. |
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_PLATFORM_SMM_INIT)(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN VOID *EfiToLegacy16BootTable) |
Load and initialize the Legacy BIOS SMM handler.
This | The protocol instance pointer. |
EfiToLegacy16BootTable | A pointer to Legacy16 boot table. |
EFI_SUCCESS | SMM code loaded. |
EFI_DEVICE_ERROR | SMM code failed to load |
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_BIOS_PLATFORM_TRANSLATE_PIRQ)(IN EFI_LEGACY_BIOS_PLATFORM_PROTOCOL *This, IN UINTN PciBus, IN UINTN PciDevice, IN UINTN PciFunction, IN OUT UINT8 *Pirq, OUT UINT8 *PciIrq) |
Translates the given PIRQ accounting for bridge. This function translates the given PIRQ back through all buses, if required, and returns the true PIRQ and associated IRQ.
This | The protocol instance pointer. |
PciBus | The PCI bus number for this device. |
PciDevice | The PCI device number for this device. |
PciFunction | The PCI function number for this device. |
Pirq | Input is PIRQ reported by device, and output is true PIRQ. |
PciIrq | The IRQ already assigned to the PIRQ, or the IRQ to be assigned to the PIRQ. |
EFI_SUCCESS | The PIRQ was translated. |
This enum specifies the Mode param values for GetPlatformHandle().
This enum specifies the Mode param values for PlatformHooks(). Note: Any OEM defined hooks start with 0x8000.
This enum specifies the Mode param values for GetPlatformInfo()
Enumerator | |
---|---|
EfiGetPlatformBinaryMpTable |
This mode is invoked twice. The first invocation has LegacySegment and LegacyOffset set to 0. The mode returns the MP table address in EFI memory, along with its size. The second invocation has LegacySegment and LegacyOffset set to the location in the 0xF0000 or 0xE0000 block to which the MP table is to be copied. The second invocation allows any MP table address fixes to occur in the EFI memory copy of the MP table. The caller, not EfiGetPlatformBinaryMpTable, copies the modified MP table to the allocated region in 0xF0000 or 0xE0000 block after the second invocation. The function parameters associated with this mode are: Table Pointer to the MP table. TableSize Size in bytes of the MP table. Location Location to place table. 0x00. Either 0xE0000 or 0xF0000 64 KB blocks. Bit 0 = 1 0xF0000 64 KB block. Bit 1 = 1 0xE0000 64 KB block. Multiple bits can be set. Alignment Bit-mapped address alignment granularity. The first nonzero bit from the right is the address granularity. LegacyOffset Offset in which EfiCompatibility code will place the MP table. The return values associated with this mode are: EFI_SUCCESS The MP table was returned. EFI_UNSUPPORTED The MP table is not supported on this platform. |
EfiGetPlatformBinaryOemIntData |
This mode returns a block of data. The content and usage is IBV or OEM defined. OEMs or IBVs normally use this function for nonstandard Compatibility16 runtime soft INTs. It is the responsibility of this routine to coalesce multiple OEM 16 bit functions, if they exist, into one coherent package that is understandable by the Compatibility16 code. This function is invoked twice. The first invocation has LegacySegment and LegacyOffset set to 0. The function returns the table address in EFI memory, as well as its size. The second invocation has LegacySegment and LegacyOffset set to the location in the 0xF0000 or 0xE0000 block to which the data (table) is to be copied. The second invocation allows any data (table) address fixes to occur in the EFI memory copy of the table. The caller, not GetOemIntData(), copies the modified data (table) to the allocated region in 0xF0000 or 0xE0000 block after the second invocation. The function parameters associated with this mode are: Table Pointer to OEM legacy 16 bit code or data. TableSize Size of data. Location Location to place table. 0x00. Either 0xE0000 or 0xF0000 64 KB blocks. Bit 0 = 1 0xF0000 64 KB block. Bit 1 = 1 0xE0000 64 KB block. Multiple bits can be set. Alignment Bit mapped address alignment granularity. The first nonzero bit from the right is the address granularity. LegacySegment Segment in which EfiCompatibility code will place the table or data. LegacyOffset Offset in which EfiCompatibility code will place the table or data. The return values associated with this mode are: EFI_SUCCESS The data was returned successfully. EFI_UNSUPPORTED Oem INT is not supported on this platform. |
EfiGetPlatformBinaryOem16Data |
This mode returns a block of data. The content and usage is IBV defined. OEMs or IBVs normally use this mode for nonstandard Compatibility16 runtime 16 bit routines. It is the responsibility of this routine to coalesce multiple OEM 16 bit functions, if they exist, into one coherent package that is understandable by the Compatibility16 code. Example usage: A legacy mobile BIOS that has a pre-existing runtime interface to return the battery status to calling applications. This mode is invoked twice. The first invocation has LegacySegment and LegacyOffset set to 0. The mode returns the table address in EFI memory and its size. The second invocation has LegacySegment and LegacyOffset set to the location in the 0xF0000 or 0xE0000 block to which the table is to be copied. The second invocation allows any table address fixes to occur in the EFI memory copy of the table. The caller, not EfiGetPlatformBinaryOem16Data, copies the modified table to the allocated region in 0xF0000 or 0xE0000 block after the second invocation. The function parameters associated with this mode are: Table Pointer to OEM legacy 16 bit code or data. TableSize Size of data. Location Location to place the table. 0x00. Either 0xE0000 or 0xF0000 64 KB blocks. Bit 0 = 1 0xF0000 64 KB block. Bit 1 = 1 0xE0000 64 KB block. Multiple bits can be set. Alignment Bit mapped address alignment granularity. The first nonzero bit from the right is the address granularity. LegacySegment Segment in which EfiCompatibility code will place the table or data. LegacyOffset Offset in which EfiCompatibility code will place the table or data. The return values associated with this mode are: EFI_SUCCESS The data was returned successfully. EFI_UNSUPPORTED Oem16 is not supported on this platform. |
EfiGetPlatformBinaryOem32Data |
This mode returns a block of data. The content and usage are IBV defined. OEMs or IBVs normally use this mode for nonstandard Compatibility16 runtime 32 bit routines. It is the responsibility of this routine to coalesce multiple OEM 32 bit functions, if they exist, into one coherent package that is understandable by the Compatibility16 code. Example usage: A legacy mobile BIOS that has a pre existing runtime interface to return the battery status to calling applications. This mode is invoked twice. The first invocation has LegacySegment and LegacyOffset set to 0. The mode returns the table address in EFI memory and its size. The second invocation has LegacySegment and LegacyOffset set to the location in the 0xF0000 or 0xE0000 block to which the table is to be copied. The second invocation allows any table address fix ups to occur in the EFI memory copy of the table. The caller, not EfiGetPlatformBinaryOem32Data, copies the modified table to the allocated region in 0xF0000 or 0xE0000 block after the second invocation.. Note: There are two generic mechanisms by which this mode can be used. Mechanism 1: This mode returns the data and the Legacy BIOS Protocol copies the data into the F0000 or E0000 block in the Compatibility16 code. The EFI_COMPATIBILITY16_TABLE entries Oem32Segment and Oem32Offset can be viewed as two UINT16 entries. Mechanism 2: This mode directly fills in the EFI_COMPATIBILITY16_TABLE with a pointer to the INT15 E820 region containing the 32 bit code. It returns EFI_UNSUPPORTED. The EFI_COMPATIBILITY16_TABLE entries, Oem32Segment and Oem32Offset, can be viewed as two UINT16 entries or as a single UINT32 entry as determined by the IBV. The function parameters associated with this mode are: TableSize Size of data. Location Location to place the table. 0x00 or 0xE0000 or 0xF0000 64 KB blocks. Bit 0 = 1 0xF0000 64 KB block. Bit 1 = 1 0xE0000 64 KB block. Multiple bits can be set. Alignment Bit mapped address alignment granularity. The first nonzero bit from the right is the address granularity. LegacySegment Segment in which EfiCompatibility code will place the table or data. LegacyOffset Offset in which EfiCompatibility code will place the table or data. The return values associated with this mode are: EFI_SUCCESS The data was returned successfully. EFI_UNSUPPORTED Oem32 is not supported on this platform. |
EfiGetPlatformBinaryTpmBinary |
This mode returns a TPM binary image for the onboard TPM device. The function parameters associated with this mode are: Table TPM binary image for the onboard TPM device. TableSize Size of BinaryImage in bytes. Location Location to place the table. 0x00. Either 0xE0000 or 0xF0000 64 KB blocks. Bit 0 = 1 0xF0000 64 KB block. Bit 1 = 1 0xE0000 64 KB block. Multiple bits can be set. Alignment Bit mapped address alignment granularity. The first nonzero bit from the right is the address granularity. LegacySegment Segment in which EfiCompatibility code will place the table or data. LegacyOffset Offset in which EfiCompatibility code will place the table or data. The return values associated with this mode are: EFI_SUCCESS BinaryImage is valid. EFI_UNSUPPORTED Mode is not supported on this platform. EFI_NOT_FOUND No BinaryImage was found. |
EfiGetPlatformBinarySystemRom |
The mode finds the Compatibility16 Rom Image. The function parameters associated with this mode are: System ROM image for the platform. TableSize Size of Table in bytes. Location Ignored. Alignment Ignored. LegacySegment Ignored. LegacyOffset Ignored. The return values associated with this mode are: EFI_SUCCESS ROM image found. EFI_NOT_FOUND ROM not found. |
EfiGetPlatformPciExpressBase |
This mode returns the Base address of PciExpress memory mapped configuration address space. The function parameters associated with this mode are: Table System ROM image for the platform. TableSize Size of Table in bytes. Location Ignored. Alignment Ignored. LegacySegment Ignored. LegacyOffset Ignored. The return values associated with this mode are: EFI_SUCCESS Address is valid. EFI_UNSUPPORTED System does not PciExpress. |
EfiGetPlatformPmmSize | |
EfiGetPlatformEndOpromShadowAddr |
EFI_GUID gEfiLegacyBiosPlatformProtocolGuid |