]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update MdePkg/Include/Uefi according to code review comments.
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 20 Oct 2008 15:31:22 +0000 (15:31 +0000)
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 20 Oct 2008 15:31:22 +0000 (15:31 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6157 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Uefi/UefiBaseType.h
MdePkg/Include/Uefi/UefiGpt.h
MdePkg/Include/Uefi/UefiInternalFormRepresentation.h
MdePkg/Include/Uefi/UefiSpec.h

index d66d0c7f05b876dea80f0be11abc4d0c4443c7d9..0d681a3a4d954cfeba3200d76e2944c2a4fb703a 100644 (file)
@@ -1,5 +1,4 @@
 /** @file\r
-\r
   Defines data types and constants introduced in UEFI.\r
 \r
   Copyright (c) 2006 - 2008, Intel Corporation\r
 \r
 #include "Base.h"\r
 \r
+//\r
+// Basical data type definitions introduced in UEFI.\r
+//\r
+\r
+///\r
+/// 128-bit buffer containing a unique identifier value.\r
 ///\r
-/// Basical data type definitions introduced in UEFI.\r
-/// \r
 typedef GUID                      EFI_GUID;\r
-\r
 ///\r
 /// Function return status for EFI API\r
 ///\r
 typedef RETURN_STATUS             EFI_STATUS;\r
+///\r
+/// A collection of related interfaces.\r
+///\r
 typedef VOID                      *EFI_HANDLE;\r
-\r
+///\r
+/// Handle to an event structure.\r
+///\r
 typedef VOID                      *EFI_EVENT;\r
-\r
+///\r
+/// Task priority level.\r
+///\r
 typedef UINTN                     EFI_TPL;\r
-\r
-\r
+///\r
+/// Logical block address.\r
+///\r
 typedef UINT64                    EFI_LBA;\r
-\r
-\r
-typedef UINT16                    STRING_REF;\r
-\r
 typedef UINT64                    EFI_PHYSICAL_ADDRESS;\r
 typedef UINT64                    EFI_VIRTUAL_ADDRESS;\r
 \r
+typedef UINT16                    STRING_REF;\r
+\r
 ///\r
 /// EFI Time Abstraction:\r
-///  Year:       2000 - 20XX\r
+///  Year:       1998 - 20XX\r
 ///  Month:      1 - 12\r
 ///  Day:        1 - 31\r
 ///  Hour:       0 - 23\r
@@ -68,21 +76,31 @@ typedef struct {
 } EFI_TIME;\r
 \r
 \r
-//\r
-// Networking Definitions\r
-//\r
+///\r
+/// 4-byte buffer. An IPv4 internet protocol address.\r
+///\r
 typedef struct {\r
   UINT8 Addr[4];\r
 } EFI_IPv4_ADDRESS;\r
 \r
+///\r
+/// 16-byte buffer. An IPv6 internet protocol address\r
+///\r
 typedef struct {\r
   UINT8 Addr[16];\r
 } EFI_IPv6_ADDRESS;\r
 \r
+///\r
+/// 32-byte buffer containing a network Media Access Control address.\r
+///\r
 typedef struct {\r
   UINT8 Addr[32];\r
 } EFI_MAC_ADDRESS;\r
 \r
+///\r
+/// 16-byte buffer aligned on a 4-byte boundary.\r
+/// An IPv4 or IPv6 internet protocol address.\r
+///\r
 typedef union {\r
   UINT32            Addr[4];\r
   EFI_IPv4_ADDRESS  v4;\r
index f97030cf2283775e39fa58641dea9bd0e5526e0f..5ae762db079fe2277ac1742b2d6c661ccff67cec 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   EFI Guid Partition Table Format Definition.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation\r
+  Copyright (c) 2006 - 2008, 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
 #ifndef __UEFI_GPT_H__\r
 #define __UEFI_GPT_H__\r
 \r
+///\r
+/// The primary GUID Partition Table Header must be\r
+/// located in LBA 1 (i.e., the second logical block).\r
+///\r
 #define PRIMARY_PART_HEADER_LBA 1\r
 \r
 ///\r
@@ -52,14 +56,6 @@ typedef struct {
   CHAR16    PartitionName[36];\r
 } EFI_PARTITION_ENTRY;\r
 \r
-///\r
-/// GPT Partition Entry Status\r
-///\r
-typedef struct {\r
-  BOOLEAN OutOfRange;\r
-  BOOLEAN Overlap;\r
-} EFI_PARTITION_ENTRY_STATUS;\r
-\r
 #pragma pack()\r
 #endif\r
 \r
index 894a02d0354f84c04ab731d79e92700caeb5f543..2364d11422339b9285a2055117b12a80310353a3 100644 (file)
@@ -32,45 +32,31 @@ typedef UINT16  EFI_QUESTION_ID;
 typedef UINT16  EFI_STRING_ID;\r
 typedef UINT16  EFI_FORM_ID;\r
 typedef UINT16  EFI_VARSTORE_ID;\r
+\r
 typedef UINT16  EFI_DEFAULT_ID;\r
+\r
 typedef UINT32  EFI_HII_FONT_STYLE;\r
 \r
 \r
 \r
 #pragma pack(1)\r
 \r
+//\r
+// Definitions for Package Lists and Package Headers\r
+// Section 27.3.1\r
+//\r
 \r
 ///\r
-/// HII package list\r
+/// The header found at the start of each package list.\r
 ///\r
 typedef struct {\r
   EFI_GUID               PackageListGuid;\r
   UINT32                 PackageLength;\r
 } EFI_HII_PACKAGE_LIST_HEADER;\r
 \r
-/**\r
-    \r
-  Each package starts with a header, as defined above, which  \r
-  indicates the size and type of the package. When added to a  \r
-  pointer pointing to the start of the header, Length points at  \r
-  the next package. The package lists form a package list when  \r
-  concatenated together and terminated with an  \r
-  EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The  \r
-  type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII  \r
-  packages, whose contents are determined by the Guid. The range  \r
-  of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN  \r
-  through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system  \r
-  firmware implementers.  \r
-  \r
-  @param Length The size of the package in bytes.\r
-  \r
-  @param Type   The package type. See EFI_HII_PACKAGE_TYPE_x,\r
-                below.\r
-  \r
-  @param Data   The package data, the format of which is\r
-                determined by Type.\r
-  \r
-**/\r
+///\r
+/// The header found at the start of each package.\r
+///\r
 typedef struct {\r
   UINT32  Length:24;\r
   UINT32  Type:8;\r
@@ -78,7 +64,7 @@ typedef struct {
 } EFI_HII_PACKAGE_HEADER;\r
 \r
 //\r
-// EFI_HII_PACKAGE_TYPE_x.\r
+// Value of HII package type\r
 // \r
 #define EFI_HII_PACKAGE_TYPE_ALL             0x00\r
 #define EFI_HII_PACKAGE_TYPE_GUID            0x01\r
@@ -94,16 +80,17 @@ typedef struct {
 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END      0xFF\r
 \r
 //\r
-// Simplified Font Package\r
+// Definitions for Simplified Font Package\r
+// Section 27.3.2\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
+#define EFI_GLYPH_HEIGHT                     19\r
+#define EFI_GLYPH_WIDTH                      8\r
 \r
 typedef struct {\r
   CHAR16                 UnicodeWeight;\r
@@ -119,7 +106,10 @@ typedef struct {
   UINT8                  Pad[3];\r
 } EFI_WIDE_GLYPH;\r
 \r
-\r
+///\r
+/// A simplified font package consists of a font header\r
+/// followed by a series of glyph structures.\r
+///\r
 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {\r
   EFI_HII_PACKAGE_HEADER Header;\r
   UINT16                 NumberOfNarrowGlyphs;\r
@@ -129,9 +119,13 @@ typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR;\r
 \r
 //\r
-// Font Package\r
+// Definitions for Font Package\r
+// Section 27.3.3\r
 //\r
 \r
+//\r
+// Value for font style\r
+//\r
 #define EFI_HII_FONT_STYLE_NORMAL            0x00000000\r
 #define EFI_HII_FONT_STYLE_BOLD              0x00000001\r
 #define EFI_HII_FONT_STYLE_ITALIC            0x00000002\r
@@ -149,6 +143,12 @@ typedef struct _EFI_HII_GLYPH_INFO {
   INT16                  AdvanceX;\r
 } EFI_HII_GLYPH_INFO;\r
 \r
+///\r
+/// The fixed header consists of a standard record header and\r
+/// then the character values in this section, the flags\r
+/// (including the encoding method) and the offsets of the glyph\r
+/// information, the glyph bitmaps and the character map.\r
+///\r
 typedef struct _EFI_HII_FONT_PACKAGE_HDR {\r
   EFI_HII_PACKAGE_HEADER Header;\r
   UINT32                 HdrSize;\r
@@ -158,6 +158,9 @@ typedef struct _EFI_HII_FONT_PACKAGE_HDR {
   CHAR16                 FontFamily[1];\r
 } EFI_HII_FONT_PACKAGE_HDR;\r
 \r
+//\r
+// Value of different glyph info block types\r
+//\r
 #define EFI_HII_GIBT_END                  0x00\r
 #define EFI_HII_GIBT_GLYPH                0x10\r
 #define EFI_HII_GIBT_GLYPHS               0x11\r
@@ -175,6 +178,10 @@ typedef struct _EFI_HII_GLYPH_BLOCK {
   UINT8                  BlockType;\r
 } EFI_HII_GLYPH_BLOCK;\r
 \r
+//\r
+// Definition of different glyph info block types\r
+//\r
+\r
 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK {\r
   EFI_HII_GLYPH_BLOCK    Header;\r
   EFI_HII_GLYPH_INFO     Cell;\r
@@ -210,25 +217,25 @@ typedef struct _EFI_HII_GIBT_EXT4_BLOCK {
 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
+  UINT8                  BitmapData[1];\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
+  UINT8                  BitmapData[1];\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
+  UINT8                  BitmapData[1];\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
+  UINT8                  BitmapData[1];\r
 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;\r
 \r
 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {\r
@@ -242,16 +249,27 @@ typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {
 } EFI_HII_GIBT_SKIP2_BLOCK;\r
 \r
 //\r
-// Device Path Package\r
+// Definitions for Device Path Package\r
+// Section 27.3.4\r
 //\r
+\r
+///\r
+/// The device path package is used to carry a device path\r
+/// associated with the package list.\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
+// Definitions for GUID Package\r
+// Section 27.3.5\r
 //\r
+\r
+///\r
+/// The GUID package is used to carry data where the format is defined by a GUID.\r
+///\r
 typedef struct _EFI_HII_GUID_PACKAGE_HDR {\r
   EFI_HII_PACKAGE_HEADER  Header;\r
   EFI_GUID                Guid;\r
@@ -259,12 +277,17 @@ typedef struct _EFI_HII_GUID_PACKAGE_HDR {
 } EFI_HII_GUID_PACKAGE_HDR;\r
 \r
 //\r
-// String Package\r
+// Definitions for String Package\r
+// Section 27.3.6\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
+#define UEFI_CONFIG_LANG2 L"x-i-UEFI"\r
 \r
+///\r
+/// The fixed header consists of a standard record header and then the string identifiers\r
+/// contained in this section and the offsets of the string and language information.\r
+///\r
 typedef struct _EFI_HII_STRING_PACKAGE_HDR {\r
   EFI_HII_PACKAGE_HEADER  Header;\r
   UINT32                  HdrSize;\r
@@ -278,6 +301,9 @@ typedef struct {
   UINT8                   BlockType;\r
 } EFI_HII_STRING_BLOCK;\r
 \r
+//\r
+// Value of different string information block types\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
@@ -295,6 +321,10 @@ typedef struct {
 #define EFI_HII_SIBT_EXT4                    0x32\r
 #define EFI_HII_SIBT_FONT                    0x40\r
 \r
+//\r
+// Definition of different string information block types\r
+//\r
+\r
 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {\r
   EFI_HII_STRING_BLOCK    Header;\r
   EFI_STRING_ID           StringId;\r
@@ -389,7 +419,8 @@ typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK {
 } EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK;\r
 \r
 //\r
-// Image Packages\r
+// Definitions for Image Package\r
+// Section 27.3.7\r
 //\r
 \r
 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {\r
@@ -402,6 +433,9 @@ typedef struct _EFI_HII_IMAGE_BLOCK {
   UINT8                   BlockType;\r
 } EFI_HII_IMAGE_BLOCK;\r
 \r
+//\r
+// Value of different image information block types\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
@@ -419,6 +453,10 @@ typedef struct _EFI_HII_IMAGE_BLOCK {
 #define EFI_HII_IIBT_EXT2              0x31\r
 #define EFI_HII_IIBT_EXT4              0x32\r
 \r
+//\r
+// Definition of different image information block types\r
+//\r
+\r
 typedef struct _EFI_HII_IIBT_END_BLOCK {\r
   EFI_HII_IMAGE_BLOCK          Header;\r
 } EFI_HII_IIBT_END_BLOCK;\r
@@ -538,6 +576,10 @@ typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
   UINT16                       SkipCount;\r
 } EFI_HII_IIBT_SKIP2_BLOCK;\r
 \r
+//\r
+// Definitions for Palette Information\r
+//\r
+\r
 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {\r
   UINT16                       PaletteCount;\r
 } EFI_HII_IMAGE_PALETTE_INFO_HEADER;\r
@@ -548,9 +590,13 @@ typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
 } EFI_HII_IMAGE_PALETTE_INFO;\r
 \r
 //\r
-// Forms Package\r
+// Definitions for Forms Package\r
+// Section 27.3.8\r
 //\r
 \r
+///\r
+/// The Forms package is used to carry forms-based encoding data.\r
+///\r
 typedef struct _EFI_HII_FORM_PACKAGE {\r
   EFI_HII_PACKAGE_HEADER       Header;\r
   // EFI_IFR_OP_HEADER         OpCodeHeader;\r
@@ -672,6 +718,10 @@ typedef union {
 #define EFI_IFR_CATENATE_OP            0x5E\r
 #define EFI_IFR_GUID_OP                0x5F\r
 \r
+//\r
+// Definitions of IFR Standard Headers\r
+// Section 27.3.8.2\r
+//\r
 \r
 typedef struct _EFI_IFR_OP_HEADER {\r
   UINT8                    OpCode;\r
@@ -695,17 +745,27 @@ typedef struct _EFI_IFR_QUESTION_HEADER {
   UINT8                    Flags;\r
 } EFI_IFR_QUESTION_HEADER;\r
 \r
+//\r
+// Flag values of 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
+//\r
+// Definition for Opcode Reference\r
+// Section 27.3.8.3\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
+//\r
+// Default Identifier of default store \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
@@ -855,6 +915,9 @@ typedef struct _EFI_IFR_DATE {
   UINT8                    Flags;\r
 } EFI_IFR_DATE;\r
 \r
+//\r
+// Flags that describe the behavior of the question.\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
@@ -894,16 +957,19 @@ typedef struct _EFI_IFR_NUMERIC {
   MINMAXSTEP_DATA          data;\r
 } EFI_IFR_NUMERIC;\r
 \r
+//\r
+// Flags related to the numeric question\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
+#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
+#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
@@ -945,14 +1011,17 @@ typedef struct _EFI_IFR_TIME {
   UINT8                    Flags;\r
 } EFI_IFR_TIME;\r
 \r
+//\r
+// A bit-mask that determines which unique settings are active for this opcode.\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
+#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
@@ -994,6 +1063,9 @@ typedef struct _EFI_IFR_ONE_OF_OPTION {
   EFI_IFR_TYPE_VALUE       Value;\r
 } EFI_IFR_ONE_OF_OPTION;\r
 \r
+//\r
+// Types of the option's value.\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
@@ -1036,11 +1108,6 @@ typedef struct _EFI_IFR_EQ_ID_LIST {
   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
@@ -1051,10 +1118,6 @@ typedef struct _EFI_IFR_UINT16 {
   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
@@ -1065,6 +1128,15 @@ typedef struct _EFI_IFR_UINT64 {
   UINT64 Value;\r
 } EFI_IFR_UINT64;\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_QUESTION_REF2 {\r
+  EFI_IFR_OP_HEADER        Header;\r
+} EFI_IFR_QUESTION_REF2;\r
+\r
 typedef struct _EFI_IFR_QUESTION_REF3 {\r
   EFI_IFR_OP_HEADER        Header;\r
 } EFI_IFR_QUESTION_REF3;\r
@@ -1142,11 +1214,23 @@ typedef struct _EFI_IFR_TO_BOOLEAN {
   EFI_IFR_OP_HEADER        Header;\r
 } EFI_IFR_TO_BOOLEAN;\r
 \r
+//\r
+// For EFI_IFR_TO_STRING, when converting from\r
+// unsigned integers, these flags control the format:\r
+// 0 = unsigned decimal\r
+// 1 = signed decimal\r
+// 2 = hexadecimal (lower-case alpha)\r
+// 3 = hexadecimal (upper-case alpha)\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
+//\r
+// When converting from a buffer, these flags control the format:\r
+// 0 = ASCII\r
+// 8 = Unicode\r
+//\r
 #define EFI_IFR_STRING_ASCII             0\r
 #define EFI_IFR_STRING_UNICODE           8\r
 \r
@@ -1247,6 +1331,9 @@ typedef struct _EFI_IFR_CONDITIONAL {
   EFI_IFR_OP_HEADER        Header;\r
 } EFI_IFR_CONDITIONAL;\r
 \r
+//\r
+// Flags governing the matching criteria of EFI_IFR_FIND\r
+//\r
 #define EFI_IFR_FF_CASE_SENSITIVE    0x00\r
 #define EFI_IFR_FF_CASE_INSENSITIVE  0x01\r
 \r
@@ -1263,6 +1350,10 @@ typedef struct _EFI_IFR_TOKEN {
   EFI_IFR_OP_HEADER        Header;\r
 } EFI_IFR_TOKEN;\r
 \r
+//\r
+// Flags specifying whether to find the first matching string\r
+// or the first non-matching string.\r
+//\r
 #define EFI_IFR_FLAGS_FIRST_MATCHING     0x00\r
 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01\r
 \r
@@ -1272,7 +1363,9 @@ typedef struct _EFI_IFR_SPAN {
 } EFI_IFR_SPAN;\r
 \r
 //\r
-// Keyboard Package\r
+// Definitions for Keyboard Package\r
+// Section 27.3.9\r
+// Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL\r
 //\r
 \r
 typedef enum {    \r
index 40e38d58d27e6ec91cff399e89a97faf2f55c80f..73b8c014e179467952658bcf151f22d7966f5ce9 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
-  Include file that supportes UEFI.\r
+  Include file that supports UEFI.\r
 \r
-  This include file must only contain things defined in the UEFI 2.0 specification.\r
-  If a code construct is defined in the UEFI 2.0 specification it must be included\r
+  This include file must only contain things defined in the UEFI 2.1 specification.\r
+  If a code construct is defined in the UEFI 2.1 specification it must be included\r
   by this include file.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation\r
+  Copyright (c) 2006 - 2008, 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
@@ -47,27 +47,32 @@ typedef enum {
 #define EFI_UNSPECIFIED_TIMEZONE  0x07FF\r
 \r
 //\r
-// possible caching types for the memory range\r
+// Memory cacheability attributes\r
 //\r
 #define EFI_MEMORY_UC   0x0000000000000001ULL\r
 #define EFI_MEMORY_WC   0x0000000000000002ULL\r
 #define EFI_MEMORY_WT   0x0000000000000004ULL\r
 #define EFI_MEMORY_WB   0x0000000000000008ULL\r
 #define EFI_MEMORY_UCE  0x0000000000000010ULL\r
-\r
 //\r
-// physical memory protection on range\r
+// Physical memory protection attributes\r
 //\r
 #define EFI_MEMORY_WP   0x0000000000001000ULL\r
 #define EFI_MEMORY_RP   0x0000000000002000ULL\r
 #define EFI_MEMORY_XP   0x0000000000004000ULL\r
+//\r
+// Runtime memory attribute\r
+//\r
+#define EFI_MEMORY_RUNTIME  0x8000000000000000ULL\r
 \r
 ///\r
-/// range requires a runtime mapping\r
+/// Memory descriptor version number\r
 ///\r
-#define EFI_MEMORY_RUNTIME  0x8000000000000000ULL\r
-\r
 #define EFI_MEMORY_DESCRIPTOR_VERSION 1\r
+\r
+///\r
+/// Definition of memory descriptor\r
+///\r
 typedef struct {\r
   UINT32                Type;\r
   EFI_PHYSICAL_ADDRESS  PhysicalStart;\r
@@ -137,6 +142,10 @@ EFI_STATUS
   Returns the current memory map.\r
 \r
   @param  MemoryMapSize         A pointer to the size, in bytes, of the MemoryMap buffer.\r
+                                On input, this is the size of the buffer allocated by the caller.\r
+                                On output, it is the size of the buffer returned by the firmware if\r
+                                the buffer was large enough, or the size of the buffer needed to contain\r
+                                the map if the buffer was too small.\r
   @param  MemoryMap             A pointer to the buffer in which firmware places the current memory\r
                                 map.\r
   @param  MapKey                A pointer to the location in which firmware returns the key for the\r
@@ -265,14 +274,20 @@ EFI_STATUS
 \r
   @param  ControllerHandle      The handle of the controller from which driver(s) are to be disconnected.\r
   @param  DriverImageHandle     The driver to disconnect from ControllerHandle.\r
+                                If DriverImageHandle is NULL, then all the drivers currently managing\r
+                                ControllerHandle are disconnected from ControllerHandle.\r
   @param  ChildHandle           The handle of the child to destroy.\r
+                                If ChildHandle is NULL, then all the children of ControllerHandle are\r
+                                destroyed before the drivers are disconnected from ControllerHandle.\r
 \r
   @retval EFI_SUCCESS           1) One or more drivers were disconnected from the controller.\r
                                 2) On entry, no drivers are managing ControllerHandle.\r
                                 3) DriverImageHandle is not NULL, and on entry\r
                                    DriverImageHandle is not managing ControllerHandle.\r
-\r
-  @retval EFI_INVALID_PARAMETER One ore more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER 1) ControllerHandle is not a valid EFI_HANDLE.\r
+                                2) DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.\r
+                                3) ChildHandle is not NULL, and it is not a valid EFI_HANDLE.\r
+                                4) DriverImageHandle does not support the EFI_DRIVER_BINDING_PROTOCOL.\r
   @retval EFI_OUT_OF_RESOURCES  There are not enough resources available to disconnect any drivers from\r
                                 ControllerHandle.\r
   @retval EFI_DEVICE_ERROR      The controller could not be disconnected because of a device error.\r
@@ -357,7 +372,7 @@ VOID
   Creates an event.\r
 \r
   @param  Type                  The type of event to create and its mode and attributes.\r
-  @param  NotifyTpl             Pointer to the notification function's context.\r
+  @param  NotifyTpl             The task priority level of event notifications, if needed.\r
   @param  NotifyFunction        Pointer to the event's notification function, if any.\r
   @param  NotifyContext         Pointer to the notification function's context; corresponds to parameter\r
                                 Context in the notification function.\r
@@ -383,11 +398,13 @@ EFI_STATUS
   Creates an event in a group.\r
 \r
   @param  Type                  The type of event to create and its mode and attributes.\r
-  @param  NotifyTpl             Pointer to the notification function's context.\r
+  @param  NotifyTpl             The task priority level of event notifications,if needed.\r
   @param  NotifyFunction        Pointer to the event's notification function, if any.\r
   @param  NotifyContext         Pointer to the notification function's context; corresponds to parameter\r
                                 Context in the notification function.\r
   @param  EventGroup            Pointer to the unique identifier of the group to which this event belongs.\r
+                                If this is NULL, then the function behaves as if the parameters were passed\r
+                                to CreateEvent.\r
   @param  Event                 Pointer to the newly created event if the call succeeds; undefined\r
                                 otherwise.\r
 \r
@@ -400,13 +417,16 @@ typedef
 EFI_STATUS\r
 (EFIAPI *EFI_CREATE_EVENT_EX)(\r
   IN       UINT32                 Type,\r
-  IN       EFI_TPL                NotifyTpl      OPTIONAL,\r
+  IN       EFI_TPL                NotifyTpl,\r
   IN       EFI_EVENT_NOTIFY       NotifyFunction OPTIONAL,\r
   IN CONST VOID                   *NotifyContext OPTIONAL,\r
   IN CONST EFI_GUID               *EventGroup    OPTIONAL,\r
   OUT      EFI_EVENT              *Event\r
   );\r
 \r
+///\r
+/// Timer delay types\r
+///\r
 typedef enum {\r
   TimerCancel,\r
   TimerPeriodic,\r
@@ -419,6 +439,11 @@ typedef enum {
   @param  Event                 The timer event that is to be signaled at the specified time.\r
   @param  Type                  The type of time that is specified in TriggerTime.\r
   @param  TriggerTime           The number of 100ns units until the timer expires.\r
+                                A TriggerTime of 0 is legal.\r
+                                If Type is TimerRelative and TriggerTime is 0, then the timer\r
+                                event will be signaled on the next timer tick.\r
+                                If Type is TimerPeriodic and TriggerTime is 0, then the timer\r
+                                event will be signaled on every timer tick.\r
 \r
   @retval EFI_SUCCESS           The event has been set to be signaled at the requested time.\r
   @retval EFI_INVALID_PARAMETER Event or Type is not valid.\r
@@ -500,7 +525,7 @@ EFI_STATUS
 \r
 \r
 //\r
-// Task priority level (name defined in spec).\r
+// Task priority level\r
 //\r
 #define TPL_APPLICATION       4\r
 #define TPL_CALLBACK          8\r
@@ -513,7 +538,7 @@ EFI_STATUS
 \r
   @param  NewTpl                The new task priority level.\r
 \r
-  @retval                       Previous task priority level\r
+  @return Previous task priority level\r
 \r
 **/\r
 typedef\r
@@ -525,7 +550,7 @@ EFI_TPL
 /**\r
   Restores a task's priority level to its previous value.\r
 \r
-  @param  OldTpl                The previous task priority level to restore\r
+  @param  OldTpl                The previous task priority level to restore.\r
 \r
 **/\r
 typedef\r
@@ -546,11 +571,15 @@ VOID
                                 On output the size of data returned in Data.\r
   @param  Data                  The buffer to return the contents of the variable.\r
 \r
-  @retval EFI_SUCCESS           The function completed successfully.\r
-  @retval EFI_NOT_FOUND         The variable was not found.\r
-  @retval EFI_BUFFER_TOO_SMALL  The DataSize is too small for the result.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-  @retval EFI_DEVICE_ERROR      The variable could not be retrieved due to a hardware error.\r
+  @retval EFI_SUCCESS            The function completed successfully.\r
+  @retval EFI_NOT_FOUND          The variable was not found.\r
+  @retval EFI_BUFFER_TOO_SMALL   The DataSize is too small for the result.\r
+  @retval EFI_INVALID_PARAMETER  VariableName is NULL.\r
+  @retval EFI_INVALID_PARAMETER  VendorGuid is NULL.\r
+  @retval EFI_INVALID_PARAMETER  DataSize is NULL.\r
+  @retval EFI_INVALID_PARAMETER  The DataSize is not too small and Data is NULL.\r
+  @retval EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.\r
+  @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.\r
 \r
 **/\r
 typedef\r
@@ -577,7 +606,9 @@ EFI_STATUS
   @retval EFI_SUCCESS           The function completed successfully.\r
   @retval EFI_NOT_FOUND         The next variable was not found.\r
   @retval EFI_BUFFER_TOO_SMALL  The VariableNameSize is too small for the result.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER VariableNameSize is NULL.\r
+  @retval EFI_INVALID_PARAMETER VariableName is NULL.\r
+  @retval EFI_INVALID_PARAMETER VendorGuid is NULL.\r
   @retval EFI_DEVICE_ERROR      The variable could not be retrieved due to a hardware error.\r
 \r
 **/\r
@@ -599,12 +630,17 @@ EFI_STATUS
   @param  DataSize              The size in bytes of the Data buffer.\r
   @param  Data                  The contents for the variable.\r
 \r
-  @retval EFI_SUCCESS           The firmware has successfully stored the variable and its data as\r
-                                defined by the Attributes.\r
-  @retval EFI_WRITE_PROTECTED   The variable in question is read-only.\r
-  @retval EFI_OUT_OF_RESOURCES  Not enough storage is available to hold the variable and its data.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
-  @retval EFI_DEVICE_ERROR      The variable could not be retrieved due to a hardware error.\r
+  @retval EFI_SUCCESS            The firmware has successfully stored the variable and its data as\r
+                                 defined by the Attributes.\r
+  @retval EFI_INVALID_PARAMETER  An invalid combination of attribute bits was supplied, or the\r
+                                 DataSize exceeds the maximum allowed.\r
+  @retval EFI_INVALID_PARAMETER  VariableName is an empty Unicode string.\r
+  @retval EFI_OUT_OF_RESOURCES   Not enough storage is available to hold the variable and its data.\r
+  @retval EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.\r
+  @retval EFI_WRITE_PROTECTED    The variable in question is read-only.\r
+  @retval EFI_WRITE_PROTECTED    The variable in question cannot be deleted.\r
+  @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.\r
+  @retval EFI_NOT_FOUND          The variable trying to be updated or deleted was not found.\r
 \r
 **/\r
 typedef\r
@@ -618,10 +654,10 @@ EFI_STATUS
   );\r
 \r
 \r
-//\r
-// This provides the capabilities of the\r
-// real time clock device as exposed through the EFI interfaces.\r
-//\r
+///\r
+/// This provides the capabilities of the\r
+/// real time clock device as exposed through the EFI interfaces.\r
+///\r
 typedef struct {\r
   UINT32    Resolution;\r
   UINT32    Accuracy;\r
@@ -672,8 +708,11 @@ EFI_STATUS
   @param  Time                  The current alarm setting.\r
 \r
   @retval EFI_SUCCESS           The alarm settings were returned.\r
-  @retval EFI_INVALID_PARAMETER Any parameter is NULL.\r
+  @retval EFI_INVALID_PARAMETER Enabled is NULL.\r
+  @retval EFI_INVALID_PARAMETER Pending is NULL.\r
+  @retval EFI_INVALID_PARAMETER Time is NULL.\r
   @retval EFI_DEVICE_ERROR      The wakeup time could not be retrieved due to a hardware error.\r
+  @retval EFI_UNSUPPORTED       A wakeup timer is not supported on this platform.\r
 \r
 **/\r
 typedef\r
@@ -689,6 +728,7 @@ EFI_STATUS
 \r
   @param  Enabled               Enable or disable the wakeup alarm.\r
   @param  Time                  If Enable is TRUE, the time to set the wakeup alarm for.\r
+                                If Enable is FALSE, then this parameter is optional, and may be NULL.\r
 \r
   @retval EFI_SUCCESS           If Enable is TRUE, then the wakeup alarm was enabled. If\r
                                 Enable is FALSE, then the wakeup alarm was disabled.\r
@@ -705,13 +745,15 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  This is the declaration of an EFI image entry point. This can be the entry point to an application\r
-  written to this specification, an EFI boot service driver, or an EFI runtime driver.\r
+  This is the declaration of an EFI image entry point. This entry point is\r
+  the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including\r
+  both device drivers and bus drivers.\r
 \r
-  @param  ImageHandle           Handle that identifies the loaded image.\r
-  @param  SystemTable           System Table for this image.\r
+  @param  ImageHandle           The firmware allocated handle for the UEFI image.\r
+  @param  SystemTable           A pointer to the EFI System Table.\r
 \r
   @retval EFI_SUCCESS           The operation completed successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  The request could not be completed due to a lack of resources.\r
 \r
 **/\r
 typedef\r
@@ -729,16 +771,16 @@ EFI_STATUS
                                 FilePath as a boot selection. Ignored if SourceBuffer is\r
                                 not NULL.\r
   @param  ParentImageHandle     The caller's image handle.\r
-  @param  FilePath              The DeviceHandle specific file path from which the image is\r
+  @param  DevicePath            The DeviceHandle specific file path from which the image is\r
                                 loaded.\r
   @param  SourceBuffer          If not NULL, a pointer to the memory location containing a copy\r
                                 of the image to be loaded.\r
-  @param  SourceSize            The size in bytes of SourceBuffer.\r
+  @param  SourceSize            The size in bytes of SourceBuffer. Ignored if SourceBuffer is NULL.\r
   @param  ImageHandle           Pointer to the returned image handle that is created when the\r
                                 image is successfully loaded.\r
 \r
   @retval EFI_SUCCESS           Image was loaded into memory correctly.\r
-  @retval EFI_NOT_FOUND         Both SourceBuffer and FilePath are NULL.\r
+  @retval EFI_NOT_FOUND         Both SourceBuffer and DevicePath are NULL.\r
   @retval EFI_INVALID_PARAMETER One or more parametes are invalid.\r
   @retval EFI_UNSUPPORTED       The image type is not supported.\r
   @retval EFI_OUT_OF_RESOURCES  Image was not loaded due to insufficient resources.\r
@@ -752,7 +794,7 @@ EFI_STATUS
 (EFIAPI *EFI_IMAGE_LOAD)(\r
   IN  BOOLEAN                      BootPolicy,\r
   IN  EFI_HANDLE                   ParentImageHandle,\r
-  IN  EFI_DEVICE_PATH_PROTOCOL     *FilePath,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL     *DevicePath,\r
   IN  VOID                         *SourceBuffer OPTIONAL,\r
   IN  UINTN                        SourceSize,\r
   OUT EFI_HANDLE                   *ImageHandle\r
@@ -768,7 +810,7 @@ EFI_STATUS
 \r
   @retval EFI_INVALID_PARAMETER ImageHandle is either an invalid image handle or the image\r
                                 has already been initialized with StartImage\r
-  @retval Exit code from image  Exit code from image\r
+  @return Exit code from image\r
 \r
 **/\r
 typedef\r
@@ -811,7 +853,7 @@ EFI_STATUS
   @retval EFI_SUCCESS           The image has been unloaded.\r
   @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.\r
   @retval EFI_UNSUPPORTED       The image has been started, and does not support unload.\r
-  @retval                       Exit code from the image's unload handler\r
+  @return Exit code from the image's unload handler\r
 \r
 **/\r
 typedef\r
@@ -877,9 +919,9 @@ EFI_STATUS
   IN CHAR16                   *WatchdogData OPTIONAL\r
   );\r
 \r
-//\r
-// Enumeration of reset types.\r
-//\r
+///\r
+/// Enumeration of reset types.\r
+///\r
 typedef enum {\r
   EfiResetCold,\r
   EfiResetWarm,\r
@@ -949,7 +991,9 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS           The 32-bit CRC was computed for the data buffer and returned in\r
                                 Crc32.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER Data is NULL.\r
+  @retval EFI_INVALID_PARAMETER Crc32 is NULL.\r
+  @retval EFI_INVALID_PARAMETER DataSize is 0.\r
 \r
 **/\r
 typedef\r
@@ -1014,7 +1058,10 @@ typedef enum {
 \r
   @retval EFI_SUCCESS           The protocol interface was installed.\r
   @retval EFI_OUT_OF_RESOURCES  Space for a new handle could not be allocated.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER Handle is NULL.\r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
+  @retval EFI_INVALID_PARAMETER InterfaceType is not EFI_NATIVE_INTERFACE.\r
+  @retval EFI_INVALID_PARAMETER Protocol is already installed on the handle specified by Handle.\r
 \r
 **/\r
 typedef\r
@@ -1061,7 +1108,8 @@ EFI_STATUS
   @retval EFI_ACCESS_DENIED     The protocol interface could not be reinstalled,\r
                                 because OldInterface is still being used by a\r
                                 driver that will not release it.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
 \r
 **/\r
 typedef\r
@@ -1086,7 +1134,8 @@ EFI_STATUS
   @retval EFI_NOT_FOUND         The interface was not found.\r
   @retval EFI_ACCESS_DENIED     The interface was not removed because the interface\r
                                 is still being used by a driver.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
 \r
 **/\r
 typedef\r
@@ -1122,9 +1171,12 @@ EFI_STATUS
   @param  Protocol              The published unique identifier of the protocol.\r
   @param  Interface             Supplies the address where a pointer to the corresponding Protocol\r
                                 Interface is returned.\r
+\r
   @retval EFI_SUCCESS           The interface information for the specified protocol was returned.\r
   @retval EFI_UNSUPPORTED       The device does not support the specified protocol.\r
-  @retval EFI_INVALID_PARAMETER One of the protocol interfaces was not previously installed on Handle.\r
+  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
+  @retval EFI_INVALID_PARAMETER Interface is NULL.\r
 \r
 **/\r
 typedef\r
@@ -1174,9 +1226,9 @@ EFI_STATUS
 (EFIAPI *EFI_OPEN_PROTOCOL)(\r
   IN  EFI_HANDLE                Handle,\r
   IN  EFI_GUID                  *Protocol,\r
-  OUT VOID                      **Interface,\r
+  OUT VOID                      **Interface, OPTIONAL\r
   IN  EFI_HANDLE                AgentHandle,\r
-  IN  EFI_HANDLE                ControllerHandle, OPTIONAL\r
+  IN  EFI_HANDLE                ControllerHandle,\r
   IN  UINT32                    Attributes\r
   );\r
 \r
@@ -1187,15 +1239,16 @@ EFI_STATUS
   @param  Handle                The handle for the protocol interface that was previously opened\r
                                 with OpenProtocol(), and is now being closed.\r
   @param  Protocol              The published unique identifier of the protocol.\r
-  @param  Interface             Supplies the address where a pointer to the corresponding Protocol\r
-                                Interface is returned.\r
   @param  AgentHandle           The handle of the agent that is closing the protocol interface.\r
   @param  ControllerHandle      If the agent that opened a protocol is a driver that follows the\r
                                 UEFI Driver Model, then this parameter is the controller handle\r
                                 that required the protocol interface.\r
 \r
   @retval EFI_SUCCESS           The protocol instance was closed.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER 1) Handle is not a valid EFI_HANDLE.\r
+                                2) AgentHandle is not a valid EFI_HANDLE.\r
+                                3) ControllerHandle is not NULL and ControllerHandle is not a valid EFI_HANDLE.\r
+                                4) Protocol is NULL.\r
   @retval EFI_NOT_FOUND         1) Handle does not support the protocol specified by Protocol.\r
                                 2) The protocol interface specified by Handle and Protocol is not\r
                                    currently open by AgentHandle and ControllerHandle.\r
@@ -1238,7 +1291,7 @@ EFI_STATUS
 (EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION)(\r
   IN  EFI_HANDLE                          Handle,\r
   IN  EFI_GUID                            *Protocol,\r
-  IN  EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,\r
+  OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,\r
   OUT UINTN                               *EntryCount\r
   );\r
 \r
@@ -1257,7 +1310,10 @@ EFI_STATUS
                                 ProtocolBuffer. The number of protocol interface GUIDs was\r
                                 returned in ProtocolBufferCount.\r
   @retval EFI_OUT_OF_RESOURCES  There is not enough pool memory to store the results.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER Handle is NULL.\r
+  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER ProtocolBuffer is NULL.\r
+  @retval EFI_INVALID_PARAMETER ProtocolBufferCount is NULL.\r
 \r
 **/\r
 typedef\r
@@ -1278,7 +1334,9 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS           The notification event has been registered.\r
   @retval EFI_OUT_OF_RESOURCES  Space for the notification event could not be allocated.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
+  @retval EFI_INVALID_PARAMETER Event is NULL.\r
+  @retval EFI_INVALID_PARAMETER Registration is NULL.\r
 \r
 **/\r
 typedef\r
@@ -1311,7 +1369,11 @@ typedef enum {
   @retval EFI_SUCCESS           The array of handles was returned.\r
   @retval EFI_NOT_FOUND         No handles match the search.\r
   @retval EFI_BUFFER_TOO_SMALL  The BufferSize is too small for the result.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER SearchType is not a member of EFI_LOCATE_SEARCH_TYPE.\r
+  @retval EFI_INVALID_PARAMETER SearchType is ByRegisterNotify and SearchKey is NULL.\r
+  @retval EFI_INVALID_PARAMETER SearchType is ByProtocol and Protocol is NULL.\r
+  @retval EFI_INVALID_PARAMETER One or more matches are found and BufferSize is NULL.\r
+  @retval EFI_INVALID_PARAMETER BufferSize is large enough for the result and Buffer is NULL.\r
 \r
 **/\r
 typedef\r
@@ -1335,7 +1397,9 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS           The resulting handle was returned.\r
   @retval EFI_NOT_FOUND         No handles match the search.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER Protocol is NULL.\r
+  @retval EFI_INVALID_PARAMETER DevicePath is NULL.\r
+  @retval EFI_INVALID_PARAMETER A handle matched the search and Device is NULL.\r
 \r
 **/\r
 typedef\r
@@ -1371,7 +1435,8 @@ EFI_STATUS
   Returns an array of handles that support the requested protocol in a buffer allocated from pool.\r
 \r
   @param  SearchType            Specifies which handle(s) are to be returned.\r
-  @param  Protocol              Specifies the protocol to search by.\r
+  @param  Protocol              Provides the protocol to search by.\r
+                                This parameter is only valid for a SearchType of ByProtocol.\r
   @param  SearchKey             Supplies the search key depending on the SearchType.\r
   @param  NoHandles             The number of handles returned in Buffer.\r
   @param  Buffer                A pointer to the buffer to return the requested array of handles that\r
@@ -1381,7 +1446,8 @@ EFI_STATUS
                                 handles in Buffer was returned in NoHandles.\r
   @retval EFI_NOT_FOUND         No handles match the search.\r
   @retval EFI_OUT_OF_RESOURCES  There is not enough pool memory to store the matching results.\r
-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
+  @retval EFI_INVALID_PARAMETER NoHandles is NULL.\r
+  @retval EFI_INVALID_PARAMETER Buffer is NULL.\r
 \r
 **/\r
 typedef\r
@@ -1433,6 +1499,11 @@ typedef struct {
   UINT32            CapsuleImageSize;\r
 } EFI_CAPSULE_HEADER;\r
 \r
+//\r
+// The EFI System Table entry must point to an array of capsules\r
+// that contain the same CapsuleGuid value. The array must be\r
+// prefixed by a UINT32 that represents the size of the array of capsules.\r
+//\r
 typedef struct {\r
   UINT32   CapsuleArrayNumber;\r
   VOID*    CapsulePtr[1];\r
@@ -1461,6 +1532,8 @@ typedef struct {
                                 capsule has been successfully processed by the firmware.\r
   @retval EFI_DEVICE_ERROR      The capsule update was started, but failed due to a device error.\r
   @retval EFI_INVALID_PARAMETER CapsuleSize is NULL.\r
+  @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform.\r
+  @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to process the capsule.\r
 \r
 **/\r
 typedef\r
@@ -1487,6 +1560,7 @@ EFI_STATUS
   @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform, and\r
                                 MaximumCapsuleSize and ResetType are undefined.\r
   @retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL.\r
+  @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to process the query request.\r
 \r
 **/\r
 typedef\r
@@ -1543,7 +1617,13 @@ EFI_STATUS
 #define EFI_RUNTIME_SERVICES_SIGNATURE  0x56524553544e5552ULL\r
 #define EFI_RUNTIME_SERVICES_REVISION   EFI_2_10_SYSTEM_TABLE_REVISION\r
 \r
+///\r
+/// EFI Runtime Services Table\r
+///\r
 typedef struct {\r
+  ///\r
+  /// The table header for the EFI Runtime Services Table.\r
+  ///\r
   EFI_TABLE_HEADER                Hdr;\r
 \r
   //\r
@@ -1589,7 +1669,13 @@ typedef struct {
 #define EFI_BOOT_SERVICES_SIGNATURE   0x56524553544f4f42ULL\r
 #define EFI_BOOT_SERVICES_REVISION    EFI_2_10_SYSTEM_TABLE_REVISION\r
 \r
+///\r
+/// EFI Boot Services Table\r
+///\r
 typedef struct {\r
+  ///\r
+  /// The table header for the EFI Boot Services Table.\r
+  ///\r
   EFI_TABLE_HEADER                Hdr;\r
 \r
   //\r
@@ -1678,32 +1764,85 @@ typedef struct {
   //\r
   EFI_COPY_MEM                      CopyMem;\r
   EFI_SET_MEM                       SetMem;\r
-\r
   EFI_CREATE_EVENT_EX               CreateEventEx;\r
 } EFI_BOOT_SERVICES;\r
 \r
-//\r
-// Contains a set of GUID/pointer pairs comprised of the ConfigurationTable field in the\r
-// EFI System Table.\r
-//\r
+///\r
+/// Contains a set of GUID/pointer pairs comprised of the ConfigurationTable field in the\r
+/// EFI System Table.\r
+///\r
 typedef struct{\r
+  ///\r
+  /// The 128-bit GUID value that uniquely identifies the system configuration table.\r
+  ///\r
   EFI_GUID                          VendorGuid;\r
+  ///\r
+  /// A pointer to the table associated with VendorGuid.\r
+  ///\r
   VOID                              *VendorTable;\r
 } EFI_CONFIGURATION_TABLE;\r
 \r
+///\r
+/// EFI System Table\r
+///\r
 struct _EFI_SYSTEM_TABLE {\r
+  ///\r
+  /// The table header for the EFI System Table.\r
+  ///\r
   EFI_TABLE_HEADER                  Hdr;\r
+  ///\r
+  /// A pointer to a null terminated Unicode string that identifies\r
+  /// the vendor that produces the system firmware for the platform.\r
+  ///\r
   CHAR16                            *FirmwareVendor;\r
+  ///\r
+  /// A firmware vendor specific value that identifies the revision\r
+  /// of the system firmware for the platform.\r
+  ///\r
   UINT32                            FirmwareRevision;\r
+  ///\r
+  /// The handle for the active console input device.\r
+  ///\r
   EFI_HANDLE                        ConsoleInHandle;\r
+  ///\r
+  /// A pointer to the SIMPLE_INPUT_PROTOCOL interface that is\r
+  /// associated with ConsoleInHandle.\r
+  ///\r
   EFI_SIMPLE_TEXT_INPUT_PROTOCOL    *ConIn;\r
+  ///\r
+  /// The handle for the active console output device.\r
+  ///\r
   EFI_HANDLE                        ConsoleOutHandle;\r
+  ///\r
+  /// A pointer to the SIMPLE_TEXT_OUTPUT_PROTOCOL interface\r
+  /// that is associated with ConsoleOutHandle.\r
+  ///\r
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *ConOut;\r
+  ///\r
+  /// The handle for the active standard error console device.\r
+  ///\r
   EFI_HANDLE                        StandardErrorHandle;\r
+  ///\r
+  /// A pointer to the SIMPLE_TEXT_OUTPUT_PROTOCOL interface\r
+  /// that is associated with StandardErrorHandle.\r
+  ///\r
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *StdErr;\r
+  ///\r
+  /// A pointer to the EFI Runtime Services Table.\r
+  ///\r
   EFI_RUNTIME_SERVICES              *RuntimeServices;\r
+  ///\r
+  /// A pointer to the EFI Boot Services Table.\r
+  ///\r
   EFI_BOOT_SERVICES                 *BootServices;\r
+  ///\r
+  /// The number of system configuration tables in the buffer ConfigurationTable.\r
+  ///\r
   UINTN                             NumberOfTableEntries;\r
+  ///\r
+  /// A pointer to the system configuration tables.\r
+  /// The number of entries in the table is NumberOfTableEntries.\r
+  ///\r
   EFI_CONFIGURATION_TABLE           *ConfigurationTable;\r
 };\r
 \r
@@ -1733,7 +1872,7 @@ typedef union {
     UINT32  SysReqPessed    : 1;\r
     UINT32  Reserved        : 16;\r
     UINT32  InputKeyCount   : 2;\r
-  }       Options;\r
+  } Options;\r
   UINT32  PackedValue;\r
 } HOT_KEY_EFI_KEY_DATA;\r
 \r
@@ -1759,7 +1898,6 @@ typedef struct {
 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32    L"\\EFI\\BOOT\\BOOTIA32.EFI"\r
 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64    L"\\EFI\\BOOT\\BOOTIA64.EFI"\r
 #define EFI_REMOVABLE_MEDIA_FILE_NAME_X64     L"\\EFI\\BOOT\\BOOTX64.EFI"\r
-#define EFI_REMOVABLE_MEDIA_FILE_NAME_EBC     L"\\EFI\\BOOT\\BOOTEBC.EFI"\r
 \r
 #if   defined (MDE_CPU_IA32)\r
   #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_IA32\r
@@ -1768,7 +1906,6 @@ typedef struct {
 #elif defined (MDE_CPU_X64)\r
   #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_X64\r
 #elif defined (MDE_CPU_EBC)\r
-  #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_EBC\r
 #else\r
   #error Unknown Processor Type\r
 #endif\r