]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
1. Update the implementation of HII ConfigRouting Protocol in HiiDataBase module...
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / HiiDatabase.h
index bbd366edece9c1f84654e514d9d14142b02311ef..5d10d46a8c2cb34130c794e7ee2c78dfa6f9ee8a 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
+Private structures definitions in HiiDatabase.\r
 \r
-Copyright (c) 2007 - 2008, Intel Corporation\r
+Copyright (c) 2007 - 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
@@ -9,25 +10,13 @@ http://opensource.org/licenses/bsd-license.php
 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
-    Private structures definitions in HiiDatabase.\r
-\r
-Revision History\r
-\r
-\r
 **/\r
 \r
 #ifndef __HII_DATABASE_PRIVATE_H__\r
 #define __HII_DATABASE_PRIVATE_H__\r
 \r
-#include <PiDxe.h>\r
+#include <Uefi.h>\r
 \r
-#include <Protocol/ConsoleControl.h>\r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/HiiFont.h>\r
 #include <Protocol/HiiImage.h>\r
@@ -38,6 +27,7 @@ Revision History
 #include <Protocol/SimpleTextOut.h>\r
 \r
 #include <Guid/HiiKeyBoardLayout.h>\r
+#include <Guid/GlobalVariable.h>\r
 \r
 \r
 #include <Library/DebugLib.h>\r
@@ -47,8 +37,11 @@ Revision History
 #include <Library/BaseLib.h>\r
 #include <Library/DevicePathLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
-#include <Library/IfrSupportLib.h>\r
-#include <Library/HiiLib.h>\r
+#include <Library/UefiLib.h>\r
+#include <Library/PcdLib.h>\r
+#include <Library/UefiRuntimeServicesTableLib.h>\r
+#include <Library/PrintLib.h>\r
+\r
 \r
 #define HII_DATABASE_NOTIFY_GUID \\r
   { \\r
@@ -69,6 +62,37 @@ Revision History
 #define BITMAP_LEN_8_BIT(Width, Height)  ((Width) * (Height))\r
 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)\r
 \r
+//\r
+// IFR data structure\r
+//\r
+// BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.\r
+\r
+typedef struct {\r
+  LIST_ENTRY          Entry;             // Link to VarStorage\r
+  EFI_GUID            Guid;\r
+  CHAR16              *Name;\r
+  EFI_VARSTORE_ID     VarStoreId;\r
+  UINT16              Size;\r
+  LIST_ENTRY          BlockEntry;        // Link to its Block array\r
+} IFR_VARSTORAGE_DATA;\r
+\r
+typedef struct {\r
+  LIST_ENTRY          Entry;             // Link to Block array\r
+  UINT16              Offset;\r
+  UINT16              Width;\r
+  EFI_QUESTION_ID     QuestionId;\r
+  UINT8               OpCode;\r
+  UINT8               Scope;\r
+  LIST_ENTRY          DefaultValueEntry; // Link to its default value array\r
+} IFR_BLOCK_DATA;\r
+\r
+typedef struct {\r
+  LIST_ENTRY          Entry;\r
+  EFI_STRING_ID       DefaultName;\r
+  UINT16              DefaultId;\r
+  UINT64              Value;\r
+} IFR_DEFAULT_DATA;\r
+\r
 //\r
 // Storage types\r
 //\r
@@ -76,7 +100,7 @@ Revision History
 #define EFI_HII_VARSTORE_NAME_VALUE        1\r
 #define EFI_HII_VARSTORE_EFI_VARIABLE      2\r
 \r
