]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 24 Jan 2008 06:37:35 +0000 (06:37 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 24 Jan 2008 06:37:35 +0000 (06:37 +0000)
  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

40 files changed:
EdkCompatibilityPkg/Foundation/Core/Dxe/ArchProtocol/Cpu/Cpu.h
EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/IA32/CpuIA32.c
EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/x64/Cpu.asm
EdkCompatibilityPkg/Foundation/Efi/Include/EfiDevicePath.h
EdkCompatibilityPkg/Foundation/Efi/Include/EfiHii.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/AbsolutePointer/AbsolutePointer.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h
EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf
EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/FormBrowser2/FormBrowser2.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigAccess/HiiConfigAccess.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiConfigRouting/HiiConfigRouting.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiDatabase/HiiDatabase.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiFont/HiiFont.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiFont/HiiFont.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiImage/HiiImage.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiImage/HiiImage.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiString/HiiString.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/HiiString/HiiString.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/Ip4Config/Ip4Config.h
EdkCompatibilityPkg/Foundation/Efi/Protocol/ManagedNetwork/ManagedNetwork.h
EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.c [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/SimpleTextInputEx/SimpleTextInputEx.h [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.c
EdkCompatibilityPkg/Foundation/Efi/Protocol/UnicodeCollation/UnicodeCollation.h
EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubRecords.h
EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassCache.h
EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMemory.h
EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMisc.h
EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassProcessor.h
EdkCompatibilityPkg/Foundation/Framework/Guid/StatusCodeDataTypeId/StatusCodeDataTypeId.h
EdkCompatibilityPkg/Foundation/Framework/Include/EfiBootScript.h
EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiS3Save/AcpiS3Save.h
EdkCompatibilityPkg/Foundation/Framework/Protocol/AcpiSupport/AcpiSupport.h
EdkCompatibilityPkg/Foundation/Framework/Protocol/BootScriptSave/BootScriptSave.h
EdkCompatibilityPkg/Foundation/Framework/Protocol/LegacyBios/LegacyBios.h

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