1. Add new HII IFR opcode introduced in UEFI2.2 and UEFI2.3
authorlgao4 <lgao4@de2fecce-e211-0410-80a6-f3fac2684e05>
Mon, 14 Sep 2009 08:41:01 +0000 (08:41 +0000)
committerlgao4 <lgao4@de2fecce-e211-0410-80a6-f3fac2684e05>
Mon, 14 Sep 2009 08:41:01 +0000 (08:41 +0000)
They are EFI_IFR_FORM_MAP, EFI_IFR_READ, EFI_IFR_WRITE,  EFI_IFR_GET, EFI_IFR_SET, EFI_IFR_MAP, EFI_IFR_SECURITY.
2. Add new data type introduced in UEFI2.2 and UEFI2.3
EFI_IFR_TYPE_ACTION, EFI_IFR_TYPE_UNDEFINED,
EFI_IFR_TYPE_BUFFER.

git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@9261 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/MdePkg/Include/Guid/HiiFormMapMethodGuid.h [new file with mode: 0644]
edk2/MdePkg/Include/Guid/HiiPlatformSetupFormset.h
edk2/MdePkg/Include/Protocol/FormBrowser2.h
edk2/MdePkg/Include/Protocol/HiiConfigAccess.h
edk2/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h
edk2/MdePkg/MdePkg.dec

diff --git a/edk2/MdePkg/Include/Guid/HiiFormMapMethodGuid.h b/edk2/MdePkg/Include/Guid/HiiFormMapMethodGuid.h
new file mode 100644 (file)
index 0000000..b298b1b
--- /dev/null
@@ -0,0 +1,25 @@
+/** @file\r
+  Guid used to identify HII FormMap configuration method.\r
+\r
+  Copyright (c) 2009, 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
+  @par Revision Reference:\r
+  GUID defined in UEFI 2.2 spec.\r
+**/\r
+\r
+#ifndef __EFI_HII_FORMMAP_GUID_H__\r
+#define __EFI_HII_FORMMAP_GUID_H__\r
+\r
+#define EFI_HII_STANDARD_FORM_GUID \\r
+  { 0x3bd2f4ec, 0xe524, 0x46e4, { 0xa9, 0xd8, 0x51, 0x1, 0x17, 0x42, 0x55, 0x62 } }\r
+\r
+extern EFI_GUID gEfiHiiStandardFormGuid;\r
+\r
+#endif\r
index 261756b..eed9a85 100644 (file)
 #define EFI_HII_PLATFORM_SETUP_FORMSET_GUID \\r
   { 0x93039971, 0x8545, 0x4b04, { 0xb4, 0x5e, 0x32, 0xeb, 0x83, 0x26, 0x4, 0xe } }\r
 \r
+#define EFI_HII_DRIVER_HEALTH_FORMSET_GUID \\r
+  { 0xf22fc20c, 0x8cf4, 0x45eb, { 0x8e, 0x6, 0xad, 0x4e, 0x50, 0xb9, 0x5d, 0xd3 } }\r
+\r
+#define EFI_HII_USER_CREDENTIAL_FORMSET_GUID \\r
+  { 0x337f4407, 0x5aee, 0x4b83, { 0xb2, 0xa7, 0x4e, 0xad, 0xca, 0x30, 0x88, 0xcd } }\r
+\r
 extern EFI_GUID gEfiHiiPlatformSetupFormsetGuid;\r
+extern EFI_GUID gEfiHiiDriverHealthFormsetGuid;\r
+extern EFI_GUID gEfiHiiUserCredentialFormsetGuid;\r
 \r
 #endif\r
index 9cb3f96..4d4d753 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __EFI_FORM_BROWSER2_H__\r
 #define __EFI_FORM_BROWSER2_H__\r
 \r
+#include <Guid/HiiPlatformSetupFormset.h>\r
+\r
 #define EFI_FORM_BROWSER2_PROTOCOL_GUID \\r
   {0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 }}\r
 \r
index 46a4362..28bacde 100644 (file)
@@ -29,8 +29,11 @@ typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL  EFI_HII_CONFIG_ACCESS_PROTOCOL;
 \r
 typedef UINTN EFI_BROWSER_ACTION;\r
 \r