-#define HII_FORMSET_STORAGE_SIGNATURE           EFI_SIGNATURE_32 ('H', 'S', 'T', 'G')\r
+#define HII_FORMSET_STORAGE_SIGNATURE           SIGNATURE_32 ('H', 'S', 'T', 'G')\r
 typedef struct {\r
   UINTN               Signature;\r
   LIST_ENTRY          Entry;\r
@@ -90,13 +114,11 @@ typedef struct {
   UINT16              Size;\r
 } HII_FORMSET_STORAGE;\r
 \r
-#define HII_FORMSET_STORAGE_FROM_LINK(a)  CR (a, HII_FORMSET_STORAGE, Link, HII_FORMSET_STORAGE_SIGNATURE)\r
-\r
 \r
 //\r
 // String Package definitions\r
 //\r
-#define HII_STRING_PACKAGE_SIGNATURE    EFI_SIGNATURE_32 ('h','i','s','p')\r
+#define HII_STRING_PACKAGE_SIGNATURE    SIGNATURE_32 ('h','i','s','p')\r
 typedef struct _HII_STRING_PACKAGE_INSTANCE {\r
   UINTN                                 Signature;\r
   EFI_HII_STRING_PACKAGE_HDR            *StringPkgHdr;\r
@@ -109,7 +131,7 @@ typedef struct _HII_STRING_PACKAGE_INSTANCE {
 //\r
 // Form Package definitions\r
 //\r
-#define HII_IFR_PACKAGE_SIGNATURE       EFI_SIGNATURE_32 ('h','f','r','p')\r
+#define HII_IFR_PACKAGE_SIGNATURE       SIGNATURE_32 ('h','f','r','p')\r
 typedef struct _HII_IFR_PACKAGE_INSTANCE {\r
   UINTN                                 Signature;\r
   EFI_HII_PACKAGE_HEADER                FormPkgHdr;\r
@@ -120,7 +142,7 @@ typedef struct _HII_IFR_PACKAGE_INSTANCE {
 //\r
 // Simple Font Package definitions\r
 //\r
-#define HII_S_FONT_PACKAGE_SIGNATURE    EFI_SIGNATURE_32 ('h','s','f','p')\r
+#define HII_S_FONT_PACKAGE_SIGNATURE    SIGNATURE_32 ('h','s','f','p')\r
 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE {\r
   UINTN                                 Signature;\r
   EFI_HII_SIMPLE_FONT_PACKAGE_HDR       *SimpleFontPkgHdr;\r
@@ -130,7 +152,7 @@ typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE {
 //\r
 // Font Package definitions\r
 //\r
-#define HII_FONT_PACKAGE_SIGNATURE      EFI_SIGNATURE_32 ('h','i','f','p')\r
+#define HII_FONT_PACKAGE_SIGNATURE      SIGNATURE_32 ('h','i','f','p')\r
 typedef struct _HII_FONT_PACKAGE_INSTANCE {\r
   UINTN                                 Signature;\r
   EFI_HII_FONT_PACKAGE_HDR              *FontPkgHdr;\r
@@ -139,7 +161,7 @@ typedef struct _HII_FONT_PACKAGE_INSTANCE {
   LIST_ENTRY                            GlyphInfoList;\r
 } HII_FONT_PACKAGE_INSTANCE;\r
 \r
-#define HII_GLYPH_INFO_SIGNATURE        EFI_SIGNATURE_32 ('h','g','i','s')\r
+#define HII_GLYPH_INFO_SIGNATURE        SIGNATURE_32 ('h','g','i','s')\r
 typedef struct _HII_GLYPH_INFO {\r
   UINTN                                 Signature;\r
   LIST_ENTRY                            Entry;\r
@@ -147,7 +169,7 @@ typedef struct _HII_GLYPH_INFO {
   EFI_HII_GLYPH_INFO                    Cell;\r
 } HII_GLYPH_INFO;\r
 \r
-#define HII_FONT_INFO_SIGNATURE         EFI_SIGNATURE_32 ('h','l','f','i')\r
+#define HII_FONT_INFO_SIGNATURE         SIGNATURE_32 ('h','l','f','i')\r
 typedef struct _HII_FONT_INFO {\r
   UINTN                                 Signature;\r
   LIST_ENTRY                            Entry;\r
@@ -155,7 +177,7 @@ typedef struct _HII_FONT_INFO {
   UINT8                                 FontId;\r
 } HII_FONT_INFO;\r
 \r
-#define HII_GLOBAL_FONT_INFO_SIGNATURE  EFI_SIGNATURE_32 ('h','g','f','i')\r
+#define HII_GLOBAL_FONT_INFO_SIGNATURE  SIGNATURE_32 ('h','g','f','i')\r
 typedef struct _HII_GLOBAL_FONT_INFO {\r
   UINTN                                 Signature;\r
   LIST_ENTRY                            Entry;\r
@@ -181,7 +203,7 @@ typedef struct _HII_IMAGE_PACKAGE_INSTANCE {
 //\r
 // Keyboard Layout Pacakge definitions\r
 //\r
-#define HII_KB_LAYOUT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','k','l','p')\r
+#define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')\r
 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE {\r
   UINTN                                 Signature;\r
   UINT8                                 *KeyboardPkg;\r
@@ -191,7 +213,7 @@ typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE {
 //\r
 // Guid Package definitions\r
 //\r
-#define HII_GUID_PACKAGE_SIGNATURE      EFI_SIGNATURE_32 ('h','i','g','p')\r
+#define HII_GUID_PACKAGE_SIGNATURE      SIGNATURE_32 ('h','i','g','p')\r
 typedef struct _HII_GUID_PACKAGE_INSTANCE {\r
   UINTN                                 Signature;\r
   UINT8                                 *GuidPkg;\r
@@ -214,7 +236,7 @@ typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE {
   UINT8                                 *DevicePathPkg;\r
 } HII_DATABASE_PACKAGE_LIST_INSTANCE;\r
 \r
-#define HII_HANDLE_SIGNATURE            EFI_SIGNATURE_32 ('h','i','h','l')\r
+#define HII_HANDLE_SIGNATURE            SIGNATURE_32 ('h','i','h','l')\r
 \r
 typedef struct {\r
   UINTN               Signature;\r
@@ -222,7 +244,7 @@ typedef struct {
   UINTN               Key;\r
 } HII_HANDLE;\r
 \r
-#define HII_DATABASE_RECORD_SIGNATURE   EFI_SIGNATURE_32 ('h','i','d','r')\r
+#define HII_DATABASE_RECORD_SIGNATURE   SIGNATURE_32 ('h','i','d','r')\r
 \r
 typedef struct _HII_DATABASE_RECORD {\r
   UINTN                                 Signature;\r
@@ -232,7 +254,7 @@ typedef struct _HII_DATABASE_RECORD {
   LIST_ENTRY                            DatabaseEntry;\r
 } HII_DATABASE_RECORD;\r
 \r
-#define HII_DATABASE_NOTIFY_SIGNATURE   EFI_SIGNATURE_32 ('h','i','d','n')\r
+#define HII_DATABASE_NOTIFY_SIGNATURE   SIGNATURE_32 ('h','i','d','n')\r
 \r
 typedef struct _HII_DATABASE_NOTIFY {\r
   UINTN                                 Signature;\r
@@ -244,16 +266,14 @@ typedef struct _HII_DATABASE_NOTIFY {
   LIST_ENTRY                            DatabaseNotifyEntry;\r
 } HII_DATABASE_NOTIFY;\r
 \r
-#define HII_DATABASE_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('H', 'i', 'D', 'p')\r
+#define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')\r
 \r
 typedef struct _HII_DATABASE_PRIVATE_DATA {\r
   UINTN                                 Signature;\r
   LIST_ENTRY                            DatabaseList;\r
   LIST_ENTRY                            DatabaseNotifyList;\r
   EFI_HII_FONT_PROTOCOL                 HiiFont;\r
-#ifndef DISABLE_UNUSED_HII_PROTOCOLS\r
   EFI_HII_IMAGE_PROTOCOL                HiiImage;\r
-#endif\r
   EFI_HII_STRING_PROTOCOL               HiiString;\r
   EFI_HII_DATABASE_PROTOCOL             HiiDatabase;\r
   EFI_HII_CONFIG_ROUTING_PROTOCOL       ConfigRouting;\r
@@ -305,7 +325,7 @@ typedef struct _HII_DATABASE_PRIVATE_DATA {
 //\r
 \r
 /**\r
-  This function checks whether a handle is a valid EFI_HII_HANDLE\r
+  This function checks whether a handle is a valid EFI_HII_HANDLE.\r
 \r
   @param  Handle                  Pointer to a EFI_HII_HANDLE\r
 \r
@@ -316,8 +336,7 @@ typedef struct _HII_DATABASE_PRIVATE_DATA {
 BOOLEAN\r
 IsHiiHandleValid (\r
   EFI_HII_HANDLE Handle\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -349,10 +368,33 @@ IsFontInfoExisted (
   IN  EFI_FONT_INFO_MASK        *FontInfoMask,   OPTIONAL\r
   IN  EFI_FONT_HANDLE           FontHandle,      OPTIONAL\r
   OUT HII_GLOBAL_FONT_INFO      **GlobalFontInfo OPTIONAL\r
+  );\r
+\r
+/**\r
+\r
+   This function invokes the matching registered function.\r
+    \r
+   @param  Private           HII Database driver private structure.\r
+   @param  NotifyType        The type of change concerning the database.\r
+   @param  PackageInstance   Points to the package referred to by the notification.\r
+   @param  PackageType       Package type\r
+   @param  Handle            The handle of the package list which contains the specified package.\r
+    \r
+   @retval EFI_SUCCESS            Already checked all registered function and invoked \r
+                                  if matched.\r
+   @retval EFI_INVALID_PARAMETER  Any input parameter is not valid.\r
+     \r
+**/\r
+EFI_STATUS\r
+InvokeRegisteredFunction (\r
+  IN HII_DATABASE_PRIVATE_DATA    *Private, \r
+  IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,\r
+  IN VOID                         *PackageInstance,\r
+  IN UINT8                        PackageType,\r
+  IN EFI_HII_HANDLE               Handle\r
   )\r
 ;\r
 \r
-\r
 /**\r
   Retrieve system default font and color.\r
 \r
@@ -373,8 +415,7 @@ GetSystemFont (
   IN  HII_DATABASE_PRIVATE_DATA      *Private,\r
   OUT EFI_FONT_DISPLAY_INFO          **FontInfo,\r
   OUT UINTN                          *FontInfoSize OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -410,8 +451,7 @@ FindStringBlock (
   OUT UINT8                           **StringBlockAddr, OPTIONAL\r
   OUT UINTN                           *StringTextOffset, OPTIONAL\r
   OUT EFI_STRING_ID                   *LastStringId OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -442,8 +482,7 @@ FindGlyphBlock (
   OUT UINT8                          **GlyphBuffer, OPTIONAL\r
   OUT EFI_HII_GLYPH_INFO             *Cell, OPTIONAL\r
   OUT UINTN                          *GlyphBufferLen OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // EFI_HII_FONT_PROTOCOL protocol interfaces\r
@@ -470,7 +509,10 @@ FindGlyphBlock (
                                   will be allocated to hold the generated image and\r
                                   the pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
-  @param  BltX,BLTY               Specifies the offset from the left and top edge\r
+  @param  BltX                    Together with BltX, Specifies the offset from the left and top edge\r
+                                  of the image of the first character cell in the\r
+                                  image.\r
+  @param  BltY                    Together with BltY, Specifies the offset from the left and top edge\r
                                   of the image of the first character cell in the\r
                                   image.\r
   @param  RowInfoArray            If this is non-NULL on entry, then on exit, this\r
@@ -514,8 +556,7 @@ HiiStringToImage (
   OUT EFI_HII_ROW_INFO               **RowInfoArray    OPTIONAL,\r
   OUT UINTN                          *RowInfoArraySize OPTIONAL,\r
   OUT UINTN                          *ColumnInfoArray  OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -543,7 +584,10 @@ HiiStringToImage (
                                   will be allocated to hold the generated image and\r
                                   the pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
-  @param  BltX,BLTY               Specifies the offset from the left and top edge\r
+  @param  BltX                    Together with BltX, Specifies the offset from the left and top edge\r
+                                  of the image of the first character cell in the\r
+                                  image.\r
+  @param  BltY                    Together with BltY, Specifies the offset from the left and top edge\r
                                   of the image of the first character cell in the\r
                                   image.\r
   @param  RowInfoArray            If this is non-NULL on entry, then on exit, this\r
@@ -591,8 +635,7 @@ HiiStringIdToImage (
   OUT EFI_HII_ROW_INFO               **RowInfoArray    OPTIONAL,\r
   OUT UINTN                          *RowInfoArraySize OPTIONAL,\r
   OUT UINTN                          *ColumnInfoArray  OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -622,11 +665,10 @@ EFIAPI
 HiiGetGlyph (\r
   IN  CONST EFI_HII_FONT_PROTOCOL    *This,\r
   IN  CHAR16                         Char,\r
-  IN  CONST EFI_FONT_DISPLAY_INFO    *StringInfo, OPTIONAL\r
+  IN  CONST EFI_FONT_DISPLAY_INFO    *StringInfo,\r
   OUT EFI_IMAGE_OUTPUT               **Blt,\r
   OUT UINTN                          *Baseline OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -663,11 +705,10 @@ EFIAPI
 HiiGetFontInfo (\r
   IN  CONST EFI_HII_FONT_PROTOCOL    *This,\r
   IN  OUT   EFI_FONT_HANDLE          *FontHandle,\r
-  IN  CONST EFI_FONT_DISPLAY_INFO    *StringInfoIn,\r
+  IN  CONST EFI_FONT_DISPLAY_INFO    *StringInfoIn, OPTIONAL\r
   OUT       EFI_FONT_DISPLAY_INFO    **StringInfoOut,\r
   IN  CONST EFI_STRING               String OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // EFI_HII_IMAGE_PROTOCOL interfaces\r
@@ -699,8 +740,7 @@ HiiNewImage (
   IN  EFI_HII_HANDLE                 PackageList,\r
   OUT EFI_IMAGE_ID                   *ImageId,\r
   IN  CONST EFI_IMAGE_INPUT          *Image\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -731,8 +771,7 @@ HiiGetImage (
   IN  EFI_HII_HANDLE                 PackageList,\r
   IN  EFI_IMAGE_ID                   ImageId,\r
   OUT EFI_IMAGE_INPUT                *Image\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -758,8 +797,7 @@ HiiSetImage (
   IN EFI_HII_HANDLE                  PackageList,\r
   IN EFI_IMAGE_ID                    ImageId,\r
   IN CONST EFI_IMAGE_INPUT           *Image\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -778,6 +816,9 @@ HiiSetImage (
                                   a buffer will be allocated to hold  the generated\r
                                   image and the pointer updated on exit. It is the\r
                                   caller's responsibility to free this buffer.\r
+  @param  BltX                    Specifies the offset from the left and top edge\r
+                                  of the  output image of the first pixel in the\r
+                                  image.\r
   @param  BltY                    Specifies the offset from the left and top edge\r
                                   of the  output image of the first pixel in the\r
                                   image.\r
@@ -797,8 +838,7 @@ HiiDrawImage (
   IN OUT EFI_IMAGE_OUTPUT            **Blt,\r
   IN UINTN                           BltX,\r
   IN UINTN                           BltY\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -821,6 +861,9 @@ HiiDrawImage (
                                   allocated to hold  the generated image and the\r
                                   pointer updated on exit. It is the caller's\r
                                   responsibility to free this buffer.\r
+  @param  BltX                    Specifies the offset from the left and top edge\r
+                                  of the  output image of the first pixel in the\r
+                                  image.\r
   @param  BltY                    Specifies the offset from the left and top edge\r
                                   of the  output image of the first pixel in the\r
                                   image.\r
@@ -892,8 +935,7 @@ HiiNewString (
   IN  CONST CHAR16                    *LanguageName, OPTIONAL\r
   IN  CONST EFI_STRING                String,\r
   IN  CONST EFI_FONT_INFO             *StringFontInfo OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -940,8 +982,7 @@ HiiGetString (
   OUT EFI_STRING                      String,\r
   IN  OUT UINTN                       *StringSize,\r
   OUT EFI_FONT_INFO                   **StringFontInfo OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -975,8 +1016,7 @@ HiiSetString (
   IN CONST CHAR8                      *Language,\r
   IN CONST EFI_STRING                 String,\r
   IN CONST EFI_FONT_INFO              *StringFontInfo OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1007,8 +1047,7 @@ HiiGetLanguages (
   IN EFI_HII_HANDLE                   PackageList,\r
   IN OUT CHAR8                        *Languages,\r
   IN OUT UINTN                        *LanguagesSize\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1025,7 +1064,7 @@ HiiGetLanguages (
                                   FirstLanguage. If there are no secondary\r
                                   languages, the function  returns successfully,\r
                                   but this is set to NULL.\r
-  @param  SecondaryLanguageSize   On entry, points to the size of the buffer\r
+  @param  SecondaryLanguagesSize  On entry, points to the size of the buffer\r
                                   pointed to  by SecondLanguages, in bytes. On\r
                                   return, points to the length of SecondLanguages\r
                                   in bytes.\r
@@ -1048,10 +1087,9 @@ HiiGetSecondaryLanguages (
   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
+  IN OUT CHAR8                       *SecondaryLanguages,\r
+  IN OUT UINTN                       *SecondaryLanguagesSize\r
+  );\r
 \r
 //\r
 // EFI_HII_DATABASE_PROTOCOL protocol interfaces\r
@@ -1084,8 +1122,7 @@ HiiNewPackageList (
   IN CONST EFI_HII_PACKAGE_LIST_HEADER  *PackageList,\r
   IN CONST EFI_HANDLE                   DriverHandle,\r
   OUT EFI_HII_HANDLE                    *Handle\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1108,8 +1145,7 @@ EFIAPI
 HiiRemovePackageList (\r
   IN CONST EFI_HII_DATABASE_PROTOCOL    *This,\r
   IN EFI_HII_HANDLE                     Handle\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1136,8 +1172,7 @@ HiiUpdatePackageList (
   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
 \r
 \r
 /**\r
@@ -1182,8 +1217,7 @@ HiiListPackageLists (
   IN  CONST EFI_GUID                    *PackageGuid,\r
   IN  OUT UINTN                         *HandleBufferLength,\r
   OUT EFI_HII_HANDLE                    *Handle\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1220,8 +1254,7 @@ HiiExportPackageLists (
   IN  EFI_HII_HANDLE                    Handle,\r
   IN  OUT UINTN                         *BufferSize,\r
   OUT EFI_HII_PACKAGE_LIST_HEADER       *Buffer\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1269,8 +1302,7 @@ HiiRegisterPackageNotify (
   IN  CONST EFI_HII_DATABASE_NOTIFY     PackageNotifyFn,\r
   IN  EFI_HII_DATABASE_NOTIFY_TYPE      NotifyType,\r
   OUT EFI_HANDLE                        *NotifyHandle\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1278,7 +1310,7 @@ HiiRegisterPackageNotify (
 \r
   @param  This                    A pointer to the EFI_HII_DATABASE_PROTOCOL\r
                                   instance.\r
-  @param  NotifyHandle            The handle of the notification function being\r
+  @param  NotificationHandle      The handle of the notification function being\r
                                   unregistered.\r
 \r
   @retval EFI_SUCCESS             Notification is unregistered successfully.\r
@@ -1291,8 +1323,7 @@ EFIAPI
 HiiUnregisterPackageNotify (\r
   IN CONST EFI_HII_DATABASE_PROTOCOL    *This,\r
   IN EFI_HANDLE                         NotificationHandle\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1324,8 +1355,7 @@ HiiFindKeyboardLayouts (
   IN  CONST EFI_HII_DATABASE_PROTOCOL   *This,\r
   IN  OUT UINT16                        *KeyGuidBufferLength,\r
   OUT EFI_GUID                          *KeyGuidBuffer\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1356,8 +1386,7 @@ HiiGetKeyboardLayout (
   IN  CONST EFI_GUID                          *KeyGuid,\r
   IN OUT UINT16                         *KeyboardLayoutLength,\r
   OUT EFI_HII_KEYBOARD_LAYOUT           *KeyboardLayout\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1382,8 +1411,7 @@ EFIAPI
 HiiSetKeyboardLayout (\r
   IN CONST EFI_HII_DATABASE_PROTOCOL          *This,\r
   IN CONST EFI_GUID                           *KeyGuid\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1408,8 +1436,7 @@ HiiGetPackageListHandle (
   IN  CONST EFI_HII_DATABASE_PROTOCOL         *This,\r
   IN  EFI_HII_HANDLE                    PackageListHandle,\r
   OUT EFI_HANDLE                        *DriverHandle\r
-  )\r
-;\r
+  );\r
 \r
 //\r
 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces\r
@@ -1462,8 +1489,7 @@ HiiConfigRoutingExtractConfig (
   IN  CONST EFI_STRING                       Request,\r
   OUT EFI_STRING                             *Progress,\r
   OUT EFI_STRING                             *Results\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1492,8 +1518,7 @@ EFIAPI
 HiiConfigRoutingExportConfig (\r
   IN  CONST EFI_HII_CONFIG_ROUTING_PROTOCOL  *This,\r
   OUT EFI_STRING                             *Results\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1527,8 +1552,7 @@ HiiConfigRoutingRouteConfig (
   IN  CONST EFI_HII_CONFIG_ROUTING_PROTOCOL  *This,\r
   IN  CONST EFI_STRING                       Configuration,\r
   OUT EFI_STRING                             *Progress\r
-  )\r
-;\r
+  );\r
 \r
 \r
 \r
@@ -1580,8 +1604,7 @@ HiiBlockToConfig (
   IN  CONST UINTN                            BlockSize,\r
   OUT EFI_STRING                             *Config,\r
   OUT EFI_STRING                             *Progress\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1638,8 +1661,7 @@ HiiConfigToBlock (
   IN OUT UINT8                                 *Block,\r
   IN OUT UINTN                                 *BlockSize,\r
   OUT    EFI_STRING                            *Progress\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
@@ -1692,15 +1714,10 @@ HiiGetAltCfg (
   IN  CONST EFI_DEVICE_PATH_PROTOCOL           *DevicePath,\r
   IN  CONST UINT16                             *AltCfgId,\r
   OUT EFI_STRING                               *AltCfgResp\r
-  )\r
-;\r
-\r
+  );\r
 \r
 //\r
 // Global variables\r
 //\r
 extern EFI_EVENT gHiiKeyboardLayoutChanged;\r
-\r
-#include "R8Lib.h"\r
-\r
 #endif\r