summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-24 06:37:35 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-24 06:37:35 +0000
commit2c40a813fc32c5c9aa204b10b037c48f42fe6422 (patch)
tree3e33404cc85dc7e8e73ee6108dc9329986a97734 /EdkCompatibilityPkg
parent8336fd87df501f8bb26c47d4f216710fc9420ebd (diff)
downloadedk2-2c40a813fc32c5c9aa204b10b037c48f42fe6422.zip
edk2-2c40a813fc32c5c9aa204b10b037c48f42fe6422.tar.gz
edk2-2c40a813fc32c5c9aa204b10b037c48f42fe6422.tar.bz2
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
1.1) Bug fixes. (For details, please check Documents & files: Snapshot/Release Notes at https://edk.tianocore.org/servlets/ProjectDocumentList?folderID=43&expandFolder=43&folderID=6) 1.2) Add new UEFI protocol definitions for AbsolutePointer, FormBrowser2, HiiConfigAccess, HiiConfigRouting, HiiDatabase, HiiFont, HiiImage, HiiString, SimpleTextInputEx, DPC protocol. 1.3) Add Smbios 2.5, 2.6 supports. Incompatible changes hilighted: 1) EFI_MANAGED_NETWORK_PROTOCOL_GUID changed. 2) EFI_IP4_IPCONFIG_DATA changed. 2) Add in EdkCompatibilityPkg/EdkCompatibilityPkg.dsc to build all libraries in this package. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4622 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r--EdkCompatibilityPkg/Foundation/Core/Dxe/ArchProtocol/Cpu/Cpu.h2
-rw-r--r--EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/IA32/CpuIA32.c2
-rw-r--r--EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/x64/Cpu.asm2
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Include/EfiDevicePath.h28
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Include/EfiHii.h1463
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.c29
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.h117
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h56
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf18
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.c27
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.h136
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.c27
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.h147
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.c27
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.h314
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.c29
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.h450
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiFont/HiiFont.c29
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiFont/HiiFont.h283
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiImage/HiiImage.c29
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiImage/HiiImage.h254
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiString/HiiString.c29
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiString/HiiString.h240
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/Ip4Config/Ip4Config.h7
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.h4
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.c31
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.h255
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.c2
-rw-r--r--EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h6
-rw-r--r--EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubRecords.h7
-rw-r--r--EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassCache.h3
-rw-r--r--EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMemory.h3
-rw-r--r--EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMisc.h71
-rw-r--r--EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassProcessor.h60
-rw-r--r--EdkCompatibilityPkg/Foundation/Framework/Guid/StatusCodeDataTypeId/StatusCodeDataTypeId.h6
-rw-r--r--EdkCompatibilityPkg/Foundation/Framework/Include/EfiBootScript.h22
-rw-r--r--EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiS3Save/AcpiS3Save.h6
-rw-r--r--EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiSupport/AcpiSupport.h5
-rw-r--r--EdkCompatibilityPkg/Foundation/Framework/Protocol/BootScriptSave/BootScriptSave.h4
-rw-r--r--EdkCompatibilityPkg/Foundation/Framework/Protocol/LegacyBios/LegacyBios.h15
40 files changed, 4178 insertions, 67 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Core/Dxe/ArchProtocol/Cpu/Cpu.h b/EdkCompatibilityPkg/Foundation/Core/Dxe/ArchProtocol/Cpu/Cpu.h
index 7b17969..c34aad4 100644
--- a/EdkCompatibilityPkg/Foundation/Core/Dxe/ArchProtocol/Cpu/Cpu.h
+++ b/EdkCompatibilityPkg/Foundation/Core/Dxe/ArchProtocol/Cpu/Cpu.h
@@ -45,7 +45,7 @@ typedef enum {
typedef
VOID
-(*EFI_CPU_INTERRUPT_HANDLER) (
+(EFIAPI *EFI_CPU_INTERRUPT_HANDLER) (
IN EFI_EXCEPTION_TYPE InterruptType,
IN EFI_SYSTEM_CONTEXT SystemContext
);
diff --git a/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/IA32/CpuIA32.c b/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/IA32/CpuIA32.c
index 4956179..13f928d 100644
--- a/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/IA32/CpuIA32.c
+++ b/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/IA32/CpuIA32.c
@@ -106,10 +106,10 @@ EfiDisableCache (VOID)
and al, 60h
cmp al, 60h
je Exit
- wbinvd
mov eax, cr0
or eax, 060000000h
mov cr0, eax
+ wbinvd
Exit:
}
}
diff --git a/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/x64/Cpu.asm b/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/x64/Cpu.asm
index 8e46f9b..5ed3eea 100644
--- a/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/x64/Cpu.asm
+++ b/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/x64/Cpu.asm
@@ -135,10 +135,10 @@ EfiDisableCache PROC PUBLIC
and rax, 060000000h
cmp rax, 0
jne @f
- wbinvd
mov rax, cr0
or rax, 060000000h
mov cr0, rax
+ wbinvd
@@:
ret
EfiDisableCache ENDP
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Include/EfiDevicePath.h b/EdkCompatibilityPkg/Foundation/Efi/Include/EfiDevicePath.h
index bab0d4e..a541be9 100644
--- a/EdkCompatibilityPkg/Foundation/Efi/Include/EfiDevicePath.h
+++ b/EdkCompatibilityPkg/Foundation/Efi/Include/EfiDevicePath.h
@@ -343,6 +343,8 @@ typedef struct {
UINT16 RelativeTargetPort;
} SAS_DEVICE_PATH;
+#endif
+
#define MSG_ISCSI_DP 0x13
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
@@ -362,8 +364,6 @@ typedef struct {
#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
-#endif
-
//
// Media Device Path
//
@@ -477,6 +477,7 @@ typedef union {
CONTROLLER_DEVICE_PATH Controller;
ACPI_HID_DEVICE_PATH Acpi;
+ ACPI_EXTENDED_HID_DEVICE_PATH ExtendedAcpi;
ATAPI_DEVICE_PATH Atapi;
SCSI_DEVICE_PATH Scsi;
@@ -488,6 +489,7 @@ typedef union {
USB_CLASS_DEVICE_PATH UsbClass;
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
USB_WWID_DEVICE_PATH UsbWwid;
+ DEVICE_LOGICAL_UNIT_DEVICE_PATH LogicUnit;
#endif
I2O_DEVICE_PATH I2O;
MAC_ADDR_DEVICE_PATH MacAddr;
@@ -498,14 +500,19 @@ typedef union {
UART_FLOW_CONTROL_DEVICE_PATH UartFlowControl;
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
SAS_DEVICE_PATH Sas;
- ISCSI_DEVICE_PATH Iscsi;
#endif
+ ISCSI_DEVICE_PATH Iscsi;
HARDDRIVE_DEVICE_PATH HardDrive;
CDROM_DEVICE_PATH CD;
FILEPATH_DEVICE_PATH FilePath;
MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol;
+ #if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
+ MEDIA_FW_VOL_DEVICE_PATH PiwgFirmwareVolume;
+ MEDIA_FW_VOL_FILEPATH_DEVICE_PATH PiwgFirmwareFile;
+ #endif
+
BBS_BBS_DEVICE_PATH Bbs;
} EFI_DEV_PATH;
@@ -532,12 +539,22 @@ typedef union {
F1394_DEVICE_PATH *F1394;
USB_DEVICE_PATH *Usb;
USB_CLASS_DEVICE_PATH *UsbClass;
+ #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ USB_WWID_DEVICE_PATH *UsbWwid;
+ DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicUnit;
+ #endif
I2O_DEVICE_PATH *I2O;
MAC_ADDR_DEVICE_PATH *MacAddr;
IPv4_DEVICE_PATH *Ipv4;
IPv6_DEVICE_PATH *Ipv6;
INFINIBAND_DEVICE_PATH *InfiniBand;
UART_DEVICE_PATH *Uart;
+ UART_FLOW_CONTROL_DEVICE_PATH *UartFlowControl;
+
+ #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+ SAS_DEVICE_PATH *Sas;
+ #endif
+ ISCSI_DEVICE_PATH *Iscsi;
HARDDRIVE_DEVICE_PATH *HardDrive;
CDROM_DEVICE_PATH *CD;
@@ -545,6 +562,11 @@ typedef union {
FILEPATH_DEVICE_PATH *FilePath;
MEDIA_PROTOCOL_DEVICE_PATH *MediaProtocol;
+ #if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
+ MEDIA_FW_VOL_DEVICE_PATH *PiwgFirmwareVolume;
+ MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *PiwgFirmwareFile;
+ #endif
+
BBS_BBS_DEVICE_PATH *Bbs;
UINT8 *Raw;
} EFI_DEV_PATH_PTR;
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Include/EfiHii.h b/EdkCompatibilityPkg/Foundation/Efi/Include/EfiHii.h
new file mode 100644
index 0000000..411cf06
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Include/EfiHii.h
@@ -0,0 +1,1463 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ EfiHii.h
+
+Abstract:
+
+ Hii relative definitions, such as Hii package, IFR OpCode etc
+
+Revision History
+
+--*/
+
+#ifndef _EFI_HII_H_
+#define _EFI_HII_H_
+
+#include "EfiCommon.h"
+#include EFI_PROTOCOL_DEFINITION (DevicePath)
+
+typedef VOID *EFI_HII_HANDLE;
+typedef CHAR16 *EFI_STRING;
+typedef UINT16 EFI_QUESTION_ID;
+typedef UINT16 EFI_IMAGE_ID;
+typedef UINT16 EFI_STRING_ID;
+typedef UINT16 EFI_FORM_ID;
+typedef UINT16 EFI_VARSTORE_ID;
+typedef UINT16 EFI_DEFAULT_ID;
+typedef UINT32 EFI_HII_FONT_STYLE;
+
+//
+// Type defined for backward compatible with Framework HII
+//
+typedef EFI_STRING_ID STRING_REF;
+
+#pragma pack(1)
+
+//
+// HII package list
+//
+typedef struct {
+ EFI_GUID PackageListGuid;
+ UINT32 PackageLength;
+} EFI_HII_PACKAGE_LIST_HEADER;
+
+typedef struct {
+ UINT32 Length:24;
+ UINT32 Type:8;
+} EFI_HII_PACKAGE_HEADER;
+
+#define EFI_HII_PACKAGE_TYPE_ALL 0x00
+#define EFI_HII_PACKAGE_TYPE_GUID 0x01
+#define EFI_HII_PACKAGE_FORM 0x02
+#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x03
+#define EFI_HII_PACKAGE_STRINGS 0x04
+#define EFI_HII_PACKAGE_FONTS 0x05
+#define EFI_HII_PACKAGE_IMAGES 0x06
+#define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
+#define EFI_HII_PACKAGE_DEVICE_PATH 0x08
+#define EFI_HII_PACKAGE_END 0xDF
+#define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
+#define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
+
+//
+// Simplified Font Package
+//
+
+#define EFI_GLYPH_HEIGHT 19
+#define EFI_GLYPH_WIDTH 8
+//
+// Contents of EFI_NARROW_GLYPH.Attributes
+//
+#define EFI_GLYPH_NON_SPACING 0x01
+#define EFI_GLYPH_WIDE 0x02
+
+typedef struct {
+ CHAR16 UnicodeWeight;
+ UINT8 Attributes;
+ UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
+} EFI_NARROW_GLYPH;
+
+typedef struct {
+ CHAR16 UnicodeWeight;
+ UINT8 Attributes;
+ UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
+ UINT8 GlyphCol2[EFI_GLYPH_HEIGHT];
+ UINT8 Pad[3];
+} EFI_WIDE_GLYPH;
+
+typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT16 NumberOfNarrowGlyphs;
+ UINT16 NumberOfWideGlyphs;
+ // EFI_NARROW_GLYPH NarrowGlyphs[];
+ // EFI_WIDE_GLYPH WideGlyphs[];
+} EFI_HII_SIMPLE_FONT_PACKAGE_HDR;
+
+//
+// Font Package
+//
+
+#define EFI_HII_FONT_STYLE_BOLD 0x00000001
+#define EFI_HII_FONT_STYLE_ITALIC 0x00000002
+#define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
+#define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
+#define EFI_HII_FONT_STYLE_SHADOW 0x00040000
+#define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
+#define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
+
+typedef struct _EFI_HII_GLYPH_INFO {
+ UINT16 Width;
+ UINT16 Height;
+ INT16 OffsetX;
+ INT16 OffsetY;
+ INT16 AdvanceX;
+} EFI_HII_GLYPH_INFO;
+
+typedef struct _EFI_HII_FONT_PACKAGE_HDR {
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT32 HdrSize;
+ UINT32 GlyphBlockOffset;
+ EFI_HII_GLYPH_INFO Cell;
+ EFI_HII_FONT_STYLE FontStyle;
+ CHAR16 FontFamily[1];
+} EFI_HII_FONT_PACKAGE_HDR;
+
+#define EFI_HII_GIBT_END 0x00
+#define EFI_HII_GIBT_GLYPH 0x10
+#define EFI_HII_GIBT_GLYPHS 0x11
+#define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
+#define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
+#define EFI_HII_GIBT_DUPLICATE 0x20
+#define EFI_HII_GIBT_SKIP2 0x21
+#define EFI_HII_GIBT_SKIP1 0x22
+#define EFI_HII_GIBT_DEFAULTS 0x23
+#define EFI_HII_GIBT_EXT1 0x30
+#define EFI_HII_GIBT_EXT2 0x31
+#define EFI_HII_GIBT_EXT4 0x32
+
+typedef struct _EFI_HII_GLYPH_BLOCK {
+ UINT8 BlockType;
+} EFI_HII_GLYPH_BLOCK;
+
+typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ EFI_HII_GLYPH_INFO Cell;
+} EFI_HII_GIBT_DEFAULTS_BLOCK;
+
+typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ CHAR16 CharValue;
+} EFI_HII_GIBT_DUPLICATE_BLOCK;
+
+typedef struct _EFI_GLYPH_GIBT_END_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+} EFI_GLYPH_GIBT_END_BLOCK;
+
+typedef struct _EFI_HII_GIBT_EXT1_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT8 BlockType2;
+ UINT8 Length;
+} EFI_HII_GIBT_EXT1_BLOCK;
+
+typedef struct _EFI_HII_GIBT_EXT2_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT8 BlockType2;
+ UINT16 Length;
+} EFI_HII_GIBT_EXT2_BLOCK;
+
+typedef struct _EFI_HII_GIBT_EXT4_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT8 BlockType2;
+ UINT32 Length;
+} EFI_HII_GIBT_EXT4_BLOCK;
+
+typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ EFI_HII_GLYPH_INFO Cell;
+ UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height
+} EFI_HII_GIBT_GLYPH_BLOCK;
+
+typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ EFI_HII_GLYPH_INFO Cell;
+ UINT16 Count;
+ UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height
+} EFI_HII_GIBT_GLYPHS_BLOCK;
+
+typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height
+} EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK;
+
+typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT16 Count;
+ UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height
+} EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;
+
+typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT8 SkipCount;
+} EFI_HII_GIBT_SKIP1_BLOCK;
+
+typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {
+ EFI_HII_GLYPH_BLOCK Header;
+ UINT16 SkipCount;
+} EFI_HII_GIBT_SKIP2_BLOCK;
+
+//
+// Device Path Package
+//
+typedef struct _EFI_HII_DEVICE_PATH_PACKAGE {
+ EFI_HII_PACKAGE_HEADER Header;
+ // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
+} EFI_HII_DEVICE_PATH_PACKAGE;
+
+//
+// GUID Package
+//
+typedef struct _EFI_HII_GUID_PACKAGE_HDR {
+ EFI_HII_PACKAGE_HEADER Header;
+ EFI_GUID Guid;
+ // Data per GUID definition may follow
+} EFI_HII_GUID_PACKAGE_HDR;
+
+//
+// String Package
+//
+
+#define UEFI_CONFIG_LANG L"x-UEFI"
+#define UEFI_CONFIG_LANG2 L"x-i-UEFI" // BUGBUG, spec need to be updated.
+
+typedef struct _EFI_HII_STRING_PACKAGE_HDR {
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT32 HdrSize;
+ UINT32 StringInfoOffset;
+ CHAR16 LanguageWindow[16];
+ EFI_STRING_ID LanguageName;
+ CHAR8 Language[1];
+} EFI_HII_STRING_PACKAGE_HDR;
+
+typedef struct {
+ UINT8 BlockType;
+} EFI_HII_STRING_BLOCK;
+
+#define EFI_HII_SIBT_END 0x00
+#define EFI_HII_SIBT_STRING_SCSU 0x10
+#define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
+#define EFI_HII_SIBT_STRINGS_SCSU 0x12
+#define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
+#define EFI_HII_SIBT_STRING_UCS2 0x14
+#define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
+#define EFI_HII_SIBT_STRINGS_UCS2 0x16
+#define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
+#define EFI_HII_SIBT_DUPLICATE 0x20
+#define EFI_HII_SIBT_SKIP2 0x21
+#define EFI_HII_SIBT_SKIP1 0x22
+#define EFI_HII_SIBT_EXT1 0x30
+#define EFI_HII_SIBT_EXT2 0x31
+#define EFI_HII_SIBT_EXT4 0x32
+#define EFI_HII_SIBT_FONT 0x40
+
+typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ EFI_STRING_ID StringId;
+} EFI_HII_SIBT_DUPLICATE_BLOCK;
+
+typedef struct _EFI_HII_SIBT_END_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+} EFI_HII_SIBT_END_BLOCK;
+
+typedef struct _EFI_HII_SIBT_EXT1_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 BlockType2;
+ UINT8 Length;
+} EFI_HII_SIBT_EXT1_BLOCK;
+
+typedef struct _EFI_HII_SIBT_EXT2_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 BlockType2;
+ UINT16 Length;
+} EFI_HII_SIBT_EXT2_BLOCK;
+
+typedef struct _EFI_HII_SIBT_EXT4_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 BlockType2;
+ UINT32 Length;
+} EFI_HII_SIBT_EXT4_BLOCK;
+
+typedef struct _EFI_HII_SIBT_FONT_BLOCK {
+ EFI_HII_SIBT_EXT2_BLOCK Header;
+ UINT8 FontId;
+ UINT16 FontSize;
+ EFI_HII_FONT_STYLE FontStyle;
+ CHAR16 FontName[1];
+} EFI_HII_SIBT_FONT_BLOCK;
+
+typedef struct _EFI_HII_SIBT_SKIP1_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 SkipCount;
+} EFI_HII_SIBT_SKIP1_BLOCK;
+
+typedef struct _EFI_HII_SIBT_SKIP2_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT16 SkipCount;
+} EFI_HII_SIBT_SKIP2_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 StringText[1];
+} EFI_HII_SIBT_STRING_SCSU_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 FontIdentifier;
+ UINT8 StringText[1];
+} EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT16 StringCount;
+ UINT8 StringText[1];
+} EFI_HII_SIBT_STRINGS_SCSU_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 FontIdentifier;
+ UINT16 StringCount;
+ UINT8 StringText[1];
+} EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ CHAR16 StringText[1];
+} EFI_HII_SIBT_STRING_UCS2_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 FontIdentifier;
+ CHAR16 StringText[1];
+} EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT16 StringCount;
+ CHAR16 StringText[1];
+} EFI_HII_SIBT_STRINGS_UCS2_BLOCK;
+
+typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK {
+ EFI_HII_STRING_BLOCK Header;
+ UINT8 FontIdentifier;
+ UINT16 StringCount;
+ CHAR16 StringText[1];
+} EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK;
+
+//
+// Image Packages
+//
+
+typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT32 ImageInfoOffset;
+ UINT32 PaletteInfoOffset;
+} EFI_HII_IMAGE_PACKAGE_HDR;
+
+typedef struct _EFI_HII_IMAGE_BLOCK {
+ UINT8 BlockType;
+} EFI_HII_IMAGE_BLOCK;
+
+#define EFI_HII_IIBT_END 0x00
+#define EFI_HII_IIBT_IMAGE_1BIT 0x10
+#define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
+#define EFI_HII_IIBT_IMAGE_4BIT 0x12
+#define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
+#define EFI_HII_IIBT_IMAGE_8BIT 0x14
+#define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
+#define EFI_HII_IIBT_IMAGE_24BIT 0x16
+#define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
+#define EFI_HII_IIBT_IMAGE_JPEG 0x18
+#define EFI_HII_IIBT_DUPLICATE 0x20
+#define EFI_HII_IIBT_SKIP2 0x21
+#define EFI_HII_IIBT_SKIP1 0x22
+#define EFI_HII_IIBT_EXT1 0x30
+#define EFI_HII_IIBT_EXT2 0x31
+#define EFI_HII_IIBT_EXT4 0x32
+
+typedef struct _EFI_HII_IIBT_END_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+} EFI_HII_IIBT_END_BLOCK;
+
+typedef struct _EFI_HII_IIBT_EXT1_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 BlockType2;
+ UINT8 Length;
+} EFI_HII_IIBT_EXT1_BLOCK;
+
+typedef struct _EFI_HII_IIBT_EXT2_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 BlockType2;
+ UINT16 Length;
+} EFI_HII_IIBT_EXT2_BLOCK;
+
+typedef struct _EFI_HII_IIBT_EXT4_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 BlockType2;
+ UINT32 Length;
+} EFI_HII_IIBT_EXT4_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE {
+ UINT16 Width;
+ UINT16 Height;
+ UINT8 Data[1];
+} EFI_HII_IIBT_IMAGE_1BIT_BASE;
+
+typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_1BIT_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK;
+
+typedef struct _EFI_HII_RGB_PIXEL {
+ UINT8 b;
+ UINT8 g;
+ UINT8 r;
+} EFI_HII_RGB_PIXEL;
+
+typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE {
+ UINT16 Width;
+ UINT16 Height;
+ EFI_HII_RGB_PIXEL Bitmap[1];
+} EFI_HII_IIBT_IMAGE_24BIT_BASE;
+
+typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_24BIT_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE {
+ UINT16 Width;
+ UINT16 Height;
+ UINT8 Data[1];
+} EFI_HII_IIBT_IMAGE_4BIT_BASE;
+
+typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_4BIT_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE {
+ UINT16 Width;
+ UINT16 Height;
+ UINT8 Data[1];
+} EFI_HII_IIBT_IMAGE_8BIT_BASE;
+
+typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_8BIT_BLOCK;
+
+typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 PaletteIndex;
+ EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
+} EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK;
+
+typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ EFI_IMAGE_ID ImageId;
+} EFI_HII_IIBT_DUPLICATE_BLOCK;
+
+typedef struct _EFI_HII_IIBT_JPEG_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT32 Size;
+ UINT8 Data[1];
+} EFI_HII_IIBT_JPEG_BLOCK;
+
+typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT8 SkipCount;
+} EFI_HII_IIBT_SKIP1_BLOCK;
+
+typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
+ EFI_HII_IMAGE_BLOCK Header;
+ UINT16 SkipCount;
+} EFI_HII_IIBT_SKIP2_BLOCK;
+
+typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {
+ UINT16 PaletteCount;
+} EFI_HII_IMAGE_PALETTE_INFO_HEADER;
+
+typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
+ UINT16 PaletteSize;
+ EFI_HII_RGB_PIXEL PaletteValue[1];
+} EFI_HII_IMAGE_PALETTE_INFO;
+
+//
+// Forms Package
+//
+
+typedef struct _EFI_HII_FORM_PACKAGE {
+ EFI_HII_PACKAGE_HEADER Header;
+ // EFI_IFR_OP_HEADER OpCodeHeader;
+ // More op-codes follow
+} EFI_HII_FORM_PACKAGE;
+
+typedef struct {
+ UINT8 Hour;
+ UINT8 Minute;
+ UINT8 Second;
+} EFI_HII_TIME;
+
+typedef struct {
+ UINT16 Year;
+ UINT8 Month;
+ UINT8 Day;
+} EFI_HII_DATE;
+
+typedef union {
+ UINT8 u8;
+ UINT16 u16;
+ UINT32 u32;
+ UINT64 u64;
+ BOOLEAN b;
+ EFI_HII_TIME time;
+ EFI_HII_DATE date;
+ EFI_STRING_ID string;
+} EFI_IFR_TYPE_VALUE;
+
+#define EFI_IFR_FORM_OP 0x01
+#define EFI_IFR_SUBTITLE_OP 0x02
+#define EFI_IFR_TEXT_OP 0x03
+#define EFI_IFR_IMAGE_OP 0x04
+#define EFI_IFR_ONE_OF_OP 0x05
+#define EFI_IFR_CHECKBOX_OP 0x06
+#define EFI_IFR_NUMERIC_OP 0x07
+#define EFI_IFR_PASSWORD_OP 0x08
+#define EFI_IFR_ONE_OF_OPTION_OP 0x09
+#define EFI_IFR_SUPPRESS_IF_OP 0x0A
+#define EFI_IFR_LOCKED_OP 0x0B
+#define EFI_IFR_ACTION_OP 0x0C
+#define EFI_IFR_RESET_BUTTON_OP 0x0D
+#define EFI_IFR_FORM_SET_OP 0x0E
+#define EFI_IFR_REF_OP 0x0F
+#define EFI_IFR_NO_SUBMIT_IF_OP 0x10
+#define EFI_IFR_INCONSISTENT_IF_OP 0x11
+#define EFI_IFR_EQ_ID_VAL_OP 0x12
+#define EFI_IFR_EQ_ID_ID_OP 0x13
+#define EFI_IFR_EQ_ID_LIST_OP 0x14
+#define EFI_IFR_AND_OP 0x15
+#define EFI_IFR_OR_OP 0x16
+#define EFI_IFR_NOT_OP 0x17
+#define EFI_IFR_RULE_OP 0x18
+#define EFI_IFR_GRAY_OUT_IF_OP 0x19
+#define EFI_IFR_DATE_OP 0x1A
+#define EFI_IFR_TIME_OP 0x1B
+#define EFI_IFR_STRING_OP 0x1C
+#define EFI_IFR_REFRESH_OP 0x1D
+#define EFI_IFR_DISABLE_IF_OP 0x1E
+#define EFI_IFR_TO_LOWER_OP 0x20
+#define EFI_IFR_TO_UPPER_OP 0x21
+#define EFI_IFR_ORDERED_LIST_OP 0x23
+#define EFI_IFR_VARSTORE_OP 0x24
+#define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
+#define EFI_IFR_VARSTORE_EFI_OP 0x26
+#define EFI_IFR_VARSTORE_DEVICE_OP 0x27
+#define EFI_IFR_VERSION_OP 0x28
+#define EFI_IFR_END_OP 0x29
+#define EFI_IFR_MATCH_OP 0x2A
+#define EFI_IFR_EQUAL_OP 0x2F
+#define EFI_IFR_NOT_EQUAL_OP 0x30
+#define EFI_IFR_GREATER_THAN_OP 0x31
+#define EFI_IFR_GREATER_EQUAL_OP 0x32
+#define EFI_IFR_LESS_THAN_OP 0x33
+#define EFI_IFR_LESS_EQUAL_OP 0x34
+#define EFI_IFR_BITWISE_AND_OP 0x35
+#define EFI_IFR_BITWISE_OR_OP 0x36
+#define EFI_IFR_BITWISE_NOT_OP 0x37
+#define EFI_IFR_SHIFT_LEFT_OP 0x38
+#define EFI_IFR_SHIFT_RIGHT_OP 0x39
+#define EFI_IFR_ADD_OP 0x3A
+#define EFI_IFR_SUBTRACT_OP 0x3B
+#define EFI_IFR_MULTIPLY_OP 0x3C
+#define EFI_IFR_DIVIDE_OP 0x3D
+#define EFI_IFR_MODULO_OP 0x3E
+#define EFI_IFR_RULE_REF_OP 0x3F
+#define EFI_IFR_QUESTION_REF1_OP 0x40
+#define EFI_IFR_QUESTION_REF2_OP 0x41
+#define EFI_IFR_UINT8_OP 0x42
+#define EFI_IFR_UINT16_OP 0x43
+#define EFI_IFR_UINT32_OP 0x44
+#define EFI_IFR_UINT64_OP 0x45
+#define EFI_IFR_TRUE_OP 0x46
+#define EFI_IFR_FALSE_OP 0x47
+#define EFI_IFR_TO_UINT_OP 0x48
+#define EFI_IFR_TO_STRING_OP 0x49
+#define EFI_IFR_TO_BOOLEAN_OP 0x4A
+#define EFI_IFR_MID_OP 0x4B
+#define EFI_IFR_FIND_OP 0x4C
+#define EFI_IFR_TOKEN_OP 0x4D
+#define EFI_IFR_STRING_REF1_OP 0x4E
+#define EFI_IFR_STRING_REF2_OP 0x4F
+#define EFI_IFR_CONDITIONAL_OP 0x50
+#define EFI_IFR_QUESTION_REF3_OP 0x51
+#define EFI_IFR_ZERO_OP 0x52
+#define EFI_IFR_ONE_OP 0x53
+#define EFI_IFR_ONES_OP 0x54
+#define EFI_IFR_UNDEFINED_OP 0x55
+#define EFI_IFR_LENGTH_OP 0x56
+#define EFI_IFR_DUP_OP 0x57
+#define EFI_IFR_THIS_OP 0x58
+#define EFI_IFR_SPAN_OP 0x59
+#define EFI_IFR_VALUE_OP 0x5A
+#define EFI_IFR_DEFAULT_OP 0x5B
+#define EFI_IFR_DEFAULTSTORE_OP 0x5C
+#define EFI_IFR_CATENATE_OP 0x5E
+#define EFI_IFR_GUID_OP 0x5F
+
+typedef struct _EFI_IFR_OP_HEADER {
+ UINT8 OpCode;
+ UINT8 Length:7;
+ UINT8 Scope:1;
+} EFI_IFR_OP_HEADER;
+
+typedef struct _EFI_IFR_STATEMENT_HEADER {
+ EFI_STRING_ID Prompt;
+ EFI_STRING_ID Help;
+} EFI_IFR_STATEMENT_HEADER;
+
+typedef struct _EFI_IFR_QUESTION_HEADER {
+ EFI_IFR_STATEMENT_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
+ EFI_VARSTORE_ID VarStoreId;
+ union {
+ EFI_STRING_ID VarName;
+ UINT16 VarOffset;
+ } VarStoreInfo;
+ UINT8 Flags;
+} EFI_IFR_QUESTION_HEADER;
+
+#define EFI_IFR_FLAG_READ_ONLY 0x01
+#define EFI_IFR_FLAG_CALLBACK 0x04
+#define EFI_IFR_FLAG_RESET_REQUIRED 0x10
+#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
+
+typedef struct _EFI_IFR_DEFAULTSTORE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DefaultName;
+ UINT16 DefaultId;
+} EFI_IFR_DEFAULTSTORE;
+
+#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
+#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
+#define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
+#define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
+#define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
+#define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
+#define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
+#define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
+#define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
+
+typedef struct _EFI_IFR_VARSTORE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID Guid;
+ EFI_VARSTORE_ID VarStoreId;
+ UINT16 Size;
+ UINT8 Name[1];
+} EFI_IFR_VARSTORE;
+
+typedef struct _EFI_IFR_VARSTORE_EFI {
+ EFI_IFR_OP_HEADER Header;
+ UINT16 VarStoreId;
+ EFI_GUID Guid;
+ UINT32 Attributes;
+} EFI_IFR_VARSTORE_EFI;
+
+typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {
+ EFI_IFR_OP_HEADER Header;
+ UINT16 VarStoreId;
+ EFI_GUID Guid;
+} EFI_IFR_VARSTORE_NAME_VALUE;
+
+typedef struct _EFI_IFR_FORM_SET {
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID Guid;
+ EFI_STRING_ID FormSetTitle;
+ EFI_STRING_ID Help;
+} EFI_IFR_FORM_SET;
+
+typedef struct _EFI_IFR_END {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_END;
+
+typedef struct _EFI_IFR_FORM {
+ EFI_IFR_OP_HEADER Header;
+ UINT16 FormId;
+ EFI_STRING_ID FormTitle;
+} EFI_IFR_FORM;
+
+typedef struct _EFI_IFR_IMAGE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IMAGE_ID Id;
+} EFI_IFR_IMAGE;
+
+typedef struct _EFI_IFR_LOCKED {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_LOCKED;
+
+typedef struct _EFI_IFR_RULE {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 RuleId;
+} EFI_IFR_RULE;
+
+typedef struct _EFI_IFR_DEFAULT {
+ EFI_IFR_OP_HEADER Header;
+ UINT16 DefaultId;
+ UINT8 Type;
+ EFI_IFR_TYPE_VALUE Value;
+} EFI_IFR_DEFAULT;
+
+typedef struct _EFI_IFR_VALUE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_VALUE;
+
+typedef struct _EFI_IFR_SUBTITLE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_STATEMENT_HEADER Statement;
+ UINT8 Flags;
+} EFI_IFR_SUBTITLE;
+
+#define EFI_IFR_FLAGS_HORIZONTAL 0x01
+
+typedef struct _EFI_IFR_CHECKBOX {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+} EFI_IFR_CHECKBOX;
+
+#define EFI_IFR_CHECKBOX_DEFAULT 0x01
+#define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
+
+typedef struct _EFI_IFR_TEXT {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_STATEMENT_HEADER Statement;
+ EFI_STRING_ID TextTwo;
+} EFI_IFR_TEXT;
+
+typedef struct _EFI_IFR_REF {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
+} EFI_IFR_REF;
+
+typedef struct _EFI_IFR_REF2 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
+ EFI_QUESTION_ID QuestionId;
+} EFI_IFR_REF2;
+
+typedef struct _EFI_IFR_REF3 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
+ EFI_QUESTION_ID QuestionId;
+ EFI_GUID FormSetId;
+} EFI_IFR_REF3;
+
+typedef struct _EFI_IFR_REF4 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_FORM_ID FormId;
+ EFI_QUESTION_ID QuestionId;
+ EFI_GUID FormSetId;
+ EFI_STRING_ID DevicePath;
+} EFI_IFR_REF4;
+
+typedef struct _EFI_IFR_RESET_BUTTON {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_DEFAULT_ID DefaultId;
+} EFI_IFR_RESET_BUTTON;
+
+typedef struct _EFI_IFR_ACTION {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ EFI_STRING_ID QuestionConfig;
+} EFI_IFR_ACTION;
+
+typedef struct _EFI_IFR_ACTION_1 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+} EFI_IFR_ACTION_1;
+
+typedef struct _EFI_IFR_DATE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+} EFI_IFR_DATE;
+
+#define EFI_QF_DATE_YEAR_SUPPRESS 0x01
+#define EFI_QF_DATE_MONTH_SUPPRESS 0x02
+#define EFI_QF_DATE_DAY_SUPPRESS 0x04
+
+#define EFI_QF_DATE_STORAGE 0x30
+#define QF_DATE_STORAGE_NORMAL 0x00
+#define QF_DATE_STORAGE_TIME 0x10
+#define QF_DATE_STORAGE_WAKEUP 0x20
+
+typedef union {
+ struct {
+ UINT8 MinValue;
+ UINT8 MaxValue;
+ UINT8 Step;
+ } u8;
+ struct {
+ UINT16 MinValue;
+ UINT16 MaxValue;
+ UINT16 Step;
+ } u16;
+ struct {
+ UINT32 MinValue;
+ UINT32 MaxValue;
+ UINT32 Step;
+ } u32;
+ struct {
+ UINT64 MinValue;
+ UINT64 MaxValue;
+ UINT64 Step;
+ } u64;
+} MINMAXSTEP_DATA;
+
+typedef struct _EFI_IFR_NUMERIC {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+ MINMAXSTEP_DATA data;
+} EFI_IFR_NUMERIC;
+
+#define EFI_IFR_NUMERIC_SIZE 0x03
+#define EFI_IFR_NUMERIC_SIZE_1 0x00
+#define EFI_IFR_NUMERIC_SIZE_2 0x01
+#define EFI_IFR_NUMERIC_SIZE_4 0x02
+#define EFI_IFR_NUMERIC_SIZE_8 0x03
+
+#define EFI_IFR_DISPLAY 0x30
+#define EFI_IFR_DISPLAY_INT_DEC 0x00
+#define EFI_IFR_DISPLAY_UINT_DEC 0x10
+#define EFI_IFR_DISPLAY_UINT_HEX 0x20
+
+typedef struct _EFI_IFR_ONE_OF {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+ MINMAXSTEP_DATA data;
+} EFI_IFR_ONE_OF;
+
+typedef struct _EFI_IFR_STRING {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 MinSize;
+ UINT8 MaxSize;
+ UINT8 Flags;
+} EFI_IFR_STRING;
+
+#define EFI_IFR_STRING_MULTI_LINE 0x01
+
+typedef struct _EFI_IFR_PASSWORD {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT16 MinSize;
+ UINT16 MaxSize;
+} EFI_IFR_PASSWORD;
+
+typedef struct _EFI_IFR_ORDERED_LIST {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 MaxContainers;
+ UINT8 Flags;
+} EFI_IFR_ORDERED_LIST;
+
+#define EFI_IFR_UNIQUE_SET 0x01
+#define EFI_IFR_NO_EMPTY_SET 0x02
+
+typedef struct _EFI_IFR_TIME {
+ EFI_IFR_OP_HEADER Header;
+ EFI_IFR_QUESTION_HEADER Question;
+ UINT8 Flags;
+} EFI_IFR_TIME;
+
+#define QF_TIME_HOUR_SUPPRESS 0x01
+#define QF_TIME_MINUTE_SUPPRESS 0x02
+#define QF_TIME_SECOND_SUPPRESS 0x04
+
+#define QF_TIME_STORAGE 0x30
+#define QF_TIME_STORAGE_NORMAL 0x00
+#define QF_TIME_STORAGE_TIME 0x10
+#define QF_TIME_STORAGE_WAKEUP 0x20
+
+typedef struct _EFI_IFR_DISABLE_IF {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_DISABLE_IF;
+
+typedef struct _EFI_IFR_SUPPRESS_IF {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_SUPPRESS_IF;
+
+typedef struct _EFI_IFR_GRAY_OUT_IF {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_GRAY_OUT_IF;
+
+typedef struct _EFI_IFR_INCONSISTENT_IF {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID Error;
+} EFI_IFR_INCONSISTENT_IF;
+
+typedef struct _EFI_IFR_NO_SUBMIT_IF {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID Error;
+} EFI_IFR_NO_SUBMIT_IF;
+
+typedef struct _EFI_IFR_REFRESH {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 RefreshInterval;
+} EFI_IFR_REFRESH;
+
+typedef struct _EFI_IFR_VARSTORE_DEVICE {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DevicePath;
+} EFI_IFR_VARSTORE_DEVICE;
+
+typedef struct _EFI_IFR_ONE_OF_OPTION {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID Option;
+ UINT8 Flags;
+ UINT8 Type;
+ EFI_IFR_TYPE_VALUE Value;
+} EFI_IFR_ONE_OF_OPTION;
+
+#define EFI_IFR_TYPE_NUM_SIZE_8 0x00
+#define EFI_IFR_TYPE_NUM_SIZE_16 0x01
+#define EFI_IFR_TYPE_NUM_SIZE_32 0x02
+#define EFI_IFR_TYPE_NUM_SIZE_64 0x03
+#define EFI_IFR_TYPE_BOOLEAN 0x04
+#define EFI_IFR_TYPE_TIME 0x05
+#define EFI_IFR_TYPE_DATE 0x06
+#define EFI_IFR_TYPE_STRING 0x07
+#define EFI_IFR_TYPE_OTHER 0x08
+
+#define EFI_IFR_OPTION_DEFAULT 0x10
+#define EFI_IFR_OPTION_DEFAULT_MFG 0x20
+
+typedef struct _EFI_IFR_GUID {
+ EFI_IFR_OP_HEADER Header;
+ EFI_GUID Guid;
+ //Optional Data Follows
+} EFI_IFR_GUID;
+
+typedef struct _EFI_IFR_DUP {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_DUP;
+
+typedef struct _EFI_IFR_EQ_ID_ID {
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId1;
+ EFI_QUESTION_ID QuestionId2;
+} EFI_IFR_EQ_ID_ID;
+
+typedef struct _EFI_IFR_EQ_ID_VAL {
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
+ UINT16 Value;
+} EFI_IFR_EQ_ID_VAL;
+
+typedef struct _EFI_IFR_EQ_ID_LIST {
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
+ UINT16 ListLength;
+ UINT16 ValueList[1];
+} EFI_IFR_EQ_ID_LIST;
+
+typedef struct _EFI_IFR_QUESTION_REF1 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_QUESTION_ID QuestionId;
+} EFI_IFR_QUESTION_REF1;
+
+typedef struct _EFI_IFR_UINT8 {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Value;
+} EFI_IFR_UINT8;
+
+typedef struct _EFI_IFR_UINT16 {
+ EFI_IFR_OP_HEADER Header;
+ UINT16 Value;
+} EFI_IFR_UINT16;
+
+typedef struct _EFI_IFR_QUESTION_REF2 {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_QUESTION_REF2;
+
+typedef struct _EFI_IFR_UINT32 {
+ EFI_IFR_OP_HEADER Header;
+ UINT32 Value;
+} EFI_IFR_UINT32;
+
+typedef struct _EFI_IFR_UINT64 {
+ EFI_IFR_OP_HEADER Header;
+ UINT64 Value;
+} EFI_IFR_UINT64;
+
+typedef struct _EFI_IFR_QUESTION_REF3 {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_QUESTION_REF3;
+
+typedef struct _EFI_IFR_QUESTION_REF3_2 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DevicePath;
+} EFI_IFR_QUESTION_REF3_2;
+
+typedef struct _EFI_IFR_QUESTION_REF3_3 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID DevicePath;
+ EFI_GUID Guid;
+} EFI_IFR_QUESTION_REF3_3;
+
+typedef struct _EFI_IFR_RULE_REF {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 RuleId;
+} EFI_IFR_RULE_REF;
+
+typedef struct _EFI_IFR_STRING_REF1 {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID StringId;
+} EFI_IFR_STRING_REF1;
+
+typedef struct _EFI_IFR_STRING_REF2 {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_STRING_REF2;
+
+typedef struct _EFI_IFR_THIS {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_THIS;
+
+typedef struct _EFI_IFR_TRUE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TRUE;
+
+typedef struct _EFI_IFR_FALSE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_FALSE;
+
+typedef struct _EFI_IFR_ONE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_ONE;
+
+typedef struct _EFI_IFR_ONES {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_ONES;
+
+typedef struct _EFI_IFR_ZERO {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_ZERO;
+
+typedef struct _EFI_IFR_UNDEFINED {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_UNDEFINED;
+
+typedef struct _EFI_IFR_VERSION {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_VERSION;
+
+typedef struct _EFI_IFR_LENGTH {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_LENGTH;
+
+typedef struct _EFI_IFR_NOT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_NOT;
+
+typedef struct _EFI_IFR_BITWISE_NOT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_BITWISE_NOT;
+
+typedef struct _EFI_IFR_TO_BOOLEAN {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TO_BOOLEAN;
+
+#define EFI_IFR_STRING_UNSIGNED_DEC 0
+#define EFI_IFR_STRING_SIGNED_DEC 1
+#define EFI_IFR_STRING_LOWERCASE_HEX 2
+#define EFI_IFR_STRING_UPPERCASE_HEX 3
+
+#define EFI_IFR_STRING_ASCII 0
+#define EFI_IFR_STRING_UNICODE 8
+
+typedef struct _EFI_IFR_TO_STRING {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Format;
+} EFI_IFR_TO_STRING;
+
+typedef struct _EFI_IFR_TO_UINT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TO_UINT;
+
+typedef struct _EFI_IFR_TO_UPPER {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TO_UPPER;
+
+typedef struct _EFI_IFR_TO_LOWER {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TO_LOWER;
+
+typedef struct _EFI_IFR_ADD {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_ADD;
+
+typedef struct _EFI_IFR_AND {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_AND;
+
+typedef struct _EFI_IFR_BITWISE_AND {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_BITWISE_AND;
+
+typedef struct _EFI_IFR_BITWISE_OR {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_BITWISE_OR;
+
+typedef struct _EFI_IFR_CATENATE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_CATENATE;
+
+typedef struct _EFI_IFR_DIVIDE {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_DIVIDE;
+
+typedef struct _EFI_IFR_EQUAL {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_EQUAL;
+
+typedef struct _EFI_IFR_GREATER_EQUAL {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_GREATER_EQUAL;
+
+typedef struct _EFI_IFR_GREATER_THAN {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_GREATER_THAN;
+
+typedef struct _EFI_IFR_LESS_EQUAL {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_LESS_EQUAL;
+
+typedef struct _EFI_IFR_LESS_THAN {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_LESS_THAN;
+
+typedef struct _EFI_IFR_MATCH {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_MATCH;
+
+typedef struct _EFI_IFR_MULTIPLY {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_MULTIPLY;
+
+typedef struct _EFI_IFR_MODULO {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_MODULO;
+
+typedef struct _EFI_IFR_NOT_EQUAL {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_NOT_EQUAL;
+
+typedef struct _EFI_IFR_OR {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_OR;
+
+typedef struct _EFI_IFR_SHIFT_LEFT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_SHIFT_LEFT;
+
+typedef struct _EFI_IFR_SHIFT_RIGHT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_SHIFT_RIGHT;
+
+typedef struct _EFI_IFR_SUBTRACT {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_SUBTRACT;
+
+typedef struct _EFI_IFR_CONDITIONAL {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_CONDITIONAL;
+
+#define EFI_IFR_FF_CASE_SENSITIVE 0x00
+#define EFI_IFR_FF_CASE_INSENSITIVE 0x01
+
+typedef struct _EFI_IFR_FIND {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Format;
+} EFI_IFR_FIND;
+
+typedef struct _EFI_IFR_MID {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_MID;
+
+typedef struct _EFI_IFR_TOKEN {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_TOKEN;
+
+#define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
+#define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
+
+typedef struct _EFI_IFR_SPAN {
+ EFI_IFR_OP_HEADER Header;
+ UINT8 Flags;
+} EFI_IFR_SPAN;
+
+//
+// Keyboard Package
+//
+
+typedef enum {
+ EfiKeyLCtrl,
+ EfiKeyA0,
+ EfiKeyLAlt,
+ EfiKeySpaceBar,
+ EfiKeyA2,
+ EfiKeyA3,
+ EfiKeyA4,
+ EfiKeyRCtrl,
+ EfiKeyLeftArrow,
+ EfiKeyDownArrow,
+ EfiKeyRightArrow,
+ EfiKeyZero,
+ EfiKeyPeriod,
+ EfiKeyEnter,
+ EfiKeyLShift,
+ EfiKeyB0,
+ EfiKeyB1,
+ EfiKeyB2,
+ EfiKeyB3,
+ EfiKeyB4,
+ EfiKeyB5,
+ EfiKeyB6,
+ EfiKeyB7,
+ EfiKeyB8,
+ EfiKeyB9,
+ EfiKeyB10,
+ EfiKeyRshift,
+ EfiKeyUpArrow,
+ EfiKeyOne,
+ EfiKeyTwo,
+ EfiKeyThree,
+ EfiKeyCapsLock,
+ EfiKeyC1,
+ EfiKeyC2,
+ EfiKeyC3,
+ EfiKeyC4,
+ EfiKeyC5,
+ EfiKeyC6,
+ EfiKeyC7,
+ EfiKeyC8,
+ EfiKeyC9,
+ EfiKeyC10,
+ EfiKeyC11,
+ EfiKeyC12,
+ EfiKeyFour,
+ EfiKeyFive,
+ EfiKeySix,
+ EfiKeyPlus,
+ EfiKeyTab,
+ EfiKeyD1,
+ EfiKeyD2,
+ EfiKeyD3,
+ EfiKeyD4,
+ EfiKeyD5,
+ EfiKeyD6,
+ EfiKeyD7,
+ EfiKeyD8,
+ EfiKeyD9,
+ EfiKeyD10,
+ EfiKeyD11,
+ EfiKeyD12,
+ EfiKeyD13,
+ EfiKeyDel,
+ EfiKeyEnd,
+ EfiKeyPgDn,
+ EfiKeySeven,
+ EfiKeyEight,
+ EfiKeyNine,
+ EfiKeyE0,
+ EfiKeyE1,
+ EfiKeyE2,
+ EfiKeyE3,
+ EfiKeyE4,
+ EfiKeyE5,
+ EfiKeyE6,
+ EfiKeyE7,
+ EfiKeyE8,
+ EfiKeyE9,
+ EfiKeyE10,
+ EfiKeyE11,
+ EfiKeyE12,
+ EfiKeyBackSpace,
+ EfiKeyIns,
+ EfiKeyHome,
+ EfiKeyPgUp,
+ EfiKeyNLck,
+ EfiKeySlash,
+ EfiKeyAsterisk,
+ EfiKeyMinus,
+ EfiKeyEsc,
+ EfiKeyF1,
+ EfiKeyF2,
+ EfiKeyF3,
+ EfiKeyF4,
+ EfiKeyF5,
+ EfiKeyF6,
+ EfiKeyF7,
+ EfiKeyF8,
+ EfiKeyF9,
+ EfiKeyF10,
+ EfiKeyF11,
+ EfiKeyF12,
+ EfiKeyPrint,
+ EfiKeySLck,
+ EfiKeyPause
+} EFI_KEY;
+
+typedef struct {
+ EFI_KEY Key;
+ CHAR16 Unicode;
+ CHAR16 ShiftedUnicode;
+ CHAR16 AltGrUnicode;
+ CHAR16 ShiftedAltGrUnicode;
+ UINT16 Modifier;
+ UINT16 AffectedAttribute;
+} EFI_KEY_DESCRIPTOR;
+
+//
+// A key which is affected by all the standard shift modifiers.
+// Most keys would be expected to have this bit active.
+//
+#define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
+//
+// This key is affected by the caps lock so that if a keyboard driver
+// would need to disambiguate between a key which had a ¡°1¡± defined
+// versus a ¡°a¡± character. Having this bit turned on would tell
+// the keyboard driver to use the appropriate shifted state or not.
+//
+#define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
+//
+// Similar to the case of CAPS lock, if this bit is active, the key
+// is affected by the num lock being turned on.
+//
+#define EFI_AFFECTED_BY_NUM_LOCK 0x0004
+
+typedef struct {
+ UINT16 LayoutLength;
+ EFI_GUID Guid;
+ UINT32 LayoutDescriptorStringOffset;
+ UINT8 DescriptorCount;
+ // EFI_KEY_DESCRIPTOR Descriptors[];
+} EFI_HII_KEYBOARD_LAYOUT;
+
+typedef struct {
+ EFI_HII_PACKAGE_HEADER Header;
+ UINT16 LayoutCount;
+ // EFI_HII_KEYBOARD_LAYOUT Layout[];
+} EFI_HII_KEYBOARD_PACKAGE_HDR;
+
+typedef struct {
+ CHAR16 Language[3];
+ CHAR16 Space;
+ CHAR16 DescriptionString[1];
+} EFI_DESCRIPTION_STRING;
+
+typedef struct {
+ UINT16 DescriptionCount;
+ EFI_DESCRIPTION_STRING DescriptionString[1];
+} EFI_DESCRIPTION_STRING_BUNDLE;
+
+//
+// Modifier values
+//
+#define EFI_NULL_MODIFIER 0x0000
+#define EFI_LEFT_CONTROL_MODIFIER 0x0001
+#define EFI_RIGHT_CONTROL_MODIFIER 0x0002
+#define EFI_LEFT_ALT_MODIFIER 0x0003
+#define EFI_RIGHT_ALT_MODIFIER 0x0004
+#define EFI_ALT_GR_MODIFIER 0x0005
+#define EFI_INSERT_MODIFIER 0x0006
+#define EFI_DELETE_MODIFIER 0x0007
+#define EFI_PAGE_DOWN_MODIFIER 0x0008
+#define EFI_PAGE_UP_MODIFIER 0x0009
+#define EFI_HOME_MODIFIER 0x000A
+#define EFI_END_MODIFIER 0x000B
+#define EFI_LEFT_SHIFT_MODIFIER 0x000C
+#define EFI_RIGHT_SHIFT_MODIFIER 0x000D
+#define EFI_CAPS_LOCK_MODIFIER 0x000E
+#define EFI_NUM_LOCK _MODIFIER 0x000F
+#define EFI_LEFT_ARROW_MODIFIER 0x0010
+#define EFI_RIGHT_ARROW_MODIFIER 0x0011
+#define EFI_DOWN_ARROW_MODIFIER 0x0012
+#define EFI_UP_ARROW_MODIFIER 0x0013
+#define EFI_NS_KEY_MODIFIER 0x0014
+#define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
+#define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
+#define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
+#define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
+#define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
+#define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
+#define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
+#define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
+#define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
+#define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
+#define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
+#define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
+#define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
+
+//
+// Keys that have multiple control functions based on modifier
+// settings are handled in the keyboard driver implementation.
+// For instance PRINT_KEY might have a modifier held down and
+// is still a nonprinting character, but might have an alternate
+// control function like SYSREQUEST
+//
+#define EFI_PRINT_MODIFIER 0x0022
+#define EFI_SYS_REQUEST_MODIFIER 0x0023
+#define EFI_SCROLL_LOCK_MODIFIER 0x0024
+#define EFI_PAUSE_MODIFIER 0x0025
+#define EFI_BREAK_MODIFIER 0x0026
+
+#pragma pack()
+
+#endif
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.c
new file mode 100644
index 0000000..2d1cd3f
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ AbsolutePointer.c
+
+Abstract:
+
+ EFI_ABSOLUTE_POINTER_PROTOCOL from the UEFI 2.1 specification.
+
+ This protocol specifies a simple method for accessing absolute pointer devices.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (AbsolutePointer)
+
+EFI_GUID gEfiAbsolutePointerProtocolGuid = EFI_ABSOLUTE_POINTER_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiAbsolutePointerProtocolGuid, "Absolute Pointer Protocol", "UEFI 2.1 Absolute Pointer Protocol");
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.h
new file mode 100644
index 0000000..7f5e0c4
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.h
@@ -0,0 +1,117 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ AbsolutePointer.h
+
+Abstract:
+
+ EFI_ABSOLUTE_POINTER_PROTOCOL from the UEFI 2.1 specification.
+
+ This protocol specifies a simple method for accessing absolute pointer devices.
+
+--*/
+
+#ifndef __ABSOLUTE_POINTER_H__
+#define __ABSOLUTE_POINTER_H__
+
+#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
+ { \
+ 0x8D59D32B, 0xC655, 0x4AE9, 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_ABSOLUTE_POINTER_PROTOCOL);
+
+//
+// Data structures
+//
+
+typedef struct {
+ UINT64 AbsoluteMinX;
+ UINT64 AbsoluteMinY;
+ UINT64 AbsoluteMinZ;
+ UINT64 AbsoluteMaxX;
+ UINT64 AbsoluteMaxY;
+ UINT64 AbsoluteMaxZ;
+ UINT32 Attributes;
+} EFI_ABSOLUTE_POINTER_MODE;
+
+typedef struct {
+ UINT64 CurrentX;
+ UINT64 CurrentY;
+ UINT64 CurrentZ;
+ UINT32 ActiveButtons;
+} EFI_ABSOLUTE_POINTER_STATE;
+
+#define EFI_ABSP_SupportsAltActive 0x00000001
+#define EFI_ABSP_SupportsPressureAsZ 0x00000002
+
+#define EFI_ABSP_TouchActive 0x00000001
+#define EFI_ABS_AltActive 0x00000002
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ABSOLUTE_POINTER_RESET) (
+ IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
+ IN BOOLEAN ExtendedVerification
+ )
+/*++
+
+ Routine Description:
+ Resets the pointer device hardware.
+
+ Arguments:
+ This - Protocol instance pointer.
+ ExtendedVerification - Driver may perform diagnostics on reset.
+
+ Returns:
+ EFI_SUCCESS - The device was reset.
+ EFI_DEVICE_ERROR - The device is not functioning correctly and could
+ not be reset.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE) (
+ IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,
+ IN OUT EFI_ABSOLUTE_POINTER_STATE *State
+ )
+/*++
+
+ Routine Description:
+ Retrieves the current state of a pointer device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ State - A pointer to the state information on the pointer device.
+
+ Returns:
+ EFI_SUCCESS - The state of the pointer device was returned in State..
+ EFI_NOT_READY - The state of the pointer device has not changed since the last call to
+ GetState().
+ EFI_DEVICE_ERROR - A device error occurred while attempting to retrieve the pointer
+ device's current state.
+--*/
+;
+
+typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL {
+ EFI_ABSOLUTE_POINTER_RESET Reset;
+ EFI_ABSOLUTE_POINTER_GET_STATE GetState;
+ EFI_EVENT WaitForInput;
+ EFI_ABSOLUTE_POINTER_MODE *Mode;
+} EFI_ABSOLUTE_POINTER_PROTOCOL;
+
+extern EFI_GUID gEfiAbsolutePointerProtocolGuid;
+
+#endif
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h
index 3409ca0..a0205ca 100644
--- a/EdkCompatibilityPkg/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h
@@ -88,18 +88,18 @@ typedef enum{
Dhcp4SendDiscover = 0x01,
Dhcp4RcvdOffer = 0x02,
Dhcp4SelectOffer = 0x03,
- Dhcp4SendRequest = 0x05,
- Dhcp4RcvdAck = 0x06,
- Dhcp4RcvdNak = 0x07,
- Dhcp4SendDecline = 0x08,
- Dhcp4BoundCompleted = 0x09,
- Dhcp4EnterRenewing = 0x0a,
- Dhcp4EnterRebinding = 0x0b,
- Dhcp4AddressLost = 0x0c,
- Dhcp4Fail = 0x0d
+ Dhcp4SendRequest = 0x04,
+ Dhcp4RcvdAck = 0x05,
+ Dhcp4RcvdNak = 0x06,
+ Dhcp4SendDecline = 0x07,
+ Dhcp4BoundCompleted = 0x08,
+ Dhcp4EnterRenewing = 0x09,
+ Dhcp4EnterRebinding = 0x0a,
+ Dhcp4AddressLost = 0x0b,
+ Dhcp4Fail = 0x0c
} EFI_DHCP4_EVENT;
-typedef EFI_STATUS (*EFI_DHCP4_CALLBACK)(
+typedef EFI_STATUS (*EFI_DHCP4_CALLBACK) (
IN EFI_DHCP4_PROTOCOL *This,
IN VOID *Context,
IN EFI_DHCP4_STATE CurrentState,
@@ -139,23 +139,22 @@ typedef struct {
} EFI_DHCP4_LISTEN_POINT;
typedef struct {
- OUT EFI_STATUS Status;
- IN EFI_EVENT CompletionEvent;
- IN EFI_IPv4_ADDRESS RemoteAddress;
- IN UINT16 RemotePort;
- IN EFI_IPv4_ADDRESS GatewayAddress;
- IN UINT32 ListenPointCount;
- IN EFI_DHCP4_LISTEN_POINT *ListenPoints;
- IN UINT32 TimeoutValue;
- IN EFI_DHCP4_PACKET *Packet;
- OUT UINT32 ResponseCount;
- OUT EFI_DHCP4_PACKET *ResponseList;
-}EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN;
-
+ EFI_STATUS Status;
+ EFI_EVENT CompletionEvent;
+ EFI_IPv4_ADDRESS RemoteAddress;
+ UINT16 RemotePort;
+ EFI_IPv4_ADDRESS GatewayAddress;
+ UINT32 ListenPointCount;
+ EFI_DHCP4_LISTEN_POINT *ListenPoints;
+ UINT32 TimeoutValue;
+ EFI_DHCP4_PACKET *Packet;
+ UINT32 ResponseCount;
+ EFI_DHCP4_PACKET *ResponseList;
+} EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN;
typedef
EFI_STATUS
-(EFIAPI *EFI_DHCP4_GET_MODE_DATA)(
+(EFIAPI *EFI_DHCP4_GET_MODE_DATA) (
IN EFI_DHCP4_PROTOCOL *This,
OUT EFI_DHCP4_MODE_DATA *Dhcp4ModeData
);
@@ -176,8 +175,8 @@ typedef EFI_STATUS
typedef
EFI_STATUS
-(EFIAPI *EFI_DHCP4_RENEW) (
- IN EFI_DHCP4_PROTOCOL *This,
+(EFIAPI *EFI_DHCP4_RENEW_REBIND) (
+ IN EFI_DHCP4_PROTOCOL *This,
IN BOOLEAN RebindRequest,
IN EFI_EVENT CompletionEvent OPTIONAL
);
@@ -201,7 +200,7 @@ EFI_STATUS
IN UINT32 DeleteCount,
IN UINT8 *DeleteList OPTIONAL,
IN UINT32 AppendCount,
- IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL,
+ IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL,
OUT EFI_DHCP4_PACKET **NewPacket
);
@@ -212,7 +211,6 @@ EFI_STATUS
IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token
);
-
typedef
EFI_STATUS
(EFIAPI *EFI_DHCP4_PARSE) (
@@ -226,7 +224,7 @@ typedef struct _EFI_DHCP4_PROTOCOL {
EFI_DHCP4_GET_MODE_DATA GetModeData;
EFI_DHCP4_CONFIGURE Configure;
EFI_DHCP4_START Start;
- EFI_DHCP4_RENEW RenewRebind;
+ EFI_DHCP4_RENEW_REBIND RenewRebind;
EFI_DHCP4_RELEASE Release;
EFI_DHCP4_STOP Stop;
EFI_DHCP4_BUILD Build;
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf b/EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf
index f1add5c..2de56ac 100644
--- a/EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf
@@ -37,6 +37,8 @@ COMPONENT_TYPE= LIBRARY
[nmake.common]
[sources.common]
+ AbsolutePointer\AbsolutePointer.h
+ AbsolutePointer\AbsolutePointer.c
AcpiTable\AcpiTable.h
AcpiTable\AcpiTable.c
Arp\Arp.h
@@ -93,8 +95,22 @@ COMPONENT_TYPE= LIBRARY
FileSystemInfo\FileSystemInfo.c
FileSystemVolumeLabelInfo\FileSystemVolumeLabelInfo.h
FileSystemVolumeLabelInfo\FileSystemVolumeLabelInfo.c
+ FormBrowser2\FormBrowser2.h
+ FormBrowser2\FormBrowser2.c
GraphicsOutput\GraphicsOutput.h
GraphicsOutput\GraphicsOutput.c
+ HiiConfigAccess\HiiConfigAccess.h
+ HiiConfigAccess\HiiConfigAccess.c
+ HiiConfigRouting\HiiConfigRouting.h
+ HiiConfigRouting\HiiConfigRouting.c
+ HiiDatabase\HiiDatabase.h
+ HiiDatabase\HiiDatabase.c
+ HiiFont\HiiFont.h
+ HiiFont\HiiFont.c
+ HiiImage\HiiImage.h
+ HiiImage\HiiImage.c
+ HiiString\HiiString.h
+ HiiString\HiiString.c
Ip4\Ip4.h
Ip4\Ip4.c
Ip4Config\Ip4Config.h
@@ -129,6 +145,8 @@ COMPONENT_TYPE= LIBRARY
SimplePointer\SimplePointer.c
SimpleTextIn\SimpleTextIn.h
SimpleTextIn\SimpleTextIn.c
+ SimpleTextInputEx\SimpleTextInputEx.h
+ SimpleTextInputEx\SimpleTextInputEx.c
SimpleTextOut\SimpleTextOut.h
SimpleTextOut\SimpleTextOut.c
Udp4\Udp4.h
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.c
new file mode 100644
index 0000000..068bf3c
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ FormBrowser2.c
+
+Abstract:
+
+ The EFI_FORM_BROWSER2_PROTOCOL is the interface to the UEFI configuration driver.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (FormBrowser2)
+
+EFI_GUID gEfiFormBrowser2ProtocolGuid = EFI_FORM_BROWSER2_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiFormBrowser2ProtocolGuid, "Form Browser2 Protocol", "Form Browser 2.1 protocol");
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.h
new file mode 100644
index 0000000..9e54e36
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.h
@@ -0,0 +1,136 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ FormBrowser2.h
+
+Abstract:
+
+ The EFI_FORM_BROWSER2_PROTOCOL is the interface to the UEFI configuration driver.
+
+--*/
+
+#ifndef _FORM_BROWSER2_H_
+#define _FORM_BROWSER2_H_
+
+#include "EfiHii.h"
+
+#define EFI_FORM_BROWSER2_PROTOCOL_GUID \
+ { \
+ 0xb9d4c360, 0xbcfb, 0x4f9b, 0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_FORM_BROWSER2_PROTOCOL);
+
+typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL;
+
+typedef struct {
+ UINTN LeftColumn;
+ UINTN RightColumn;
+ UINTN TopRow;
+ UINTN BottomRow;
+} EFI_SCREEN_DESCRIPTOR;
+
+typedef UINTN EFI_BROWSER_ACTION_REQUEST;
+
+#define EFI_BROWSER_ACTION_REQUEST_NONE 0
+#define EFI_BROWSER_ACTION_REQUEST_RESET 1
+#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2
+#define EFI_BROWSER_ACTION_REQUEST_EXIT 3
+
+//
+// The following types are currently defined:
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SEND_FORM2) (
+ IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
+ IN EFI_HII_HANDLE *Handles,
+ IN UINTN HandleCount,
+ IN EFI_GUID *FormSetGuid, OPTIONAL
+ IN UINT16 FormId, OPTIONAL
+ IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
+ OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL
+ )
+/*++
+
+Routine Description:
+ This is the routine which an external caller uses to direct the browser
+ where to obtain it's information.
+
+Arguments:
+ This - A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.
+ Handles - A pointer to an array of HII handles to display.
+ HandleCount - The number of handles in the array specified by Handle.
+ FormSetGuid - This field points to the EFI_GUID which must match the Guid field in the EFI_IFR_FORM_SET op-code for the specified
+ forms-based package. If FormSetGuid is NULL, then this function will display the first found forms package.
+ FormId - This field specifies which EFI_IFR_FORM to render as the first displayable page.
+ If this field has a value of 0x0000, then the forms browser will render the specified forms in their encoded order.
+ ScreenDimenions - This allows the browser to be called so that it occupies a portion of the physical screen instead of
+ dynamically determining the screen dimensions.
+ ActionRequest - Points to the action recommended by the form.
+
+Returns:
+ EFI_SUCCESS - The function completed successfully.
+ EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
+ EFI_NOT_FOUND - No valid forms could be found to display.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_BROWSER_CALLBACK2) (
+ IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
+ IN OUT UINTN *ResultsDataSize,
+ IN OUT EFI_STRING ResultsData,
+ IN BOOLEAN RetrieveData,
+ IN CONST EFI_GUID *VariableGuid, OPTIONAL
+ IN CONST CHAR16 *VariableName OPTIONAL
+ )
+/*++
+
+Routine Description:
+ This function is called by a callback handler to retrieve uncommitted state
+ data from the browser.
+
+Arguments:
+ This - A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.
+ ResultsDataSize - A pointer to the size of the buffer associated with ResultsData.
+ On input, the size in bytes of ResultsData.
+ On output, the size of data returned in ResultsData.
+ ResultsData - A string returned from an IFR browser or equivalent.
+ The results string will have no routing information in them.
+ RetrieveData - A BOOLEAN field which allows an agent to retrieve (if RetrieveData = TRUE)
+ data from the uncommitted browser state information or set
+ (if RetrieveData = FALSE) data in the uncommitted browser state information.
+ VariableGuid - An optional field to indicate the target variable GUID name to use.
+ VariableName - An optional field to indicate the target human-readable variable name.
+
+Returns:
+ EFI_SUCCESS - The results have been distributed or are awaiting distribution.
+ EFI_BUFFER_TOO_SMALL - The ResultsDataSize specified was too small to contain the results data.
+
+--*/
+;
+
+typedef struct _EFI_FORM_BROWSER2_PROTOCOL {
+ EFI_SEND_FORM2 SendForm;
+ EFI_BROWSER_CALLBACK2 BrowserCallback;
+} EFI_FORM_BROWSER2_PROTOCOL;
+
+extern EFI_GUID gEfiFormBrowser2ProtocolGuid;
+
+#endif
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.c
new file mode 100644
index 0000000..6820b76
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiConfigAccess.c
+
+Abstract:
+
+ EFI_HII_CONFIG_ACCESS_PROTOCOL as defined in UEFI 2.1 spec.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiConfigAccess)
+
+EFI_GUID gEfiHiiConfigAccessProtocolGuid = EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiConfigAccessProtocolGuid, "HII Config Access Protocol", "HII Config Access 2.1 protocol");
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.h
new file mode 100644
index 0000000..4683647
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.h
@@ -0,0 +1,147 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiConfigAccess.h
+
+Abstract:
+
+ EFI_HII_CONFIG_ACCESS_PROTOCOL as defined in UEFI 2.1 spec.
+
+--*/
+
+#ifndef _HII_CONFIG_ACCESS_H_
+#define _HII_CONFIG_ACCESS_H_
+
+#include EFI_PROTOCOL_DEFINITION (FormBrowser2)
+
+#define EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID \
+ { \
+ 0x330d4706, 0xf2a0, 0x4e4f, 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_HII_CONFIG_ACCESS_PROTOCOL);
+
+typedef UINTN EFI_BROWSER_ACTION;
+
+#define EFI_BROWSER_ACTION_CHANGING 0
+#define EFI_BROWSER_ACTION_CHANGED 1
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_ACCESS_EXTRACT_CONFIG) (
+ IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
+ IN CONST EFI_STRING Request,
+ OUT EFI_STRING *Progress,
+ OUT EFI_STRING *Results
+ )
+/*++
+
+ Routine Description:
+ This function allows a caller to extract the current configuration for one
+ or more named elements from the target driver.
+
+ Arguments:
+ This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
+ Request - A null-terminated Unicode string in <ConfigRequest> format.
+ Progress - On return, points to a character in the Request string.
+ Points to the string's null terminator if request was successful.
+ Points to the most recent '&' before the first failing name/value
+ pair (or the beginning of the string if the failure is in the
+ first name/value pair) if the request was not successful.
+ Results - A null-terminated Unicode string in <ConfigAltResp> format which
+ has all values filled in for the names in the Request string.
+ String to be allocated by the called function.
+
+ Returns:
+ EFI_SUCCESS - The Results is filled with the requested values.
+ EFI_OUT_OF_RESOURCES - Not enough memory to store the results.
+ EFI_INVALID_PARAMETER - Request is NULL, illegal syntax, or unknown name.
+ EFI_NOT_FOUND - Routing data doesn't match any storage in this driver.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_ACCESS_ROUTE_CONFIG) (
+ IN EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
+ IN CONST EFI_STRING Configuration,
+ OUT EFI_STRING *Progress
+ )
+/*++
+
+ Routine Description:
+ This function processes the results of changes in configuration.
+
+ Arguments:
+ This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
+ Configuration - A null-terminated Unicode string in <ConfigResp> format.
+ Progress - A pointer to a string filled in with the offset of the most
+ recent '&' before the first failing name/value pair (or the
+ beginning of the string if the failure is in the first
+ name/value pair) or the terminating NULL if all was successful.
+
+ Returns:
+ EFI_SUCCESS - The Results is processed successfully.
+ EFI_INVALID_PARAMETER - Configuration is NULL.
+ EFI_NOT_FOUND - Routing data doesn't match any storage in this driver.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_ACCESS_FORM_CALLBACK) (
+ IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
+ IN EFI_BROWSER_ACTION Action,
+ IN EFI_QUESTION_ID QuestionId,
+ IN UINT8 Type,
+ IN EFI_IFR_TYPE_VALUE *Value,
+ OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
+ )
+/*++
+
+ Routine Description:
+ This function processes the results of changes in configuration.
+
+ Arguments:
+ This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
+ Action - Specifies the type of action taken by the browser.
+ QuestionId - A unique value which is sent to the original exporting driver
+ so that it can identify the type of data to expect.
+ Type - The type of value for the question.
+ Value - A pointer to the data being sent to the original exporting driver.
+ ActionRequest - On return, points to the action requested by the callback function.
+
+ Returns:
+ EFI_SUCCESS - The callback successfully handled the action.
+ EFI_OUT_OF_RESOURCES - Not enough storage is available to hold the variable and its data.
+ EFI_DEVICE_ERROR - The variable could not be saved.
+ EFI_UNSUPPORTED - The specified Action is not supported by the callback.
+
+--*/
+;
+
+typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL {
+ EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig;
+ EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig;
+ EFI_HII_ACCESS_FORM_CALLBACK Callback;
+} EFI_HII_CONFIG_ACCESS_PROTOCOL;
+
+extern EFI_GUID gEfiHiiConfigAccessProtocolGuid;
+
+#endif
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.c
new file mode 100644
index 0000000..0bbf9a1
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.c
@@ -0,0 +1,27 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiConfigRouting.c
+
+Abstract:
+
+ EFI_HII_CONFIG_ROUTING_PROTOCOL as defined in UEFI 2.1 spec.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiConfigRouting)
+
+EFI_GUID gEfiHiiConfigRoutingProtocolGuid = EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiConfigRoutingProtocolGuid, "HII Config Routing Protocol", "HII Config Routing 2.1 protocol");
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.h
new file mode 100644
index 0000000..de46fce
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.h
@@ -0,0 +1,314 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiConfigRouting.h
+
+Abstract:
+
+ EFI_HII_CONFIG_ROUTING_PROTOCOL as defined in UEFI 2.1 spec.
+
+--*/
+
+#ifndef __EFI_HII_CONFIG_ROUTING_H__
+#define __EFI_HII_CONFIG_ROUTING_H__
+
+#include "EfiHii.h"
+
+#define EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID \
+ { \
+ 0x587e72d7, 0xcc50, 0x4f79, 0x82, 0x09, 0xca, 0x29, 0x1f, 0xc1, 0xa1, 0x0f \
+ }
+
+//
+// Forward reference for pure ANSI compatability
+//
+EFI_FORWARD_DECLARATION (EFI_HII_CONFIG_ROUTING_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_EXTRACT_CONFIG) (
+ IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ IN CONST EFI_STRING Request,
+ OUT EFI_STRING *Progress,
+ OUT EFI_STRING *Results
+ )
+/*++
+
+ Routine Description:
+ This function allows a caller to extract the current configuration
+ for one or more named elements from one or more drivers.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ Request - A null-terminated Unicode string in <MultiConfigRequest> format.
+ Progress - On return, points to a character in the Request string. Points to the string's null
+ terminator if request was successful. Points to the most recent '&' before the first
+ failing name / value pair (or the beginning of the string if the failure is in the first
+ name / value pair) if the request was not successful.
+ Results - Null-terminated Unicode string in <MultiConfigAltResp> format which has all
+ values filled in for the names in the Request string. String to be allocated by the called
+ function.
+
+ Returns:
+ EFI_SUCCESS - The Results string is filled with the values
+ corresponding to all requested names.
+ EFI_OUT_OF_RESOURCES - Not enough memory to store the parts of the results
+ that must be stored awaiting possible future
+ protocols.
+ EFI_NOT_FOUND - Routing data doesn't match any known driver.
+ Progress set to the 'G' in "GUID" of the routing
+ header that doesn't match. Note: There is no
+ requirement that all routing data be validated before
+ any configuration extraction.
+ EFI_INVALID_PARAMETER - For example, passing in a NULL for the Request
+ parameter would result in this type of error. The
+ Progress parameter is set to NULL.
+
+ EFI_INVALID_PARAMETER - Illegal syntax. Progress set to most recent & before
+ the error or the beginning of the string.
+
+ EFI_INVALID_PARAMETER - Unknown name. Progress points to the & before
+ the name in question.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_EXPORT_CONFIG) (
+ IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ OUT EFI_STRING *Results
+ )
+/*++
+
+ Routine Description:
+ This function allows the caller to request the current configuration for the
+ entirety of the current HII database and returns the data in a null-terminated Unicode string.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ Results - Null-terminated Unicode string in <MultiConfigAltResp> format which has all
+ values filled in for the names in the Request string. String to be allocated by the called
+ function. De-allocation is up to the caller.
+
+ Returns:
+ EFI_SUCCESS - The Results string is filled with the values
+ corresponding to all requested names.
+ EFI_OUT_OF_RESOURCES - Not enough memory to store the parts of the results
+ that must be stored awaiting possible future
+ protocols.
+ EFI_INVALID_PARAMETER - For example, passing in a NULL for the Results
+ parameter would result in this type of error.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_ROUTE_CONFIG) (
+ IN EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ IN CONST EFI_STRING Configuration,
+ OUT EFI_STRING *Progress
+ )
+/*++
+
+ Routine Description:
+ This function processes the results of processing forms and routes it to the
+ appropriate handlers or storage.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ Configuration - A null-terminated Unicode string in <MulltiConfigResp> format.
+ Progress - A pointer to a string filled in with the offset of the most recent "&" before the first
+ failing name / value pair (or the beginning of the string if the failure is in the first
+ name / value pair) or the terminating NULL if all was successful.
+
+ Returns:
+ EFI_SUCCESS - The results have been distributed or are awaiting
+ distribution.
+ EFI_OUT_OF_RESOURCES - Not enough memory to store the parts of the results
+ that must be stored awaiting possible future
+ protocols.
+ EFI_INVALID_PARAMETER - Passing in a NULL for the Configuration
+ parameter would result in this type of error.
+ EFI_NOT_FOUND - Target for the specified routing data was not found.
+
+--*/
+;
+
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_BLOCK_TO_CONFIG) (
+ IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ IN CONST EFI_STRING ConfigRequest,
+ IN CONST UINT8 *Block,
+ IN CONST UINTN BlockSize,
+ OUT EFI_STRING *Config,
+ OUT EFI_STRING *Progress
+ )
+/*++
+
+ Routine Description:
+ This helper function is to be called by drivers to map configuration data stored
+ in byte array ("block") formats such as UEFI Variables into current configuration strings.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ ConfigRequest - A null-terminated Unicode string in <ConfigRequest> format.
+ Block - Array of bytes defining the block's configuration.
+ BlockSize - Length in bytes of Block.
+ Config - Filled-in configuration string. String allocated by the function.
+ Returned only if call is successful.
+ Progress - A pointer to a string filled in with the offset of the most recent "&" before the first
+ failing name / value pair (or the beginning of the string if the failure is in the first
+ name / value pair) or the terminating NULL if all was successful.
+
+ Returns:
+ EFI_SUCCESS - The request succeeded. Progress points to the null
+ terminator at the end of the ConfigRequest
+ string.
+ EFI_OUT_OF_RESOURCES - Not enough memory to allocate Config.
+ Progress points to the first character of
+ ConfigRequest.
+ EFI_INVALID_PARAMETER - Passing in a NULL for the ConfigRequest or
+ Block parameter would result in this type of
+ error. Progress points to the first character of
+ ConfigRequest.
+ EFI_NOT_FOUND - Target for the specified routing data was not found.
+ Progress points to the "G" in "GUID" of the
+ errant routing data.
+ EFI_DEVICE_ERROR - Block not large enough. Progress undefined.
+ EFI_INVALID_PARAMETER - Encountered non <BlockName> formatted string.
+ Block is left updated and Progress points at the "&"
+ preceding the first non-<BlockName>.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_CONFIG_TO_BLOCK) (
+ IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ IN CONST EFI_STRING ConfigResp,
+ IN OUT UINT8 *Block,
+ IN OUT UINTN *BlockSize,
+ OUT EFI_STRING *Progress
+ )
+/*++
+
+ Routine Description:
+ This helper function is to be called by drivers to map configuration strings
+ to configurations stored in byte array ("block") formats such as UEFI Variables.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ ConfigResp - A null-terminated Unicode string in <ConfigResp> format.
+ Block - A possibly null array of bytes representing the current block.
+ Only bytes referenced in the ConfigResp string in the block are modified.
+ If this parameter is null or if the *BlockSize parameter is (on input)
+ shorter than required by the Configuration string, only the BlockSize
+ parameter is updated and an appropriate status (see below) is returned.
+
+ BlockSize - The length of the Block in units of UINT8. On input, this is the size of the Block.
+ On output, if successful, contains the index of the last modified byte in the Block.
+
+ Progress - On return, points to an element of the ConfigResp string filled in with the offset of
+ the most recent "&" before the first failing name / value pair (or the beginning of the
+ string if the failure is in the first name / value pair) or the terminating NULL if all was
+ successful.
+ Returns:
+ EFI_SUCCESS - The request succeeded. Progress points to the null
+ terminator at the end of the ConfigResp
+ string.
+ EFI_OUT_OF_RESOURCES - Not enough memory to allocate Config.
+ Progress points to the first character of
+ ConfigResp.
+ EFI_INVALID_PARAMETER - Passing in a NULL for the ConfigResp or
+ Block parameter would result in this type of error.
+ Progress points to the first character of
+ ConfigResp.
+ EFI_NOT_FOUND - Target for the specified routing data was not found.
+ Progress points to the "G" in "GUID" of the
+ errant routing data.
+ EFI_INVALID_PARAMETER - Encountered non <BlockName> formatted name /
+ value pair. Block is left updated and
+ Progress points at the "&" preceding the first
+ non-<BlockName>.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI * EFI_HII_GET_ALT_CFG) (
+ IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
+ IN CONST EFI_STRING Configuration,
+ IN CONST EFI_GUID *Guid,
+ IN CONST EFI_STRING Name,
+ IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
+ IN CONST UINT16 *AltCfgId,
+ OUT EFI_STRING *AltCfgResp
+ )
+/*++
+
+ Routine Description:
+ This helper function is to be called by drivers to extract portions of
+ a larger configuration string.
+
+ Arguments:
+ This - A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance.
+ Configuration - A null-terminated Unicode string in <MultiConfigAltResp> format.
+ Guid - A pointer to the GUID value to search for in the
+ routing portion of the ConfigResp string when retrieving
+ the requested data. If Guid is NULL, then all GUID
+ values will be searched for.
+ Name - A pointer to the NAME value to search for in the
+ routing portion of the ConfigResp string when retrieving
+ the requested data. If Name is NULL, then all Name
+ values will be searched for.
+ DevicePath - A pointer to the PATH value to search for in the
+ routing portion of the ConfigResp string when retrieving
+ the requested data. If DevicePath is NULL, then all
+ DevicePath values will be searched for.
+ AltCfgId - A pointer to the ALTCFG value to search for in the
+ routing portion of the ConfigResp string when retrieving
+ the requested data. If this parameter is NULL,
+ then the current setting will be retrieved.
+ AltCfgResp - A pointer to a buffer which will be allocated by the
+ function which contains the retrieved string as requested.
+ This buffer is only allocated if the call was successful.
+
+ Returns:
+ EFI_SUCCESS - The request succeeded. The requested data was extracted
+ and placed in the newly allocated AltCfgResp buffer.
+ EFI_OUT_OF_RESOURCES - Not enough memory to allocate AltCfgResp.
+ EFI_INVALID_PARAMETER - Any parameter is invalid.
+ EFI_NOT_FOUND - Target for the specified routing data was not found.
+
+--*/
+;
+
+
+typedef struct _EFI_HII_CONFIG_ROUTING_PROTOCOL {
+ EFI_HII_EXTRACT_CONFIG ExtractConfig;
+ EFI_HII_EXPORT_CONFIG ExportConfig;
+ EFI_HII_ROUTE_CONFIG RouteConfig;
+ EFI_HII_BLOCK_TO_CONFIG BlockToConfig;
+ EFI_HII_CONFIG_TO_BLOCK ConfigToBlock;
+ EFI_HII_GET_ALT_CFG GetAltConfig;
+} EFI_HII_CONFIG_ROUTING_PROTOCOL;
+
+extern EFI_GUID gEfiHiiConfigRoutingProtocolGuid;
+
+#endif
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.c
new file mode 100644
index 0000000..1d706f4
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiDatabase.c
+
+Abstract:
+
+ EFI_HII_DATABASE_PROTOCOL
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiDatabase)
+
+EFI_GUID gEfiHiiDatabaseProtocolGuid = EFI_HII_DATABASE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiDatabaseProtocolGuid, "EFI HII DATABASE Protocol", "UEFI 2.1 HII DATABASE Protocol");
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.h
new file mode 100644
index 0000000..5c47e6c
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.h
@@ -0,0 +1,450 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiDatabase.h
+
+Abstract:
+
+ EFI_HII_DATABASE_PROTOCOL from UEFI 2.1 specification.
+
+ This protocol is a database manager for HII related data structures.
+
+Revision History
+
+--*/
+
+#ifndef __EFI_HII_DATABASE_PROTOCOL_H__
+#define __EFI_HII_DATABASE_PROTOCOL_H__
+
+#include "EfiHii.h"
+
+//
+// Global ID for the Hii Database Protocol.
+//
+
+#define EFI_HII_DATABASE_PROTOCOL_GUID \
+ { \
+ 0xef9fc172, 0xa1b2, 0x4693, 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 \
+ }
+
+#define EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID \
+ { \
+ 0x14982a4f, 0xb0ed, 0x45b8, 0xa8, 0x11, 0x5a, 0x7a, 0x9b, 0xc2, 0x32, 0xdf \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_HII_DATABASE_PROTOCOL);
+
+typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE;
+
+#define EFI_HII_DATABASE_NOTIFY_NEW_PACK 0x00000001
+#define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK 0x00000002
+#define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK 0x00000004
+#define EFI_HII_DATABASE_NOTIFY_ADD_PACK 0x00000008
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_NOTIFY) (
+ IN UINT8 PackageType,
+ IN CONST EFI_GUID *PackageGuid,
+ IN CONST EFI_HII_PACKAGE_HEADER *Package,
+ IN EFI_HII_HANDLE Handle,
+ IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
+ )
+/*++
+
+ Routine Description:
+ Functions which are registered to receive notification of database events have this prototype. The
+ actual event is encoded in NotifyType. The following table describes how PackageType,
+ PackageGuid, Handle, and Package are used for each of the notification types.
+
+ Arguments:
+ PackageType - Package type of the notification.
+ PackageGuid - If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this is the pointer to
+ the GUID which must match the Guid field of
+ EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must be NULL.
+ Package - Points to the package referred to by the notification.
+ Handle - The handle of the package list which contains the specified package.
+ NotifyType - The type of change concerning the database.
+
+ Returns:
+ EFI status code.
+
+--*/
+;
+
+//
+// EFI_HII_DATABASE_PROTOCOL protocol prototypes
+//
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_NEW_PACK) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList,
+ IN CONST EFI_HANDLE DriverHandle,
+ OUT EFI_HII_HANDLE *Handle
+ )
+/*++
+
+ Routine Description:
+ This function adds the packages in the package list to the database and returns a handle. If there is a
+ EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
+ create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ PackageList - A pointer to an EFI_HII_PACKAGE_LIST_HEADER structure.
+ DriverHandle - Associate the package list with this EFI handle.
+ Handle - A pointer to the EFI_HII_HANDLE instance.
+
+ Returns:
+ EFI_SUCCESS - The package list associated with the Handle
+ was added to the HII database.
+ EFI_OUT_OF_RESOURCES - Unable to allocate necessary resources for the
+ new database contents.
+ EFI_INVALID_PARAMETER - PackageList is NULL or Handle is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_REMOVE_PACK) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_HII_HANDLE Handle
+ )
+/*++
+
+ Routine Description:
+ This function removes the package list that is associated with a handle Handle
+ from the HII database. Before removing the package, any registered functions
+ with the notification type REMOVE_PACK and the same package type will be called.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ Handle - The handle that was registered to the data that is requested
+ for removal.
+
+ Returns:
+ EFI_SUCCESS - The data associated with the Handle was removed from
+ the HII database.
+ EFI_NOT_FOUND - The specified PackageList could not be found in database.
+ EFI_INVALID_PARAMETER - The Handle was not valid.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_UPDATE_PACK) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_HII_HANDLE Handle,
+ IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList
+ )
+/*++
+
+ Routine Description:
+ This function updates the existing package list (which has the specified Handle)
+ in the HII databases, using the new package list specified by PackageList.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ Handle - The handle that was registered to the data that is
+ requested to be updated.
+ PackageList - A pointer to an EFI_HII_PACKAGE_LIST_HEADER package.
+
+ Returns:
+ EFI_SUCCESS - The HII database was successfully updated.
+ EFI_OUT_OF_RESOURCES - Unable to allocate enough memory for the updated database.
+ EFI_INVALID_PARAMETER - Handle or PackageList was NULL.
+ EFI_NOT_FOUND - The Handle was not valid or could not be found in database.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_LIST_PACKS) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN UINT8 PackageType,
+ IN CONST EFI_GUID *PackageGuid,
+ IN OUT UINTN *HandleBufferLength,
+ OUT EFI_HII_HANDLE *Handle
+ )
+/*++
+
+ Routine Description:
+ This function returns a list of the package handles of the specified type
+ that are currently active in the database. The pseudo-type
+ EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ PackageType - Specifies the package type of the packages to list or
+ EFI_HII_PACKAGE_TYPE_ALL for all packages to be listed.
+ PackageGuid - If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this
+ is the pointer to the GUID which must match the Guid
+ field of EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise,
+ it must be NULL.
+ HandleBufferLength - On input, a pointer to the length of the handle buffer.
+ On output, the length of the handle buffer that is
+ required for the handles found.
+ Handle - An array of EFI_HII_HANDLE instances returned.
+
+ Returns:
+ EFI_SUCCESS - The matching handles are outputed successfully.
+ EFI_BUFFER_TO_SMALL - The HandleBufferLength parameter indicates that
+ Handle is too small to support the number of handles.
+ HandleBufferLength is updated with a value that will
+ enable the data to fit.
+ EFI_NOT_FOUND - No matching handle could not be found in database.
+ EFI_INVALID_PARAMETER - Handle or HandleBufferLength was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_EXPORT_PACKS) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_HII_HANDLE Handle,
+ IN OUT UINTN *BufferSize,
+ OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer
+ )
+/*++
+
+ Routine Description:
+ This function will export one or all package lists in the database to a buffer.
+ For each package list exported, this function will call functions registered
+ with EXPORT_PACK and then copy the package list to the buffer.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ Handle - An EFI_HII_HANDLE that corresponds to the desired package
+ list in the HII database to export or NULL to indicate
+ all package lists should be exported.
+ BufferSize - On input, a pointer to the length of the buffer.
+ On output, the length of the buffer that is required for
+ the exported data.
+ Buffer - A pointer to a buffer that will contain the results of
+ the export function.
+
+ Returns:
+ EFI_SUCCESS - Package exported.
+ EFI_BUFFER_TO_SMALL - The HandleBufferLength parameter indicates that Handle
+ is too small to support the number of handles.
+ HandleBufferLength is updated with a value that will
+ enable the data to fit.
+ EFI_NOT_FOUND - The specifiecd Handle could not be found in the current
+ database.
+ EFI_INVALID_PARAMETER - Handle or Buffer or BufferSize was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_REGISTER_NOTIFY) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN UINT8 PackageType,
+ IN CONST EFI_GUID *PackageGuid,
+ IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn,
+ IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
+ OUT EFI_HANDLE *NotifyHandle
+ )
+/*++
+
+ Routine Description:
+ This function registers a function which will be called when specified actions related to packages of
+ the specified type occur in the HII database. By registering a function, other HII-related drivers are
+ notified when specific package types are added, removed or updated in the HII database.
+ Each driver or application which registers a notification should use
+ EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ PackageType - Specifies the package type of the packages to list or
+ EFI_HII_PACKAGE_TYPE_ALL for all packages to be listed.
+ PackageGuid - If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this is the pointer to
+ the GUID which must match the Guid field of
+ EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must be NULL.
+ PackageNotifyFn - Points to the function to be called when the event specified by
+ NotificationType occurs.
+ NotifyType - Describes the types of notification which this function will be receiving.
+ NotifyHandle - Points to the unique handle assigned to the registered notification. Can be used in
+ EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() to stop notifications.
+
+ Returns:
+ EFI_SUCCESS - Notification registered successfully.
+ EFI_OUT_OF_RESOURCES - Unable to allocate necessary data structures
+ EFI_INVALID_PARAMETER - NotifyHandle is NULL.
+ EFI_INVALID_PARAMETER - PackageGuid is not NULL when PackageType is not
+ EFI_HII_PACKAGE_TYPE_GUID.
+ EFI_INVALID_PARAMETER - PackageGuid is NULL when PackageType is EFI_HII_PACKAGE_TYPE_GUID.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_UNREGISTER_NOTIFY) (
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_HANDLE NotificationHandle
+ )
+/*++
+
+ Routine Description:
+ Removes the specified HII database package-related notification.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ NotifyHandle - The handle of the notification function being unregistered.
+
+ Returns:
+ EFI_SUCCESS - Notification is unregistered successfully.
+ EFI_INVALID_PARAMETER - The Handle is invalid.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_FIND_KEYBOARD_LAYOUTS) (
+ IN EFI_HII_DATABASE_PROTOCOL *This,
+ IN OUT UINT16 *KeyGuidBufferLength,
+ OUT EFI_GUID *KeyGuidBuffer
+ )
+/*++
+
+ Routine Description:
+ This routine retrieves an array of GUID values for each keyboard layout that
+ was previously registered in the system.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ KeyGuidBufferLength - On input, a pointer to the length of the keyboard GUID
+ buffer. On output, the length of the handle buffer
+ that is required for the handles found.
+ KeyGuidBuffer - An array of keyboard layout GUID instances returned.
+
+ Returns:
+ EFI_SUCCESS - KeyGuidBuffer was updated successfully.
+ EFI_BUFFER_TOO_SMALL - The KeyGuidBufferLength parameter indicates
+ that KeyGuidBuffer is too small to support the
+ number of GUIDs. KeyGuidBufferLength is
+ updated with a value that will enable the data to fit.
+ EFI_INVALID_PARAMETER - The KeyGuidBuffer or KeyGuidBufferLength was NULL.
+ EFI_NOT_FOUND - There was no keyboard layout.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_KEYBOARD_LAYOUT) (
+ IN EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_GUID *KeyGuid,
+ IN OUT UINT16 *KeyboardLayoutLength,
+ OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout
+ )
+/*++
+
+ Routine Description:
+ This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
+ on a keyboard and the character(s) that are associated with a particular set of key strokes.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ KeyGuid - A pointer to the unique ID associated with a given keyboard layout. If KeyGuid is
+ NULL then the current layout will be retrieved.
+ KeyboardLayoutLength - On input, a pointer to the length of the KeyboardLayout buffer.
+ On output, the length of the data placed into KeyboardLayout.
+ KeyboardLayout - A pointer to a buffer containing the retrieved keyboard layout.
+
+ Returns:
+ EFI_SUCCESS - The keyboard layout was retrieved successfully.
+ EFI_NOT_FOUND - The requested keyboard layout was not found.
+ EFI_INVALID_PARAMETER - The KeyboardLayout or KeyboardLayoutLength was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_SET_KEYBOARD_LAYOUT) (
+ IN EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_GUID *KeyGuid
+ )
+/*++
+
+ Routine Description:
+ This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
+ is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
+ group type. This is so that agents which are sensitive to the current keyboard layout being changed
+ can be notified of this change.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ KeyGuid - A pointer to the unique ID associated with a given keyboard layout.
+
+ Returns:
+ EFI_SUCCESS - The current keyboard layout was successfully set.
+ EFI_NOT_FOUND - The referenced keyboard layout was not found, so action was taken.
+ EFI_INVALID_PARAMETER - The KeyGuid was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DATABASE_GET_PACK_HANDLE) (
+ IN EFI_HII_DATABASE_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageListHandle,
+ OUT EFI_HANDLE *DriverHandle
+ )
+/*++
+
+ Routine Description:
+ Return the EFI handle associated with a package list.
+
+ Arguments:
+ This - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
+ PackageListHandle - An EFI_HII_HANDLE that corresponds to the desired package list in the
+ HIIdatabase.
+ DriverHandle - On return, contains the EFI_HANDLE which was registered with the package list in
+ NewPackageList().
+
+ Returns:
+ EFI_SUCCESS - The DriverHandle was returned successfully.
+ EFI_INVALID_PARAMETER - The PackageListHandle was not valid or DriverHandle was NULL.
+
+--*/
+;
+
+typedef struct _EFI_HII_DATABASE_PROTOCOL {
+ EFI_HII_DATABASE_NEW_PACK NewPackageList;
+ EFI_HII_DATABASE_REMOVE_PACK RemovePackageList;
+ EFI_HII_DATABASE_UPDATE_PACK UpdatePackageList;
+ EFI_HII_DATABASE_LIST_PACKS ListPackageLists;
+ EFI_HII_DATABASE_EXPORT_PACKS ExportPackageLists;
+ EFI_HII_DATABASE_REGISTER_NOTIFY RegisterPackageNotify;
+ EFI_HII_DATABASE_UNREGISTER_NOTIFY UnregisterPackageNotify;
+ EFI_HII_FIND_KEYBOARD_LAYOUTS FindKeyboardLayouts;
+ EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout;
+ EFI_HII_SET_KEYBOARD_LAYOUT SetKeyboardLayout;
+ EFI_HII_DATABASE_GET_PACK_HANDLE GetPackageListHandle;
+} EFI_HII_DATABASE_PROTOCOL;
+
+extern EFI_GUID gEfiHiiDatabaseProtocolGuid;
+
+#endif
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiFont/HiiFont.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiFont/HiiFont.c
new file mode 100644
index 0000000..9e3213f
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiFont/HiiFont.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiFont.c
+
+Abstract:
+
+ EFI_HII_FONT_PROTOCOL
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiFont)
+
+EFI_GUID gEfiHiiFontProtocolGuid = EFI_HII_FONT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiFontProtocolGuid, "EFI HII FONT Protocol", "UEFI 2.1 HII FONT Protocol");
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiFont/HiiFont.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiFont/HiiFont.h
new file mode 100644
index 0000000..741f4d7
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiFont/HiiFont.h
@@ -0,0 +1,283 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiFont.h
+
+Abstract:
+
+ EFI_HII_FONT_PROTOCOL from UEFI 2.1 specification.
+
+ This protocol provides interfaces to retrieve font information.
+
+Revision History
+
+--*/
+
+#ifndef __EFI_HII_FONT_PROTOCOL_H__
+#define __EFI_HII_FONT_PROTOCOL_H__
+
+#include EFI_PROTOCOL_DEFINITION (GraphicsOutput)
+#include EFI_PROTOCOL_DEFINITION (HiiImage)
+
+//
+// Global ID for the Hii Font Protocol.
+//
+
+#define EFI_HII_FONT_PROTOCOL_GUID \
+ { \
+ 0xe9ca4775, 0x8657, 0x47fc, 0x97, 0xe7, 0x7e, 0xd6, 0x5a, 0x8, 0x43, 0x24 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_HII_FONT_PROTOCOL);
+
+typedef UINT32 EFI_HII_OUT_FLAGS;
+typedef UINT32 EFI_FONT_INFO_MASK;
+typedef VOID* EFI_FONT_HANDLE;
+
+typedef struct _EFI_HII_ROW_INFO {
+ UINTN StartIndex;
+ UINTN EndIndex;
+ UINTN LineHeight;
+ UINTN LineWidth;
+ UINTN BaselineOffset;
+} EFI_HII_ROW_INFO;
+
+typedef struct {
+ UINT32 FontStyle;
+ UINT16 FontSize; // character cell size in pixels
+ CHAR16 FontName[1];
+} EFI_FONT_INFO;
+
+typedef struct _EFI_FONT_DISPLAY_INFO {
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL ForegroundColor;
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL BackgroundColor;
+ EFI_FONT_INFO_MASK FontInfoMask;
+ EFI_FONT_INFO FontInfo;
+} EFI_FONT_DISPLAY_INFO;
+
+#define EFI_HII_OUT_FLAG_CLIP 0x00000001
+#define EFI_HII_OUT_FLAG_WRAP 0x00000002
+#define EFI_HII_OUT_FLAG_CLEAN_Y 0x00000004
+#define EFI_HII_OUT_FLAG_CLEAN_X 0x00000008
+#define EFI_HII_OUT_FLAG_TRANSPARENT 0x00000010
+#define EFI_HII_IGNORE_IF_NO_GLYPH 0x00000020
+#define EFI_HII_IGNORE_LINE_BREAK 0x00000040
+#define EFI_HII_DIRECT_TO_SCREEN 0x00000080
+
+#define EFI_FONT_INFO_SYS_FONT 0x00000001
+#define EFI_FONT_INFO_SYS_SIZE 0x00000002
+#define EFI_FONT_INFO_SYS_STYLE 0x00000004
+#define EFI_FONT_INFO_SYS_FORE_COLOR 0x00000010
+#define EFI_FONT_INFO_SYS_BACK_COLOR 0x00000020
+#define EFI_FONT_INFO_RESIZE 0x00001000
+#define EFI_FONT_INFO_RESTYLE 0x00002000
+#define EFI_FONT_INFO_ANY_FONT 0x00010000
+#define EFI_FONT_INFO_ANY_SIZE 0x00020000
+#define EFI_FONT_INFO_ANY_STYLE 0x00040000
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_STRING_TO_IMAGE) (
+ IN CONST EFI_HII_FONT_PROTOCOL *This,
+ IN EFI_HII_OUT_FLAGS Flags,
+ IN CONST EFI_STRING String,
+ IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
+ IN OUT EFI_IMAGE_OUTPUT **Blt,
+ IN UINTN BltX,
+ IN UINTN BltY,
+ OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
+ OUT UINTN *RowInfoArraySize OPTIONAL,
+ OUT UINTN *ColumnInfoArray OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Renders a string to a bitmap or to the display.
+
+ Arguments:
+ This - A pointer to the EFI_HII_FONT_PROTOCOL instance.
+ Flags - Describes how the string is to be drawn.
+ String - Points to the null-terminated string to be displayed.
+ StringInfo - Points to the string output information, including the color and font.
+ If NULL, then the string will be output in the default system font and color.
+ Blt - If this points to a non-NULL on entry, this points to the image, which is Width pixels
+ wide and Height pixels high. The string will be drawn onto this image and
+ EFI_HII_OUT_FLAG_CLIP is implied. If this points to a NULL on entry, then a
+ buffer will be allocated to hold the generated image and the pointer updated on exit. It
+ is the caller¡¯s responsibility to free this buffer.
+ BltX,BLTY - Specifies the offset from the left and top edge of the image of the first character cell in
+ the image.
+ RowInfoArray - If this is non-NULL on entry, then on exit, this will point to an allocated buffer
+ containing row information and RowInfoArraySize will be updated to contain the
+ number of elements. This array describes the characters which were at least partially
+ drawn and the heights of the rows. It is the caller¡¯s responsibility to free this buffer.
+ RowInfoArraySize - If this is non-NULL on entry, then on exit it contains the number of elements in
+ RowInfoArray.
+ ColumnInfoArray - If this is non-NULL, then on return it will be filled with the horizontal offset for each
+ character in the string on the row where it is displayed. Non-printing characters will
+ have the offset ~0. The caller is responsible to allocate a buffer large enough so that
+ there is one entry for each character in the string, not including the null-terminator. It
+ is possible when character display is normalized that some character cells overlap.
+
+ Returns:
+ EFI_SUCCESS - The string was successfully rendered.
+ EFI_OUT_OF_RESOURCES - Unable to allocate an output buffer for RowInfoArray or Blt.
+ EFI_INVALID_PARAMETER - The String was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_STRING_ID_TO_IMAGE) (
+ IN CONST EFI_HII_FONT_PROTOCOL *This,
+ IN EFI_HII_OUT_FLAGS Flags,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_STRING_ID StringId,
+ IN CONST CHAR8* Language,
+ IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
+ IN OUT EFI_IMAGE_OUTPUT **Blt,
+ IN UINTN BltX,
+ IN UINTN BltY,
+ OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
+ OUT UINTN *RowInfoArraySize OPTIONAL,
+ OUT UINTN *ColumnInfoArray OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Render a string to a bitmap or the screen containing the contents of the specified string.
+
+ Arguments:
+ This - A pointer to the EFI_HII_FONT_PROTOCOL instance.
+ Flags - Describes how the string is to be drawn.
+ PackageList - The package list in the HII database to search for the specified string.
+ StringId - The string¡¯s id, which is unique within PackageList.
+ Language - Points to the language for the retrieved string. If NULL, then the current system
+ language is used.
+ StringInfo - Points to the string output information, including the color and font.
+ If NULL, then the string will be output in the default system font and color.
+ Blt - If this points to a non-NULL on entry, this points to the image, which is Width pixels
+ wide and Height pixels high. The string will be drawn onto this image and
+ EFI_HII_OUT_FLAG_CLIP is implied. If this points to a NULL on entry, then a
+ buffer will be allocated to hold the generated image and the pointer updated on exit. It
+ is the caller¡¯s responsibility to free this buffer.
+ BltX,BLTY - Specifies the offset from the left and top edge of the image of the first character cell in
+ the image.
+ RowInfoArray - If this is non-NULL on entry, then on exit, this will point to an allocated buffer
+ containing row information and RowInfoArraySize will be updated to contain the
+ number of elements. This array describes the characters which were at least partially
+ drawn and the heights of the rows. It is the caller¡¯s responsibility to free this buffer.
+ RowInfoArraySize - If this is non-NULL on entry, then on exit it contains the number of elements in
+ RowInfoArray.
+ ColumnInfoArray - If this is non-NULL, then on return it will be filled with the horizontal offset for each
+ character in the string on the row where it is displayed. Non-printing characters will
+ have the offset ~0. The caller is responsible to allocate a buffer large enough so that
+ there is one entry for each character in the string, not including the null-terminator. It
+ is possible when character display is normalized that some character cells overlap.
+
+ Returns:
+ EFI_SUCCESS - The string was successfully rendered.
+ EFI_OUT_OF_RESOURCES - Unable to allocate an output buffer for RowInfoArray or Blt.
+ EFI_INVALID_PARAMETER - The String was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_GLYPH) (
+ IN CONST EFI_HII_FONT_PROTOCOL *This,
+ IN CHAR16 Char,
+ IN CONST EFI_FONT_DISPLAY_INFO *StringInfo,
+ OUT EFI_IMAGE_OUTPUT **Blt,
+ OUT UINTN *Baseline OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ Convert the glyph for a single character into a bitmap.
+
+ Arguments:
+ This - A pointer to the EFI_HII_FONT_PROTOCOL instance.
+ Char - Character to retrieve.
+ StringInfo - Points to the string font and color information or NULL if the string should use the
+ default system font and color.
+ Blt - Thus must point to a NULL on entry. A buffer will be allocated to hold the output and
+ the pointer updated on exit. It is the caller¡¯s responsibility to free this buffer.
+ Baseline - Number of pixels from the bottom of the bitmap to the baseline.
+
+ Returns:
+ EFI_SUCCESS - Glyph bitmap created.
+ EFI_OUT_OF_RESOURCES - Unable to allocate the output buffer Blt.
+ EFI_WARN_UNKNOWN_GLYPH - The glyph was unknown and was
+ replaced with the glyph for Unicode
+ character 0xFFFD.
+ EFI_INVALID_PARAMETER - Blt is NULL or *Blt is not NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_FONT_INFO) (
+ IN CONST EFI_HII_FONT_PROTOCOL *This,
+ IN OUT EFI_FONT_HANDLE *FontHandle,
+ IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn,
+ OUT EFI_FONT_DISPLAY_INFO **StringInfoOut,
+ IN CONST EFI_STRING String OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ This function iterates through fonts which match the specified font, using
+ the specified criteria. If String is non-NULL, then all of the characters in
+ the string must exist in order for a candidate font to be returned.
+
+ Arguments:
+ This - A pointer to the EFI_HII_FONT_PROTOCOL instance.
+ FontHandle - On entry, points to the font handle returned by a
+ previous call to GetFontInfo() or NULL to start with the
+ first font. On return, points to the returned font handle or
+ points to NULL if there are no more matching fonts.
+ StringInfoIn - Upon entry, points to the font to return information about.
+ StringInfoOut - Upon return, contains the matching font¡¯s information.
+ If NULL, then no information is returned.
+ It's caller's responsibility to free this buffer.
+ String - Points to the string which will be tested to determine
+ if all characters are available. If NULL, then any font
+ is acceptable.
+
+ Returns:
+ EFI_SUCCESS - Matching font returned successfully.
+ EFI_NOT_FOUND - No matching font was found.
+ EFI_INVALID_PARAMETER - StringInfoIn is NULL.
+ EFI_OUT_OF_RESOURCES - There were insufficient resources to complete the request.
+
+--*/
+;
+
+
+//
+// Interface structure for the EFI_HII_FONT_PROTOCOL
+//
+typedef struct _EFI_HII_FONT_PROTOCOL {
+ EFI_HII_STRING_TO_IMAGE StringToImage;
+ EFI_HII_STRING_ID_TO_IMAGE StringIdToImage;
+ EFI_HII_GET_GLYPH GetGlyph;
+ EFI_HII_GET_FONT_INFO GetFontInfo;
+} EFI_HII_FONT_PROTOCOL;
+
+extern EFI_GUID gEfiHiiFontProtocolGuid;
+
+#endif
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiImage/HiiImage.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiImage/HiiImage.c
new file mode 100644
index 0000000..e1e643d
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiImage/HiiImage.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiImage.c
+
+Abstract:
+
+ EFI_HII_IMAGE_PROTOCOL
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiImage)
+
+EFI_GUID gEfiHiiImageProtocolGuid = EFI_HII_IMAGE_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiImageProtocolGuid, "EFI HII IMAGE Protocol", "UEFI 2.1 HII IMAGE Protocol");
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiImage/HiiImage.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiImage/HiiImage.h
new file mode 100644
index 0000000..dcd4889
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiImage/HiiImage.h
@@ -0,0 +1,254 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiImage.h
+
+Abstract:
+
+ EFI_HII_IMAGE_PROTOCOL from UEFI 2.1 specification.
+
+ This protocol provides access to images in the images database.
+
+Revision History
+
+--*/
+
+#ifndef __EFI_HII_IMAGE_PROTOCOL_H__
+#define __EFI_HII_IMAGE_PROTOCOL_H__
+
+#include "EfiHii.h"
+#include EFI_PROTOCOL_DEFINITION (GraphicsOutput)
+
+//
+// Global ID for the Hii Image Protocol.
+//
+#define EFI_HII_IMAGE_PROTOCOL_GUID \
+ { \
+ 0x31a6406a, 0x6bdf, 0x4e46, 0xb2, 0xa2, 0xeb, 0xaa, 0x89, 0xc4, 0x9, 0x20 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_HII_IMAGE_PROTOCOL);
+
+typedef UINT32 EFI_HII_DRAW_FLAGS;
+
+typedef struct _EFI_IMAGE_INPUT {
+ UINT32 Flags;
+ UINT16 Width;
+ UINT16 Height;
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL Bitmap[1];
+} EFI_IMAGE_INPUT;
+
+#define EFI_IMAGE_TRANSPARENT 0x00000001
+
+typedef struct _EFI_IMAGE_OUTPUT {
+ UINT16 Width;
+ UINT16 Height;
+ union {
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL *Screen;
+ } Image;
+} EFI_IMAGE_OUTPUT;
+
+#define EFI_HII_DRAW_FLAG_CLIP 0x00000001
+#define EFI_HII_DRAW_FLAG_TRANSPARENT 0x00000030
+#define EFI_HII_DRAW_FLAG_DEFAULT 0x00000000
+#define EFI_HII_DRAW_FLAG_FORCE_TRANS 0x00000010
+#define EFI_HII_DRAW_FLAG_FORCE_OPAQUE 0x00000020
+#define EFI_HII_DIRECT_TO_SCREEN 0x00000080
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_NEW_IMAGE) (
+ IN CONST EFI_HII_IMAGE_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ OUT EFI_IMAGE_ID *ImageId,
+ IN CONST EFI_IMAGE_INPUT *Image
+ )
+/*++
+
+ Routine Description:
+ This function adds the image Image to the group of images owned by PackageList, and returns
+ a new image identifier (ImageId).
+
+ Arguments:
+ This - A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
+ PackageList - Handle of the package list where this image will be added.
+ ImageId - On return, contains the new image id, which is unique within PackageList.
+ Image - Points to the image.
+
+ Returns:
+ EFI_SUCCESS - The new image was added successfully.
+ EFI_NOT_FOUND - The specified PackageList could not be found in database.
+ EFI_OUT_OF_RESOURCES - Could not add the image due to lack of resources.
+ EFI_INVALID_PARAMETER - Image is NULL or ImageId is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_IMAGE) (
+ IN CONST EFI_HII_IMAGE_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_IMAGE_ID ImageId,
+ OUT EFI_IMAGE_INPUT *Image,
+ OUT UINTN *ImageSize
+ )
+/*++
+
+ Routine Description:
+ This function retrieves the image specified by ImageId which is associated with
+ the specified PackageList and copies it into the buffer specified by Image.
+
+ Arguments:
+ This - A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
+ PackageList - Handle of the package list where this image will be searched.
+ ImageId - The image¡¯s id,, which is unique within PackageList.
+ Image - Points to the image.
+ ImageSize - On entry, points to the size of the buffer pointed to by Image, in bytes. On return,
+ points to the length of the image, in bytes.
+
+ Returns:
+ EFI_SUCCESS - The new image was returned successfully.
+ EFI_NOT_FOUND - The image specified by ImageId is not available.
+ EFI_BUFFER_TOO_SMALL - The buffer specified by ImageSize is too small to hold the image.
+ EFI_INVALID_PARAMETER - The Image or ImageSize was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_SET_IMAGE) (
+ IN CONST EFI_HII_IMAGE_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_IMAGE_ID ImageId,
+ IN CONST EFI_IMAGE_INPUT *Image
+ )
+/*++
+
+ Routine Description:
+ This function updates the image specified by ImageId in the specified PackageListHandle to
+ the image specified by Image.
+
+ Arguments:
+ This - A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
+ PackageList - The package list containing the images.
+ ImageId - The image¡¯s id,, which is unique within PackageList.
+ Image - Points to the image.
+
+ Returns:
+ EFI_SUCCESS - The new image was updated successfully.
+ EFI_NOT_FOUND - The image specified by ImageId is not in the database.
+ EFI_INVALID_PARAMETER - The Image was NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DRAW_IMAGE) (
+ IN CONST EFI_HII_IMAGE_PROTOCOL *This,
+ IN EFI_HII_DRAW_FLAGS Flags,
+ IN CONST EFI_IMAGE_INPUT *Image,
+ IN OUT EFI_IMAGE_OUTPUT **Blt,
+ IN UINTN BltX,
+ IN UINTN BltY
+ )
+/*++
+
+ Routine Description:
+ This function renders an image to a bitmap or the screen using the specified
+ color and options. It draws the image on an existing bitmap, allocates a new
+ bitmap or uses the screen. The images can be clipped.
+
+ Arguments:
+ This - A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
+ Flags - Describes how the image is to be drawn.
+ Image - Points to the image to be displayed.
+ Blt - If this points to a non-NULL on entry, this points to the
+ image, which is Width pixels wide and Height pixels high.
+ The image will be drawn onto this image and
+ EFI_HII_DRAW_FLAG_CLIP is implied. If this points to a
+ NULL on entry, then a buffer will be allocated to hold
+ the generated image and the pointer updated on exit. It
+ is the caller¡¯s responsibility to free this buffer.
+ BltX, BltY - Specifies the offset from the left and top edge of the
+ output image of the first pixel in the image.
+
+ Returns:
+ EFI_SUCCESS - The image was successfully drawn.
+ EFI_OUT_OF_RESOURCES - Unable to allocate an output buffer for Blt.
+ EFI_INVALID_PARAMETER - The Image or Blt was NULL.
+ EFI_INVALID_PARAMETER - Any combination of Flags is invalid.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_DRAW_IMAGE_ID) (
+ IN CONST EFI_HII_IMAGE_PROTOCOL *This,
+ IN EFI_HII_DRAW_FLAGS Flags,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_IMAGE_ID ImageId,
+ IN OUT EFI_IMAGE_OUTPUT **Blt,
+ IN UINTN BltX,
+ IN UINTN BltY
+ )
+
+/*++
+
+ Routine Description:
+ This function renders an image to a bitmap or the screen using the specified
+ color and options. It draws the image on an existing bitmap, allocates a new
+ bitmap or uses the screen. The images can be clipped.
+
+ Arguments:
+ This - A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
+ Flags - Describes how the image is to be drawn.
+ PackageList - The package list in the HII database to search for the
+ specified image.
+ ImageId - The image's id, which is unique within PackageList.
+ Blt - If this points to a non-NULL on entry, this points to the
+ image, which is Width pixels wide and Height pixels high.
+ The image will be drawn onto this image and
+ EFI_HII_DRAW_FLAG_CLIP is implied. If this points to a
+ NULL on entry, then a buffer will be allocated to hold
+ the generated image and the pointer updated on exit. It
+ is the caller¡¯s responsibility to free this buffer.
+ BltX, BltY - Specifies the offset from the left and top edge of the
+ output image of the first pixel in the image.
+
+ Returns:
+ EFI_SUCCESS - The image was successfully drawn.
+ EFI_OUT_OF_RESOURCES - Unable to allocate an output buffer for Blt.
+ EFI_INVALID_PARAMETER - The Image was NULL.
+
+--*/
+;
+
+//
+// Interface structure for the EFI_HII_IMAGE_PROTOCOL
+//
+typedef struct _EFI_HII_IMAGE_PROTOCOL {
+ EFI_HII_NEW_IMAGE NewImage;
+ EFI_HII_GET_IMAGE GetImage;
+ EFI_HII_SET_IMAGE SetImage;
+ EFI_HII_DRAW_IMAGE DrawImage;
+ EFI_HII_DRAW_IMAGE_ID DrawImageId;
+} EFI_HII_IMAGE_PROTOCOL;
+
+extern EFI_GUID gEfiHiiImageProtocolGuid;
+
+#endif
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiString/HiiString.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiString/HiiString.c
new file mode 100644
index 0000000..6c18995
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiString/HiiString.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiString.c
+
+Abstract:
+
+ EFI_HII_STRING_PROTOCOL
+
+Revision History
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (HiiString)
+
+EFI_GUID gEfiHiiStringProtocolGuid = EFI_HII_STRING_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiHiiStringProtocolGuid, "EFI HII STRING Protocol", "UEFI 2.1 HII STRING Protocol");
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiString/HiiString.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiString/HiiString.h
new file mode 100644
index 0000000..d1fc9fd
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiString/HiiString.h
@@ -0,0 +1,240 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ HiiString.h
+
+Abstract:
+
+ EFI_HII_STRING_PROTOCOL from UEFI 2.1 specification.
+
+ This protocol provides interfaces to manipulate string data.
+
+Revision History
+
+--*/
+
+#ifndef __EFI_HII_STRING_PROTOCOL_H__
+#define __EFI_HII_STRING_PROTOCOL_H__
+
+#include EFI_PROTOCOL_DEFINITION (HiiFont)
+
+//
+// Global ID for the Hii String Protocol.
+//
+#define EFI_HII_STRING_PROTOCOL_GUID \
+ { \
+ 0xfd96974, 0x23aa, 0x4cdc, 0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_HII_STRING_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_NEW_STRING) (
+ IN CONST EFI_HII_STRING_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ OUT EFI_STRING_ID *StringId,
+ IN CONST CHAR8 *Language,
+ IN CONST CHAR16 *LanguageName, OPTIONAL
+ IN CONST EFI_STRING String,
+ IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ This function adds the string String to the group of strings owned by PackageList, with the
+ specified font information StringFontInfo and returns a new string id.
+
+ Arguments:
+ This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
+ PackageList - Handle of the package list where this string will be added.
+ StringId - On return, contains the new strings id, which is unique within PackageList.
+ Language - Points to the language for the new string.
+ LanguageName - Points to the printable language name to associate with the passed in
+ Language field.If LanguageName is not NULL and the string package header's LanguageName
+ associated with a given Language is not zero, the LanguageName being passed
+ in will be ignored.
+ String - Points to the new null-terminated string.
+ StringFontInfo - Points to the new string¡¯s font information or NULL if the string should have the
+ default system font, size and style.
+
+ Returns:
+ EFI_SUCCESS - The new string was added successfully.
+ EFI_NOT_FOUND - The specified PackageList could not be found in database.
+ EFI_OUT_OF_RESOURCES - Could not add the string due to lack of resources.
+ EFI_INVALID_PARAMETER - String is NULL or StringId is NULL or Language is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_STRING) (
+ IN CONST EFI_HII_STRING_PROTOCOL *This,
+ IN CONST CHAR8 *Language,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_STRING_ID StringId,
+ OUT EFI_STRING String,
+ IN OUT UINTN *StringSize,
+ OUT EFI_FONT_INFO **StringFontInfo OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ This function retrieves the string specified by StringId which is associated
+ with the specified PackageList in the language Language and copies it into
+ the buffer specified by String.
+
+ Arguments:
+ This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
+ Language - Points to the language for the retrieved string.
+ PackageList - The package list in the HII database to search for the
+ specified string.
+ StringId - The string's id, which is unique within PackageList.
+ String - Points to the new null-terminated string.
+ StringSize - On entry, points to the size of the buffer pointed to by
+ String, in bytes. On return,
+ points to the length of the string, in bytes.
+ StringFontInfo - If not NULL, points to the string¡¯s font information.
+ It's caller's responsibility to free this buffer.
+
+ Returns:
+ EFI_SUCCESS - The string was returned successfully.
+ EFI_NOT_FOUND - The string specified by StringId is not available.
+ EFI_BUFFER_TOO_SMALL - The buffer specified by StringSize is too small to
+ hold the string.
+ EFI_INVALID_PARAMETER - The String or Language or StringSize was NULL.
+ EFI_OUT_OF_RESOURCES - There were insufficient resources to complete the
+ request.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_SET_STRING) (
+ IN CONST EFI_HII_STRING_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ IN EFI_STRING_ID StringId,
+ IN CONST CHAR8 *Language,
+ IN CONST EFI_STRING String,
+ IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
+ )
+/*++
+
+ Routine Description:
+ This function updates the string specified by StringId in the specified PackageList to the text
+ specified by String and, optionally, the font information specified by StringFontInfo.
+
+ Arguments:
+ This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
+ PackageList - The package list containing the strings.
+ StringId - The string¡¯s id, which is unique within PackageList.
+ Language - Points to the language for the updated string.
+ String - Points to the new null-terminated string.
+ StringFontInfo - Points to the string¡¯s font information or NULL if the string font information is not
+ changed.
+
+ Returns:
+ EFI_SUCCESS - The string was updated successfully.
+ EFI_NOT_FOUND - The string specified by StringId is not in the database.
+ EFI_INVALID_PARAMETER - The String or Language was NULL.
+ EFI_OUT_OF_RESOURCES - The system is out of resources to accomplish the task.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_LANGUAGES) (
+ IN CONST EFI_HII_STRING_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ IN OUT CHAR8 *Languages,
+ IN OUT UINTN *LanguagesSize
+ )
+/*++
+
+ Routine Description:
+ This function returns the list of supported languages, in the format specified
+ in Appendix M of UEFI 2.1 spec.
+
+ Arguments:
+ This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
+ PackageList - The package list to examine.
+ Languages - Points to the buffer to hold the returned string.
+ LanguagesSize - On entry, points to the size of the buffer pointed to by
+ Languages, in bytes. On
+ return, points to the length of Languages, in bytes.
+
+ Returns:
+ EFI_SUCCESS - The languages were returned successfully.
+ EFI_INVALID_PARAMETER - The Languages or LanguagesSize was NULL.
+ EFI_BUFFER_TOO_SMALL - The LanguagesSize is too small to hold the list of
+ supported languages. LanguageSize is updated to
+ contain the required size.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_HII_GET_2ND_LANGUAGES) (
+ IN CONST EFI_HII_STRING_PROTOCOL *This,
+ IN EFI_HII_HANDLE PackageList,
+ IN CONST CHAR8 *FirstLanguage,
+ IN OUT CHAR8 *SecondLanguages,
+ IN OUT UINTN *SecondLanguagesSize
+ )
+/*++
+
+ Routine Description:
+ Each string package has associated with it a single primary language and zero
+ or more secondary languages. This routine returns the secondary languages
+ associated with a package list.
+
+ Arguments:
+ This - A pointer to the EFI_HII_STRING_PROTOCOL instance.
+ PackageList - The package list to examine.
+ FirstLanguage - Points to the primary language.
+ SecondaryLanguages - Points to the buffer to hold the returned list of
+ secondary languages for the specified FirstLanguage.
+ If there are no secondary languages, the function
+ returns successfully, but this is set to NULL.
+ SecondaryLanguageSize - On entry, points to the size of the buffer pointed to
+ by SecondLanguages, in bytes. On return, points to
+ the length of SecondLanguages in bytes.
+
+ Returns:
+ EFI_SUCCESS - Secondary languages were correctly returned.
+ EFI_INVALID_PARAMETER - FirstLanguage or SecondLanguages or SecondLanguagesSize was NULL.
+ EFI_BUFFER_TOO_SMALL - The buffer specified by SecondLanguagesSize is
+ too small to hold the returned information.
+ SecondLanguageSize is updated to hold the size of
+ the buffer required.
+
+--*/
+;
+//
+// Interface structure for the EFI_HII_STRING_PROTOCOL
+//
+typedef struct _EFI_HII_STRING_PROTOCOL {
+ EFI_HII_NEW_STRING NewString;
+ EFI_HII_GET_STRING GetString;
+ EFI_HII_SET_STRING SetString;
+ EFI_HII_GET_LANGUAGES GetLanguages;
+ EFI_HII_GET_2ND_LANGUAGES GetSecondaryLanguages;
+} EFI_HII_STRING_PROTOCOL;
+
+extern EFI_GUID gEfiHiiStringProtocolGuid;
+
+#endif
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/Ip4Config/Ip4Config.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/Ip4Config/Ip4Config.h
index 2b75268..350a1cc 100644
--- a/EdkCompatibilityPkg/Foundation/Efi/Protocol/Ip4Config/Ip4Config.h
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/Ip4Config/Ip4Config.h
@@ -22,19 +22,18 @@ Abstract:
#include EFI_PROTOCOL_DEFINITION (Ip4)
-
#define EFI_IP4_CONFIG_PROTOCOL_GUID \
- {0x25c98279, 0x3d9c, 0x43f2, 0xa7, 0x0e, 0xe1, 0xea, 0x4e, 0x0d, 0xed, 0x1b}
+ { 0x3b95aa31, 0x3793, 0x434b, 0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e }
EFI_FORWARD_DECLARATION (EFI_IP4_CONFIG_PROTOCOL);
-#define IP4_CONFIG_VARIABLE_ATTRIBUTES (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS )
+#define IP4_CONFIG_VARIABLE_ATTRIBUTES (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)
typedef struct {
EFI_IPv4_ADDRESS StationAddress;
EFI_IPv4_ADDRESS SubnetMask;
UINT32 RouteTableSize;
- EFI_IP4_ROUTE_TABLE RouteTable[1];
+ EFI_IP4_ROUTE_TABLE *RouteTable;
} EFI_IP4_IPCONFIG_DATA;
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.h
index 274bb10..c0ae939 100644
--- a/EdkCompatibilityPkg/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.h
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.h
@@ -26,10 +26,10 @@ Abstract:
#include EFI_PROTOCOL_DEFINITION (ServiceBinding)
#define EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID \
- {0xf36ff770, 0xa7e1, 0x42cf, 0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c}
+ { 0xf36ff770, 0xa7e1, 0x42cf, 0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c }
#define EFI_MANAGED_NETWORK_PROTOCOL_GUID \
- { 0x3b95aa31, 0x3793, 0x434b, 0x86, 0x67, 0xc8, 0x7, 0x8, 0x92, 0xe0, 0x5e }
+ { 0x7ab33a91, 0xace5, 0x4326, 0xb5, 0x72, 0xe7, 0xee, 0x33, 0xd3, 0x9f, 0x16 }
EFI_FORWARD_DECLARATION (EFI_MANAGED_NETWORK_PROTOCOL);
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.c
new file mode 100644
index 0000000..bab98bf
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.c
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ SimpleTextInputEx.c
+
+Abstract:
+
+ EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL from the UEFI 2.1 specification.
+
+ This protocol defines an extension to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ which exposes much more state and modifier information from the input device,
+ also allows one to register a notification for a particular keystroke.
+
+--*/
+
+#include "EfiSpec.h"
+#include EFI_PROTOCOL_DEFINITION (SimpleTextInputEx)
+
+EFI_GUID gEfiSimpleTextInputExProtocolGuid = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSimpleTextInputExProtocolGuid, "Simple Text Input Ex Protocol", "UEFI 2.1 Simple Text Input Ex Protocol");
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.h
new file mode 100644
index 0000000..1c0fe72
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.h
@@ -0,0 +1,255 @@
+/*++
+
+Copyright (c) 2007, 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
+which 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.
+
+Module Name:
+
+ SimpleTextInputEx.h
+
+Abstract:
+
+ EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL from the UEFI 2.1 specification.
+
+ This protocol defines an extension to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ which exposes much more state and modifier information from the input device,
+ also allows one to register a notification for a particular keystroke.
+
+--*/
+
+#ifndef __SIMPLE_TEXT_INPUT_EX_H__
+#define __SIMPLE_TEXT_INPUT_EX_H__
+
+#include EFI_PROTOCOL_DEFINITION (SimpleTextIn)
+
+#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
+ { \
+ 0xdd9e7534, 0x7762, 0x4698, 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa\
+ }
+
+EFI_FORWARD_DECLARATION (EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL);
+
+//
+// Data structures
+//
+
+typedef UINT8 EFI_KEY_TOGGLE_STATE;
+//
+// Any Shift or Toggle State that is valid should have
+// high order bit set.
+//
+typedef struct EFI_KEY_STATE {
+ UINT32 KeyShiftState;
+ EFI_KEY_TOGGLE_STATE KeyToggleState;
+} EFI_KEY_STATE;
+
+typedef struct {
+ EFI_INPUT_KEY Key;
+ EFI_KEY_STATE KeyState;
+} EFI_KEY_DATA;
+
+//
+// Shift state
+//
+#define EFI_SHIFT_STATE_VALID 0x80000000
+#define EFI_RIGHT_SHIFT_PRESSED 0x00000001
+#define EFI_LEFT_SHIFT_PRESSED 0x00000002
+#define EFI_RIGHT_CONTROL_PRESSED 0x00000004
+#define EFI_LEFT_CONTROL_PRESSED 0x00000008
+#define EFI_RIGHT_ALT_PRESSED 0x00000010
+#define EFI_LEFT_ALT_PRESSED 0x00000020
+#define EFI_RIGHT_LOGO_PRESSED 0x00000040
+#define EFI_LEFT_LOGO_PRESSED 0x00000080
+#define EFI_MENU_KEY_PRESSED 0x00000100
+#define EFI_SYS_REQ_PRESSED 0x00000200
+
+//
+// Toggle state
+//
+#define EFI_TOGGLE_STATE_VALID 0x80
+#define EFI_SCROLL_LOCK_ACTIVE 0x01
+#define EFI_NUM_LOCK_ACTIVE 0x02
+#define EFI_CAPS_LOCK_ACTIVE 0x04
+
+//
+// EFI Scan codes
+//
+#define SCAN_F13 0x0068
+#define SCAN_F14 0x0069
+#define SCAN_F15 0x006A
+#define SCAN_F16 0x006B
+#define SCAN_F17 0x006C
+#define SCAN_F18 0x006D
+#define SCAN_F19 0x006E
+#define SCAN_F20 0x006F
+#define SCAN_F21 0x0070
+#define SCAN_F22 0x0071
+#define SCAN_F23 0x0072
+#define SCAN_F24 0x0073
+#define SCAN_MUTE 0x007F
+#define SCAN_VOLUME_UP 0x0080
+#define SCAN_VOLUME_DOWN 0x0081
+#define SCAN_BRIGHTNESS_UP 0x0100
+#define SCAN_BRIGHTNESS_DOWN 0x0101
+#define SCAN_SUSPEND 0x0102
+#define SCAN_HIBERNATE 0x0103
+#define SCAN_TOGGLE_DISPLAY 0x0104
+#define SCAN_RECOVERY 0x0105
+#define SCAN_EJECT 0x0106
+
+
+//
+// EFI Key Notfication Function
+//
+typedef
+EFI_STATUS
+(EFIAPI *EFI_KEY_NOTIFY_FUNCTION) (
+ IN EFI_KEY_DATA *KeyData
+ )
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_INPUT_RESET_EX) (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ IN BOOLEAN ExtendedVerification
+ )
+/*++
+
+ Routine Description:
+ Reset the input device and optionaly run diagnostics
+
+ Arguments:
+ This - Protocol instance pointer.
+ ExtendedVerification - Driver may perform diagnostics on reset.
+
+ Returns:
+ EFI_SUCCESS - The device was reset.
+ EFI_DEVICE_ERROR - The device is not functioning properly and could
+ not be reset.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_INPUT_READ_KEY_EX) (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ OUT EFI_KEY_DATA *KeyData
+ )
+/*++
+
+ Routine Description:
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
+
+ Arguments:
+ This - Protocol instance pointer.
+ KeyData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was pressed.
+
+ Returns:
+ EFI_SUCCESS - The keystroke information was returned.
+ EFI_NOT_READY - There was no keystroke data availiable.
+ EFI_DEVICE_ERROR - The keystroke information was not returned due to
+ hardware errors.
+ EFI_INVALID_PARAMETER - KeyData is NULL.
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_STATE) (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ IN EFI_KEY_TOGGLE_STATE *KeyToggleState
+ )
+/*++
+
+ Routine Description:
+ Set certain state for the input device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
+ state for the input device.
+
+ Returns:
+ EFI_SUCCESS - The device state was set successfully.
+ EFI_DEVICE_ERROR - The device is not functioning correctly and could
+ not have the setting adjusted.
+ EFI_UNSUPPORTED - The device does not have the ability to set its state.
+ EFI_INVALID_PARAMETER - KeyToggleState is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY) (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ IN EFI_KEY_DATA *KeyData,
+ IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
+ OUT EFI_HANDLE *NotifyHandle
+ )
+/*++
+
+ Routine Description:
+ Register a notification function for a particular keystroke for the input device.
+
+ Arguments:
+ This - Protocol instance pointer.
+ KeyData - A pointer to a buffer that is filled in with the keystroke
+ information data for the key that was pressed.
+ KeyNotificationFunction - Points to the function to be called when the key
+ sequence is typed specified by KeyData.
+ NotifyHandle - Points to the unique handle assigned to the registered notification.
+
+ Returns:
+ EFI_SUCCESS - The notification function was registered successfully.
+ EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
+ EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
+
+--*/
+;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY) (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ IN EFI_HANDLE NotificationHandle
+ )
+/*++
+
+ Routine Description:
+ Remove a registered notification function from a particular keystroke.
+
+ Arguments:
+ This - Protocol instance pointer.
+ NotificationHandle - The handle of the notification function being unregistered.
+
+ Returns:
+ EFI_SUCCESS - The notification function was unregistered successfully.
+ EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
+ EFI_NOT_FOUND - Can not find the matching entry in database.
+
+--*/
+;
+
+typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL {
+ EFI_INPUT_RESET_EX Reset;
+ EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx;
+ EFI_EVENT WaitForKeyEx;
+ EFI_SET_STATE SetState;
+ EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify;
+ EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify;
+} EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
+
+extern EFI_GUID gEfiSimpleTextInputExProtocolGuid;
+
+#endif
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.c b/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.c
index e9c3e6c..6484a76 100644
--- a/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.c
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.c
@@ -23,5 +23,7 @@ Abstract:
#include EFI_PROTOCOL_DEFINITION (UnicodeCollation)
EFI_GUID gEfiUnicodeCollationProtocolGuid = EFI_UNICODE_COLLATION_PROTOCOL_GUID;
+EFI_GUID gEfiUnicodeCollation2ProtocolGuid = EFI_UNICODE_COLLATION2_PROTOCOL_GUID;
EFI_GUID_STRING(&gEfiUnicodeCollationProtocolGuid, "Unicode Collation Protocol", "EFI 1.0 Unicode Collation Protocol");
+EFI_GUID_STRING(&gEfiUnicodeCollation2ProtocolGuid, "Unicode Collation Protocol", "UEFI 2.10 Unicode Collation Protocol");
diff --git a/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h b/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h
index 0c84796..f4930b1 100644
--- a/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h
+++ b/EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h
@@ -27,6 +27,11 @@ Abstract:
0x1d85cd7f, 0xf43d, 0x11d2, 0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
}
+#define EFI_UNICODE_COLLATION2_PROTOCOL_GUID \
+ { \
+ 0xa4c751fc, 0x23ae, 0x4c3e, 0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49 \
+ }
+
EFI_FORWARD_DECLARATION (EFI_UNICODE_COLLATION_PROTOCOL);
//
@@ -207,5 +212,6 @@ typedef struct _EFI_UNICODE_COLLATION_PROTOCOL {
} EFI_UNICODE_COLLATION_PROTOCOL;
extern EFI_GUID gEfiUnicodeCollationProtocolGuid;
+extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid;
#endif
diff --git a/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubRecords.h b/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubRecords.h
index baaf181..949446b 100644
--- a/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubRecords.h
+++ b/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubRecords.h
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2004, Intel Corporation
+Copyright (c) 2004 - 2007, 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
which accompanies this distribution. The full text of the license may be found at
@@ -29,8 +29,11 @@ Abstract:
#ifndef _DATAHUB_RECORDS_H_
#define _DATAHUB_RECORDS_H_
-
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
+#include "TianoHii.h"
+#else
#include "EfiInternalFormRepresentation.h"
+#endif
#include "DataHubSubClass.h"
#include "DataHubSubClassProcessor.h"
#include "DataHubSubClassCache.h"
diff --git a/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassCache.h b/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassCache.h
index 0e7ed32..33dc63b 100644
--- a/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassCache.h
+++ b/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassCache.h
@@ -73,7 +73,8 @@ typedef enum {
EfiCacheAssociativity4Way = 5,
EfiCacheAssociativityFully = 6,
EfiCacheAssociativity8Way = 7,
- EfiCacheAssociativity16Way = 8
+ EfiCacheAssociativity16Way = 8,
+ EfiCacheAssociativity24Way = 9
} EFI_CACHE_ASSOCIATIVITY_DATA;
typedef struct {
diff --git a/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMemory.h b/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMemory.h
index 2ab6743..38e35f1 100644
--- a/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMemory.h
+++ b/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMemory.h
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2004 - 2006, Intel Corporation
+Copyright (c) 2004 - 2007, 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
which accompanies this distribution. The full text of the license may be found at
@@ -188,6 +188,7 @@ typedef struct {
EFI_MEMORY_TYPE_DETAIL MemoryTypeDetail;
UINT16 MemorySpeed;
EFI_MEMORY_STATE MemoryState;
+ UINT8 MemoryAttributes;
} EFI_MEMORY_ARRAY_LINK;
diff --git a/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMisc.h b/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMisc.h
index 901a464..5c3e6da 100644
--- a/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMisc.h
+++ b/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMisc.h
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2004 - 2006, Intel Corporation
+Copyright (c) 2004 - 2007, 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
which accompanies this distribution. The full text of the license may be found at
@@ -43,6 +43,11 @@ typedef struct {
UINT8 LastPciBus;
} EFI_MISC_LAST_PCI_BUS;
+typedef struct {
+ UINT8 FunctionNum :3;
+ UINT8 DeviceNum :5;
+} EFI_MISC_DEV_FUNC_NUM;
+
//
//////////////////////////////////////////////////////////////////////////////
//
@@ -225,6 +230,10 @@ typedef enum {
EfiMiscChassisTypeRackMountChassis = 0x17,
EfiMiscChassisTypeSealedCasePc = 0x18,
EfiMiscChassisMultiSystemChassis = 0x19,
+ EfiMiscChassisCompactPCI = 0x1A,
+ EfiMiscChassisAdvancedTCA = 0x1B,
+ EfiMiscChassisBlade = 0x1C,
+ EfiMiscChassisBladeEnclosure = 0x1D
} EFI_MISC_CHASSIS_TYPE;
typedef struct {
@@ -323,6 +332,7 @@ typedef enum {
EfiPortConnectorTypeHeadPhoneMiniJack = 0x1F,
EfiPortConnectorTypeBNC = 0x20,
EfiPortConnectorType1394 = 0x21,
+ EfiPortConnectorTypeSasSata = 0x22,
EfiPortConnectorTypePC98 = 0xA0,
EfiPortConnectorTypePC98Hireso = 0xA1,
EfiPortConnectorTypePCH98 = 0xA2,
@@ -364,6 +374,8 @@ typedef enum {
EfiPortTypeAudioPort = 0x1D,
EfiPortTypeModemPort = 0x1E,
EfiPortTypeNetworkPort = 0x1F,
+ EfiPortTypeSata = 0x20,
+ EfiPortTypeSas = 0x21,
EfiPortType8251Compatible = 0xA0,
EfiPortType8251FifoCompatible = 0xA1,
EfiPortTypeOther = 0xFF,
@@ -412,6 +424,11 @@ typedef enum {
EfiSlotTypePC98LocalBus = 0xA3,
EfiSlotTypePC98Card = 0xA4,
EfiSlotTypePciExpress = 0xA5,
+ EfiSlotTypePciExpressX1 = 0xA6,
+ EfiSlotTypePciExpressX2 = 0xA7,
+ EfiSlotTypePciExpressX4 = 0xA8,
+ EfiSlotTypePciExpressX8 = 0xA9,
+ EfiSlotTypePciExpressX16 = 0xAA
} EFI_MISC_SLOT_TYPE;
typedef enum {
@@ -469,6 +486,9 @@ typedef struct {
UINT16 SlotId;
EFI_MISC_SLOT_CHARACTERISTICS SlotCharacteristics;
EFI_DEVICE_PATH_PROTOCOL SlotDevicePath;
+ UINT16 SegmentGroupNum;
+ UINT8 BusNum;
+ EFI_MISC_DEV_FUNC_NUM DevFuncNum;
} EFI_MISC_SYSTEM_SLOT_DESIGNATION;
//
@@ -486,6 +506,9 @@ typedef enum {
EfiOnBoardDeviceTypeEthernet = 5,
EfiOnBoardDeviceTypeTokenRing = 6,
EfiOnBoardDeviceTypeSound = 7,
+ EfiOnBoardDeviceTypePataController = 8,
+ EfiOnBoardDeviceTypeSataController = 9,
+ EfiOnBoardDeviceTypeSasController = 10
} EFI_MISC_ONBOARD_DEVICE_TYPE;
typedef struct {
@@ -1010,6 +1033,48 @@ typedef struct {
//
//////////////////////////////////////////////////////////////////////////////
//
+//Additional Information Record - SMBIOS Type 40
+//
+typedef struct {
+ UINT8 EntryLength;
+ UINT8 ReferencedSmbiosType;
+ EFI_INTER_LINK_DATA ReferencedLink;
+ UINT8 ReferencedOffset;
+ STRING_REF EntryString;
+ EFI_PHYSICAL_ADDRESS ValueAddress;
+} EFI_MISC_ADDITIONAL_INFORMATION_ENTRY;
+
+typedef struct {
+ UINT8 NumberOfAdditionalInformationEntries;
+ EFI_PHYSICAL_ADDRESS AdditionalInfoEntriesAddr;
+} EFI_MISC_ADDITIONAL_INFORMATION;
+
+#define EFI_MISC_ADDITIONAL_INFORMATION_RECORD_NUMBER 0x00000022
+
+//
+//////////////////////////////////////////////////////////////////////////////
+//
+//Onboard Devices Extended Infomation Record - SMBIOS Type 41
+//
+typedef struct {
+ UINT8 TypeOfDevice:7;
+ UINT8 DeviceStatus:1;
+} EFI_MISC_DEVICE_TYPE;
+
+typedef struct {
+ STRING_REF ReferenceDesignation;
+ EFI_MISC_DEVICE_TYPE DeviceType;
+ UINT8 DeviceTypeInstance;
+ UINT16 SegmentGroupNum;
+ UINT8 BusNum;
+ EFI_MISC_DEV_FUNC_NUM DevFuncNum;
+} EFI_MISC_ONBOARD_DEVICES_EXTENDED_INFORMATION;
+
+#define EFI_MISC_ONBOARD_DEVICES_EXTENDED_INFORMATION_RECORD_NUMBER 0x00000023
+
+//
+//////////////////////////////////////////////////////////////////////////////
+//
// Generic Data Record - All SMBIOS Type
// Put smbios raw data into one datahub record directly. Smbios driver would
// copy smbios raw data into smbios table but not take any translation.
@@ -1113,7 +1178,9 @@ typedef union {
EFI_MISC_IPMI_INTERFACE_TYPE_DATA MiscIpmiInterfaceTypeData;
EFI_MISC_SYSTEM_POWER_SUPPLY MiscPowerSupplyInfo;
EFI_MISC_SMBIOS_STRUCT_ENCAPSULATION MiscSmbiosStructEncapsulation;
- EFI_MISC_MANAGEMENT_DEVICE_THRESHOLD MiscManagementDeviceThreshold;
+ EFI_MISC_MANAGEMENT_DEVICE_THRESHOLD MiscManagementDeviceThreshold;
+ EFI_MISC_ADDITIONAL_INFORMATION MiscAdditionalInformation;
+ EFI_MISC_ONBOARD_DEVICES_EXTENDED_INFORMATION MiscOnBoardDevicesExtendedInformation;
} EFI_MISC_SUBCLASS_RECORDS;
//
diff --git a/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassProcessor.h b/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassProcessor.h
index ed0c885..90952ff 100644
--- a/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassProcessor.h
+++ b/EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassProcessor.h
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2004 - 2006, Intel Corporation
+Copyright (c) 2004 - 2007, 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
which accompanies this distribution. The full text of the license may be found at
@@ -190,10 +190,16 @@ typedef enum {
EfiProcessorFamilyHobbit = 0x70,
EfiProcessorFamilyCrusoeTM5000 = 0x78,
EfiProcessorFamilyCrusoeTM3000 = 0x79,
+ EfiProcessorFamilyEfficeonTM8000 = 0x7A,
EfiProcessorFamilyWeitek = 0x80,
EfiProcessorFamilyItanium = 0x82,
EfiProcessorFamilyAmdAthlon64 = 0x83,
EfiProcessorFamilyAmdOpteron = 0x84,
+ EfiProcessorFamilyAmdSempron = 0x85,
+ EfiProcessorFamilyAmdTurion64Mobile = 0x86,
+ EfiProcessorFamilyDualCoreAmdOpteron = 0x87,
+ EfiProcessorFamilyAmdAthlon64X2DualCore = 0x88,
+ EfiProcessorFamilyAmdTurion64X2Mobile = 0x89,
EfiProcessorFamilyPARISC = 0x90,
EfiProcessorFamilyPaRisc8500 = 0x91,
EfiProcessorFamilyPaRisc8000 = 0x92,
@@ -215,13 +221,35 @@ typedef enum {
EfiProcessorFamilyIntelCeleronD = 0xBA,
EfiProcessorFamilyIntelPentiumD = 0xBB,
EfiProcessorFamilyIntelPentiumEx = 0xBC,
+ EfiProcessorFamilyIntelCoreBrand = 0xBD,
+ EfiProcessorFamilyReserved = 0xBE,
+ EfiProcessorFamilyIntelCore2 = 0xBF,
EfiProcessorFamilyIBM390 = 0xC8,
EfiProcessorFamilyG4 = 0xC9,
EfiProcessorFamilyG5 = 0xCA,
+ EfiProcessorFamilyG6 = 0xCB,
+ EfiProcessorFamilyzArchitectur = 0xCC,
+ EfiProcessorFamilyViaC7M = 0xD2,
+ EfiProcessorFamilyViaC7D = 0xD3,
+ EfiProcessorFamilyViaC7 = 0xD4,
+ EfiProcessorFamilyViaEden = 0xD5,
EfiProcessorFamilyi860 = 0xFA,
- EfiProcessorFamilyi960 = 0xFB
+ EfiProcessorFamilyi960 = 0xFB,
+ EfiProcessorFamilyIndicatorFamily2 = 0xFE
} EFI_PROCESSOR_FAMILY_DATA;
+typedef enum {
+ EfiProcessorFamilySh3 = 0x104,
+ EfiProcessorFamilySh4 = 0x105,
+ EfiProcessorFamilyArm = 0x118,
+ EfiProcessorFamilyStrongArm = 0x119,
+ EfiProcessorFamily6x86 = 0x12C,
+ EfiProcessorFamilyMediaGx = 0x12D,
+ EfiProcessorFamilyMii = 0x12E,
+ EfiProcessorFamilyWinChip = 0x140,
+ EfiProcessorFamilyDsp = 0x15E,
+ EfiProcessorFamilyVideo = 0x1F4
+} EFI_PROCESSOR_FAMILY2_DATA;
typedef EFI_EXP_BASE10_DATA EFI_PROCESSOR_VOLTAGE_DATA;
@@ -282,7 +310,10 @@ typedef enum {
EfiProcessorSocket939 = 0x12,
EfiProcessorSocketmPGA604 = 0x13,
EfiProcessorSocketLGA771 = 0x14,
- EfiProcessorSocketLGA775 = 0x15
+ EfiProcessorSocketLGA775 = 0x15,
+ EfiProcessorSocketS1 = 0x16,
+ EfiProcessorSocketAm2 = 0x17,
+ EfiProcessorSocketF = 0x18
} EFI_PROCESSOR_SOCKET_TYPE_DATA;
typedef STRING_REF EFI_PROCESSOR_SOCKET_NAME_DATA;
@@ -297,8 +328,19 @@ typedef enum {
typedef UINTN EFI_PROCESSOR_PACKAGE_NUMBER_DATA;
+typedef UINT8 EFI_PROCESSOR_CORE_COUNT_DATA;
+typedef UINT8 EFI_PROCESSOR_ENABLED_CORE_COUNT_DATA;
+typedef UINT8 EFI_PROCESSOR_THREAD_COUNT_DATA;
+
typedef EFI_EXP_BASE10_DATA EFI_PROCESSOR_MAX_FSB_FREQUENCY_DATA;
+typedef struct {
+ UINT16 Reserved :1;
+ UINT16 Unknown :1;
+ UINT16 Capable64Bit :1;
+ UINT16 Reserved2 :13;
+} EFI_PROCESSOR_CHARACTERISTICS_DATA;
+
typedef enum {
ProcessorCoreFrequencyRecordType = 1,
ProcessorFsbFrequencyRecordType = 2,
@@ -323,7 +365,12 @@ typedef enum {
ProcessorPackageNumberRecordType = 21,
ProcessorCoreFrequencyListRecordType = 22,
ProcessorFsbFrequencyListRecordType = 23,
- ProcessorHealthStatusRecordType = 24
+ ProcessorHealthStatusRecordType = 24,
+ ProcessorCoreCountRecordType = 25,
+ ProcessorEnabledCoreCountRecordType = 26,
+ ProcessorThreadCountRecordType = 27,
+ ProcessorCharacteristicsRecordType = 28,
+ ProcessorFamily2RecordType = 29
} EFI_CPU_VARIABLE_RECORD_TYPE;
typedef union {
@@ -350,6 +397,11 @@ typedef union {
EFI_PROCESSOR_ASSET_TAG_DATA ProcessorAssetTag;
EFI_PROCESSOR_HEALTH_STATUS ProcessorHealthStatus;
EFI_PROCESSOR_PACKAGE_NUMBER_DATA ProcessorPackageNumber;
+ EFI_PROCESSOR_CORE_COUNT_DATA ProcessorCoreCount;
+ EFI_PROCESSOR_ENABLED_CORE_COUNT_DATA ProcessorEnabledCoreCount;
+ EFI_PROCESSOR_THREAD_COUNT_DATA ProcessorThreadCount;
+ EFI_PROCESSOR_CHARACTERISTICS_DATA ProcessorCharacteristics;
+ EFI_PROCESSOR_FAMILY2_DATA ProcessorFamily2;
} EFI_CPU_VARIABLE_RECORD;
typedef struct {
diff --git a/EdkCompatibilityPkg/Foundation/Framework/Guid/StatusCodeDataTypeId/StatusCodeDataTypeId.h b/EdkCompatibilityPkg/Foundation/Framework/Guid/StatusCodeDataTypeId/StatusCodeDataTypeId.h
index bc26539..beb4620 100644
--- a/EdkCompatibilityPkg/Foundation/Framework/Guid/StatusCodeDataTypeId/StatusCodeDataTypeId.h
+++ b/EdkCompatibilityPkg/Foundation/Framework/Guid/StatusCodeDataTypeId/StatusCodeDataTypeId.h
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2004 - 2006, Intel Corporation
+Copyright (c) 2004 - 2007, 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
which accompanies this distribution. The full text of the license may be found at
@@ -25,7 +25,11 @@ Abstract:
#include "EfiStatusCode.h"
#include EFI_PROTOCOL_DEFINITION (DebugSupport)
+#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
+#include EFI_PROTOCOL_DEFINITION (HiiDatabase)
+#else
#include EFI_PROTOCOL_DEFINITION (Hii)
+#endif
//
// The size of string
//
diff --git a/EdkCompatibilityPkg/Foundation/Framework/Include/EfiBootScript.h b/EdkCompatibilityPkg/Foundation/Framework/Include/EfiBootScript.h
index 0daa738..55f5e5e 100644
--- a/EdkCompatibilityPkg/Foundation/Framework/Include/EfiBootScript.h
+++ b/EdkCompatibilityPkg/Foundation/Framework/Include/EfiBootScript.h
@@ -40,10 +40,14 @@ typedef const UINT16 EFI_BOOT_SCRIPT_OPCODE;
#define EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE 0x06
#define EFI_BOOT_SCRIPT_STALL_OPCODE 0x07
#define EFI_BOOT_SCRIPT_DISPATCH_OPCODE 0x08
-#define EFI_BOOT_SCRIPT_INFORMATION_OPCODE 0x0A
-#define EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE 0x0B
-#define EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE 0x0C
+//
+// Extensions to boot script definitions
+//
+#define EFI_BOOT_SCRIPT_MEM_POLL_OPCODE 0x09
+#define EFI_BOOT_SCRIPT_INFORMATION_OPCODE 0x0A
+#define EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE 0x0B
+#define EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE 0x0C
#define EFI_BOOT_SCRIPT_TABLE_OPCODE 0xAA
#define EFI_BOOT_SCRIPT_TERMINATE_OPCODE 0xFF
@@ -174,6 +178,17 @@ typedef struct {
} EFI_BOOT_SCRIPT_DISPATCH;
typedef struct {
+ UINT16 OpCode;
+ UINT8 Length;
+ UINT32 Width;
+ UINT64 Address;
+ UINT64 BitMask;
+ UINT64 BitValue;
+ UINT64 Duration;
+ UINT64 LoopTimes;
+} EFI_BOOT_SCRIPT_MEM_POLL;
+
+typedef struct {
UINT16 OpCode;
UINT8 Length;
UINT32 InformationLength;
@@ -199,6 +214,7 @@ typedef union {
EFI_BOOT_SCRIPT_SMBUS_EXECUTE *SmbusExecute;
EFI_BOOT_SCRIPT_STALL *Stall;
EFI_BOOT_SCRIPT_DISPATCH *Dispatch;
+ EFI_BOOT_SCRIPT_MEM_POLL *MemPoll;
EFI_BOOT_SCRIPT_INFORMATION *Information;
EFI_BOOT_SCRIPT_TERMINATE *Terminate;
EFI_BOOT_SCRIPT_COMMON_HEADER *CommonHeader;
diff --git a/EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiS3Save/AcpiS3Save.h b/EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiS3Save/AcpiS3Save.h
index b616a2e..2cf554b 100644
--- a/EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiS3Save/AcpiS3Save.h
+++ b/EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiS3Save/AcpiS3Save.h
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2004, Intel Corporation
+Copyright (c) 2004 - 2007, 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
which accompanies this distribution. The full text of the license may be found at
@@ -44,15 +44,13 @@ EFI_FORWARD_DECLARATION (EFI_ACPI_S3_SAVE_PROTOCOL);
//
typedef
EFI_STATUS
-EFI_BOOTSERVICE
(EFIAPI *EFI_ACPI_S3_SAVE) (
IN EFI_ACPI_S3_SAVE_PROTOCOL * This,
IN VOID * LegacyMemoryAddress
);
typedef
-EFI_STATUS
-EFI_BOOTSERVICE
+EFI_STATUS
(EFIAPI *EFI_ACPI_GET_LEGACY_MEMORY_SIZE) (
IN EFI_ACPI_S3_SAVE_PROTOCOL * This,
OUT UINTN * Size
diff --git a/EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiSupport/AcpiSupport.h b/EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiSupport/AcpiSupport.h
index b99a15b..b0ae333 100644
--- a/EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiSupport/AcpiSupport.h
+++ b/EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiSupport/AcpiSupport.h
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 1999 - 2005, Intel Corporation
+Copyright (c) 1999 - 2007, 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
which accompanies this distribution. The full text of the license may be found at
@@ -82,7 +82,6 @@ extern EFI_GUID gEfiAcpiSupportGuid;
//
typedef
EFI_STATUS
-EFI_BOOTSERVICE
(EFIAPI *EFI_ACPI_GET_ACPI_TABLE) (
IN EFI_ACPI_SUPPORT_PROTOCOL * This,
IN INTN Index,
@@ -96,7 +95,6 @@ EFI_BOOTSERVICE
//
typedef
EFI_STATUS
-EFI_BOOTSERVICE
(EFIAPI *EFI_ACPI_SET_ACPI_TABLE) (
IN EFI_ACPI_SUPPORT_PROTOCOL * This,
IN VOID *Table OPTIONAL,
@@ -110,7 +108,6 @@ EFI_BOOTSERVICE
//
typedef
EFI_STATUS
-EFI_BOOTSERVICE
(EFIAPI *EFI_ACPI_PUBLISH_TABLES) (
IN EFI_ACPI_SUPPORT_PROTOCOL * This,
IN EFI_ACPI_TABLE_VERSION Version
diff --git a/EdkCompatibilityPkg/Foundation/Framework/Protocol/BootScriptSave/BootScriptSave.h b/EdkCompatibilityPkg/Foundation/Framework/Protocol/BootScriptSave/BootScriptSave.h
index 2d0348b..09c6221 100644
--- a/EdkCompatibilityPkg/Foundation/Framework/Protocol/BootScriptSave/BootScriptSave.h
+++ b/EdkCompatibilityPkg/Foundation/Framework/Protocol/BootScriptSave/BootScriptSave.h
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 1999 - 2006, Intel Corporation
+Copyright (c) 1999 - 2007, 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
which accompanies this distribution. The full text of the license may be found at
@@ -45,7 +45,6 @@ EFI_FORWARD_DECLARATION (EFI_BOOT_SCRIPT_SAVE_PROTOCOL);
//
typedef
EFI_STATUS
-EFI_BOOTSERVICE
(EFIAPI *EFI_BOOT_SCRIPT_WRITE) (
IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL * This,
IN UINT16 TableName,
@@ -55,7 +54,6 @@ EFI_BOOTSERVICE
typedef
EFI_STATUS
-EFI_BOOTSERVICE
(EFIAPI *EFI_BOOT_SCRIPT_CLOSE_TABLE) (
IN EFI_BOOT_SCRIPT_SAVE_PROTOCOL * This,
IN UINT16 TableName,
diff --git a/EdkCompatibilityPkg/Foundation/Framework/Protocol/LegacyBios/LegacyBios.h b/EdkCompatibilityPkg/Foundation/Framework/Protocol/LegacyBios/LegacyBios.h
index 11b1c24..9ce9221 100644
--- a/EdkCompatibilityPkg/Foundation/Framework/Protocol/LegacyBios/LegacyBios.h
+++ b/EdkCompatibilityPkg/Foundation/Framework/Protocol/LegacyBios/LegacyBios.h
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2004 - 2006, Intel Corporation
+Copyright (c) 2004 - 2007, 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
which accompanies this distribution. The full text of the license may be found at
@@ -208,6 +208,19 @@ typedef struct {
UINT8 LastPciBus;
} EFI_COMPATIBILITY16_TABLE;
+
+typedef enum {
+ Compatibility16InitializeYourself = 0x0000,
+ Compatibility16UpdateBbs = 0x0001,
+ Compatibility16PrepareToBoot = 0x0002,
+ Compatibility16Boot = 0x0003,
+ Compatibility16RetrieveLastBootDevice = 0x0004,
+ Compatibility16DispatchOprom = 0x0005,
+ Compatibility16GetTableAddress = 0x0006,
+ Compatibility16SetKeyboardLeds = 0x0007,
+ Compatibility16InstallPciHandler = 0x0008,
+} EFI_COMPATIBILITY_FUNCTIONS;
+
//
// define maximum number of HDD system supports
//