-#define EFI_BROWSER_ACTION_CHANGING 0\r
-#define EFI_BROWSER_ACTION_CHANGED  1\r
+#define EFI_BROWSER_ACTION_CHANGING   0\r
+#define EFI_BROWSER_ACTION_CHANGED    1\r
+#define EFI_BROWSER_ACTION_RETRIEVE   2\r
+#define EFI_BROWSER_ACTION_FORM_OPEN  3\r
+#define EFI_BROWSER_ACTION_FORM_CLOSE 4\r
 \r
 /**\r
    \r
@@ -190,12 +193,12 @@ EFI_STATUS
 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
+  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 OUT EFI_IFR_TYPE_VALUE                     *Value,\r
+  OUT    EFI_BROWSER_ACTION_REQUEST             *ActionRequest\r
   )\r
   ;\r
   \r
index fd677f7..391ea54 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__\r
 #define __UEFI_INTERNAL_FORMREPRESENTATION_H__\r
 \r
+#include <Guid/HiiFormMapMethodGuid.h>\r
+\r
 ///\r
 /// The following types are currently defined:\r
 ///\r
@@ -621,7 +623,8 @@ typedef union {
   BOOLEAN         b;\r
   EFI_HII_TIME    time;\r
   EFI_HII_DATE    date;\r
-  EFI_STRING_ID   string;\r
+  EFI_STRING_ID   string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION\r
+  // UINT8 buffer[];      ///< EFI_IFR_TYPE_ORDERED_LIST\r
 } EFI_IFR_TYPE_VALUE;\r
 \r
 //\r
@@ -659,6 +662,7 @@ typedef union {
 #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_MAP_OP                 0x22\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
@@ -667,6 +671,10 @@ typedef union {
 #define EFI_IFR_VERSION_OP             0x28\r
 #define EFI_IFR_END_OP                 0x29\r
 #define EFI_IFR_MATCH_OP               0x2A\r
+#define EFI_IFR_SET_OP                 0x2C\r
+#define EFI_IFR_GET_OP                 0x2B\r
+#define EFI_IFR_READ_OP                0x2D\r
+#define EFI_IFR_WRITE_OP               0x2E\r
 #define EFI_IFR_EQUAL_OP               0x2F\r
 #define EFI_IFR_NOT_EQUAL_OP           0x30\r
 #define EFI_IFR_GREATER_THAN_OP        0x31\r
@@ -713,8 +721,10 @@ typedef union {
 #define EFI_IFR_VALUE_OP               0x5A\r
 #define EFI_IFR_DEFAULT_OP             0x5B\r
 #define EFI_IFR_DEFAULTSTORE_OP        0x5C\r
+#define EFI_IFR_FORM_MAP_OP            0x5D\r
 #define EFI_IFR_CATENATE_OP            0x5E\r
 #define EFI_IFR_GUID_OP                0x5F\r
+#define EFI_IFR_SECURITY_OP            0x60\r
 \r
 //\r
 // Definitions of IFR Standard Headers\r
@@ -1075,6 +1085,9 @@ typedef struct _EFI_IFR_ONE_OF_OPTION {
 #define EFI_IFR_TYPE_DATE              0x06\r
 #define EFI_IFR_TYPE_STRING            0x07\r
 #define EFI_IFR_TYPE_OTHER             0x08\r
+#define EFI_IFR_TYPE_UNDEFINED         0x09\r
+#define EFI_IFR_TYPE_ACTION            0x0A\r
+#define EFI_IFR_TYPE_BUFFER            0x0B\r
 \r
 #define EFI_IFR_OPTION_DEFAULT         0x10\r
 #define EFI_IFR_OPTION_DEFAULT_MFG     0x20\r
@@ -1362,6 +1375,107 @@ typedef struct _EFI_IFR_SPAN {
   UINT8                    Flags;\r
 } EFI_IFR_SPAN;\r
 \r
+typedef struct _EFI_IFR_SECURITY {\r
+  ///\r
+  /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.\r
+  ///\r
+  EFI_IFR_OP_HEADER        Header;\r
+  ///\r
+  /// Security permission level.\r
+  ///\r
+  EFI_GUID                 Permissions;\r
+} EFI_IFR_SECURITY;\r
+\r
+typedef struct _EFI_IFR_FORM_MAP_METHOD {\r
+  ///\r
+  /// The string identifier which provides the human-readable name of \r
+  /// the configuration method for this standards map form.\r
+  ///\r
+  EFI_STRING_ID            MethodTitle;\r
+  ///\r
+  /// Identifier which uniquely specifies the configuration methods \r
+  /// associated with this standards map form.\r
+  ///\r
+  EFI_GUID                 MethodIdentifier;\r
+} EFI_IFR_FORM_MAP_METHOD;\r
+\r
+typedef struct _EFI_IFR_FORM_MAP {\r
+  ///\r
+  /// The sequence that defines the type of opcode as well as the length \r
+  /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP. \r
+  ///\r
+  EFI_IFR_OP_HEADER        Header;\r
+  ///\r
+  /// The unique identifier for this particular form.\r
+  ///\r
+  EFI_FORM_ID              FormId;\r
+  ///\r
+  /// One or more configuration method's name and unique identifier.\r
+  ///\r
+  EFI_IFR_FORM_MAP_METHOD  Methods[1];\r
+} EFI_IFR_FORM_MAP;\r
+\r
+typedef struct _EFI_IFR_SET {\r
+  ///\r
+  /// The sequence that defines the type of opcode as well as the length \r
+  /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP. \r
+  ///\r
+  EFI_IFR_OP_HEADER  Header;\r
+  ///\r
+  /// Specifies the identifier of a previously declared variable store to \r
+  /// use when storing the question's value. \r
+  ///\r
+  EFI_VARSTORE_ID    VarStoreId;\r
+  union {\r
+    ///\r
+    /// A 16-bit Buffer Storage offset.\r
+    ///\r
+    EFI_STRING_ID    VarName;\r
+    ///\r
+    /// A Name Value or EFI Variable name (VarName).\r
+    ///\r
+    UINT16           VarOffset;\r
+  }                  VarStoreInfo;\r
+} EFI_IFR_SET;\r
+\r
+typedef struct _EFI_IFR_GET {\r
+  ///\r
+  /// The sequence that defines the type of opcode as well as the length \r
+  /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP. \r
+  ///\r
+  EFI_IFR_OP_HEADER  Header;\r
+  ///\r
+  /// Specifies the identifier of a previously declared variable store to \r
+  /// use when retrieving the value. \r
+  ///\r
+  EFI_VARSTORE_ID    VarStoreId;\r
+  union {\r
+    ///\r
+    /// A 16-bit Buffer Storage offset.\r
+    ///\r
+    EFI_STRING_ID    VarName;\r
+    ///\r
+    /// A Name Value or EFI Variable name (VarName).\r
+    ///\r
+    UINT16           VarOffset;\r
+  }                  VarStoreInfo;\r
+  ///\r
+  /// Specifies the type used for storage. \r
+  ///\r
+  UINT8              VarStoreType;\r
+} EFI_IFR_GET;\r
+\r
+typedef struct _EFI_IFR_READ {\r
+  EFI_IFR_OP_HEADER       Header;\r
+} EFI_IFR_READ;\r
+\r
+typedef struct _EFI_IFR_WRITE {\r
+  EFI_IFR_OP_HEADER      Header;\r
+} EFI_IFR_WRITE;\r
+\r
+typedef struct _EFI_IFR_MAP {\r
+  EFI_IFR_OP_HEADER      Header;\r
+} EFI_IFR_MAP;\r
 //\r
 // Definitions for Keyboard Package\r
 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL\r
index 5922788..9ea4b40 100644 (file)
   ## Include/Guid/HiiPlatformSetupFormset.h\r
   gEfiHiiPlatformSetupFormsetGuid = { 0x93039971, 0x8545, 0x4b04, { 0xb4, 0x5e, 0x32, 0xeb, 0x83, 0x26, 0x04, 0x0e }}\r
 \r
+  ## Include/Guid/HiiPlatformSetupFormset.h\r
+  gEfiHiiDriverHealthFormsetGuid = { 0xf22fc20c, 0x8cf4, 0x45eb, { 0x8e, 0x6, 0xad, 0x4e, 0x50, 0xb9, 0x5d, 0xd3 }}\r
+\r
+  ## Include/Guid/HiiPlatformSetupFormset.h\r
+  gEfiHiiUserCredentialFormsetGuid = { 0x337f4407, 0x5aee, 0x4b83, { 0xb2, 0xa7, 0x4e, 0xad, 0xca, 0x30, 0x88, 0xcd }}\r
+  \r
+  ## Include/Guid/HiiFormMapMethodGuid.h\r
+  gEfiHiiStandardFormGuid = { 0x3bd2f4ec, 0xe524, 0x46e4, { 0xa9, 0xd8, 0x51, 0x1, 0x17, 0x42, 0x55, 0x62 }}\r
+\r
   ## Include/Guid/MemoryOverwriteControl.h\r
   gEfiMemoryOverwriteControlDataGuid = { 0xe20939be, 0x32d4, 0x41be, {0xa1, 0x50, 0x89, 0x7f, 0x85, 0xd4, 0x98, 0x29 }}\r
 \r