summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Include
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-27 04:53:43 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-27 04:53:43 +0000
commitebafc55b9241ed7c1feb9b7d6a633a4a6e02659c (patch)
tree288927958da000b61e43810c65dff99e18ff735e /MdeModulePkg/Include
parent9c83c97ac2fc79dcb97f14e708c9a9de6984846b (diff)
downloadedk2-platforms-ebafc55b9241ed7c1feb9b7d6a633a4a6e02659c.tar.xz
Add additional comments for structure definition.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6750 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Include')
-rw-r--r--MdeModulePkg/Include/Guid/Bmp.h12
-rw-r--r--MdeModulePkg/Include/Guid/BootState.h6
-rw-r--r--MdeModulePkg/Include/Guid/CapsuleVendor.h26
-rw-r--r--MdeModulePkg/Include/Guid/ConsoleInDevice.h2
-rw-r--r--MdeModulePkg/Include/Guid/ConsoleOutDevice.h2
-rw-r--r--MdeModulePkg/Include/Guid/HotPlugDevice.h2
-rw-r--r--MdeModulePkg/Include/Guid/MemoryTypeInformation.h4
-rw-r--r--MdeModulePkg/Include/Guid/OverrideVariable.h10
-rw-r--r--MdeModulePkg/Include/Guid/PeiPeCoffLoader.h34
-rw-r--r--MdeModulePkg/Include/Guid/PeiPerformanceHob.h12
-rw-r--r--MdeModulePkg/Include/Guid/ShellFile.h2
-rw-r--r--MdeModulePkg/Include/Guid/StandardErrorDevice.h2
-rw-r--r--MdeModulePkg/Include/Guid/SystemNvDataGuid.h26
-rw-r--r--MdeModulePkg/Include/Guid/VariableInfo.h27
-rw-r--r--MdeModulePkg/Include/Library/ExtendedIfrSupportLib.h6
-rw-r--r--MdeModulePkg/Include/MdeModuleHii.h165
-rw-r--r--MdeModulePkg/Include/VariableFormat.h118
-rw-r--r--MdeModulePkg/Include/WorkingBlockHeader.h32
18 files changed, 310 insertions, 178 deletions
diff --git a/MdeModulePkg/Include/Guid/Bmp.h b/MdeModulePkg/Include/Guid/Bmp.h
index 8a081d8a9c..0ab73790fb 100644
--- a/MdeModulePkg/Include/Guid/Bmp.h
+++ b/MdeModulePkg/Include/Guid/Bmp.h
@@ -1,6 +1,6 @@
/** @file
This file defines header data structures for BMP file and default
- GUID for BMP logo file.
+ FFS GUID Filename for BMP logo file.
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
@@ -16,10 +16,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef __BMP_GUID_H__
#define __BMP_GUID_H__
-
-//
-// Definitions for BMP files
-//
#pragma pack(1)
typedef struct {
@@ -38,10 +34,10 @@ typedef struct {
UINT32 HeaderSize;
UINT32 PixelWidth;
UINT32 PixelHeight;
- UINT16 Planes; // Must be 1
- UINT16 BitPerPixel; // 1, 4, 8, or 24
+ UINT16 Planes; /// Must be 1
+ UINT16 BitPerPixel; /// 1, 4, 8, or 24
UINT32 CompressionType;
- UINT32 ImageSize; // Compressed image size in bytes
+ UINT32 ImageSize; /// Compressed image size in bytes
UINT32 XPixelsPerMeter;
UINT32 YPixelsPerMeter;
UINT32 NumberOfColors;
diff --git a/MdeModulePkg/Include/Guid/BootState.h b/MdeModulePkg/Include/Guid/BootState.h
index 35faf603dc..d3a79ae915 100644
--- a/MdeModulePkg/Include/Guid/BootState.h
+++ b/MdeModulePkg/Include/Guid/BootState.h
@@ -1,5 +1,5 @@
/** @file
- This file defines variable name and GUID to record boot state.
+ This file defines variable name and variable GUID for boot state.
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
@@ -15,10 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef __BOOT_STATE_H__
#define __BOOT_STATE_H__
-//
-// BOOT STATE
-//
-
typedef UINT32 EFI_BOOT_STATE;
#define BOOT_STATE_VARIABLE_NAME L"BootState"
diff --git a/MdeModulePkg/Include/Guid/CapsuleVendor.h b/MdeModulePkg/Include/Guid/CapsuleVendor.h
index 6e7d8d1e92..5f7438dc46 100644
--- a/MdeModulePkg/Include/Guid/CapsuleVendor.h
+++ b/MdeModulePkg/Include/Guid/CapsuleVendor.h
@@ -17,27 +17,27 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef __EFI_CAPSULE_VENDOR_GUID_H__
#define __EFI_CAPSULE_VENDOR_GUID_H__
-//
-// Note -- This guid is used as a variable GUID (depending on implementation)
-// for the capsule variable if the capsule pointer is passes through reset
-// via a variable.
-//
+///
+/// This guid is used as a variable GUID (depending on implementation)
+/// for the capsule variable if the capsule pointer is passes through reset
+/// via a variable.
+///
#define EFI_CAPSULE_VENDOR_GUID \
{ 0x711C703F, 0xC285, 0x4B10, { 0xA3, 0xB0, 0x36, 0xEC, 0xBD, 0x3C, 0x8B, 0xE2 } }
-//
-// Name of capsule variable
-//
+///
+/// Name of capsule variable
+///
#define EFI_CAPSULE_VARIABLE_NAME L"CapsuleUpdateData"
extern EFI_GUID gEfiCapsuleVendorGuid;
-//
-// Data structure of capsule guid hob
-//
+///
+/// Data structure of capsule guid hob entry
+///
typedef struct {
- EFI_PHYSICAL_ADDRESS BaseAddress;
- UINT32 Length;
+ EFI_PHYSICAL_ADDRESS BaseAddress; /// Capsule data start address
+ UINT32 Length; /// Length of capsule data.
} CAPSULE_HOB_INFO;
#endif // #ifndef _EFI_CAPSULE_VENDOR_GUID_H_
diff --git a/MdeModulePkg/Include/Guid/ConsoleInDevice.h b/MdeModulePkg/Include/Guid/ConsoleInDevice.h
index 34ee24d73b..e40029a2a3 100644
--- a/MdeModulePkg/Include/Guid/ConsoleInDevice.h
+++ b/MdeModulePkg/Include/Guid/ConsoleInDevice.h
@@ -1,5 +1,5 @@
/** @file
- This guid is used to specifiy the device is the console in device.
+ This guid is used to specify the device is the console in device.
If the device is the console in device, this guid as the protocol guid
will be installed into this device handle.
diff --git a/MdeModulePkg/Include/Guid/ConsoleOutDevice.h b/MdeModulePkg/Include/Guid/ConsoleOutDevice.h
index 42dccd7a54..aabbd5edcd 100644
--- a/MdeModulePkg/Include/Guid/ConsoleOutDevice.h
+++ b/MdeModulePkg/Include/Guid/ConsoleOutDevice.h
@@ -1,5 +1,5 @@
/** @file
- This guid is used to specifiy the device is the console out device.
+ This guid is used to specify the device is the console out device.
If the device is the console out device, this guid as the protocol guid
will be installed into this device handle.
diff --git a/MdeModulePkg/Include/Guid/HotPlugDevice.h b/MdeModulePkg/Include/Guid/HotPlugDevice.h
index 2a18ad6abc..ae6ef46c93 100644
--- a/MdeModulePkg/Include/Guid/HotPlugDevice.h
+++ b/MdeModulePkg/Include/Guid/HotPlugDevice.h
@@ -1,5 +1,5 @@
/** @file
- This guid is used to specifiy the device is the hot plug device.
+ This guid is used to specify the device is the hot plug device.
If the device is the hot plug device, this guid as the protocol guid
will be installed into this device handle.
diff --git a/MdeModulePkg/Include/Guid/MemoryTypeInformation.h b/MdeModulePkg/Include/Guid/MemoryTypeInformation.h
index 7d88d628fe..f765349ab1 100644
--- a/MdeModulePkg/Include/Guid/MemoryTypeInformation.h
+++ b/MdeModulePkg/Include/Guid/MemoryTypeInformation.h
@@ -24,8 +24,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
extern EFI_GUID gEfiMemoryTypeInformationGuid;
typedef struct {
- UINT32 Type;
- UINT32 NumberOfPages;
+ UINT32 Type; /// EFI memory type defined in UEFI specification.
+ UINT32 NumberOfPages; /// The pages of this type memory.
} EFI_MEMORY_TYPE_INFORMATION;
#endif
diff --git a/MdeModulePkg/Include/Guid/OverrideVariable.h b/MdeModulePkg/Include/Guid/OverrideVariable.h
index ecfd94f182..e859621fe6 100644
--- a/MdeModulePkg/Include/Guid/OverrideVariable.h
+++ b/MdeModulePkg/Include/Guid/OverrideVariable.h
@@ -1,5 +1,5 @@
/** @file
- This guid is used for Platform Override Variable named L"PlatDriOver".
+ This file defines the platform override variable name and variable guid.
Copyright (c) 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -15,12 +15,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef __EFI_OVERRIDE_VARIABLE_GUID_H__
#define __EFI_OVERRIDE_VARIABLE_GUID_H__
-//
-// This guid is used for a platform driver override variable
-//
+///
+/// This guid is used for a platform driver override variable
+///
#define EFI_OVERRIDE_VARIABLE_GUID \
{ 0x8e3d4ad5, 0xf762, 0x438a, { 0xa1, 0xc1, 0x5b, 0x9f, 0xe6, 0x8c, 0x6b, 0x15 }}
+#define EFI_PLATFORM_OVERRIDE_VARIABLE_NAME L"PlatDriOver"
+
extern EFI_GUID gEfiOverrideVariableGuid;
diff --git a/MdeModulePkg/Include/Guid/PeiPeCoffLoader.h b/MdeModulePkg/Include/Guid/PeiPeCoffLoader.h
index b02cf49905..e92f9eaf3c 100644
--- a/MdeModulePkg/Include/Guid/PeiPeCoffLoader.h
+++ b/MdeModulePkg/Include/Guid/PeiPeCoffLoader.h
@@ -29,13 +29,17 @@ typedef struct _EFI_PEI_PE_COFF_LOADER_PROTOCOL EFI_PEI_PE_COFF_LOADER_PROTOCO
/**
Retrieves information about a PE/COFF image.
- Computes the PeCoffHeaderOffset, ImageAddress, ImageSize, DestinationAddress, CodeView,
- PdbPointer, RelocationsStripped, SectionAlignment, SizeOfHeaders, and DebugDirectoryEntryRva
- fields of the ImageContext structure. If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.
- If the PE/COFF image accessed through the ImageRead service in the ImageContext structure is not
- a supported PE/COFF image type, then return RETURN_UNSUPPORTED. If any errors occur while
- computing the fields of ImageContext, then the error status is returned in the ImageError field of
- ImageContext.
+ Computes the PeCoffHeaderOffset, IsTeImage, ImageType, ImageAddress, ImageSize,
+ DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and
+ DebugDirectoryEntryRva fields of the ImageContext structure.
+ If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.
+ If the PE/COFF image accessed through the ImageRead service in the ImageContext
+ structure is not a supported PE/COFF image type, then return RETURN_UNSUPPORTED.
+ If any errors occur while computing the fields of ImageContext,
+ then the error status is returned in the ImageError field of ImageContext.
+ If the image is a TE image, then SectionAlignment is set to 0.
+ The ImageRead and Handle fields of ImageContext structure must be valid prior
+ to invoking this service.
@param This Pointer to the EFI_PEI_PE_COFF_LOADER_PROTOCOL instance.
@param ImageContext Pointer to the image context structure that describes the PE/COFF
@@ -60,7 +64,9 @@ RETURN_STATUS
specified by the ImageAddress and ImageSize fields of ImageContext. The caller must allocate
the load buffer and fill in the ImageAddress and ImageSize fields prior to calling this function.
The EntryPoint, FixupDataSize, CodeView, and PdbPointer fields of ImageContext are computed.
- If ImageContext is NULL, then ASSERT().
+ The ImageRead, Handle, PeCoffHeaderOffset, IsTeImage, Machine, ImageType, ImageAddress, ImageSize,
+ DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and DebugDirectoryEntryRva
+ fields of the ImageContext structure must be valid prior to invoking this service.
@param This Pointer to the EFI_PEI_PE_COFF_LOADER_PROTOCOL instance.
@param ImageContext Pointer to the image context structure that describes the PE/COFF
@@ -90,7 +96,13 @@ RETURN_STATUS
If the DestinationAddress field of ImageContext is 0, then use the ImageAddress field of
ImageContext as the relocation base address. Otherwise, use the DestinationAddress field
of ImageContext as the relocation base address. The caller must allocate the relocation
- fixup log buffer and fill in the FixupData field of ImageContext prior to calling this function.
+ fixup log buffer and fill in the FixupData field of ImageContext prior to calling this function.
+
+ The ImageRead, Handle, PeCoffHeaderOffset, IsTeImage, Machine, ImageType, ImageAddress,
+ ImageSize, DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders,
+ DebugDirectoryEntryRva, EntryPoint, FixupDataSize, CodeView, PdbPointer, and FixupData of
+ the ImageContext structure must be valid prior to invoking this service.
+
If ImageContext is NULL, then ASSERT().
@param This Pointer to the EFI_PEI_PE_COFF_LOADER_PROTOCOL instance.
@@ -114,7 +126,9 @@ RETURN_STATUS
/**
Unloads a loaded PE/COFF image from memory and releases its taken resource.
-
+ Releases any environment specific resources that were allocated when the image
+ specified by ImageContext was loaded using PeCoffLoaderLoadImage().
+
For NT32 emulator, the PE/COFF image loaded by system needs to release.
For real platform, the PE/COFF image loaded by Core doesn't needs to be unloaded,
this function can simply return RETURN_SUCCESS.
diff --git a/MdeModulePkg/Include/Guid/PeiPerformanceHob.h b/MdeModulePkg/Include/Guid/PeiPerformanceHob.h
index 4cc82e8678..1ae7e03f89 100644
--- a/MdeModulePkg/Include/Guid/PeiPerformanceHob.h
+++ b/MdeModulePkg/Include/Guid/PeiPerformanceHob.h
@@ -30,18 +30,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
typedef struct {
EFI_PHYSICAL_ADDRESS Handle;
- CHAR8 Token[PEI_PERFORMANCE_STRING_SIZE];
- CHAR8 Module[PEI_PERFORMANCE_STRING_SIZE];
- UINT64 StartTimeStamp;
- UINT64 EndTimeStamp;
+ CHAR8 Token[PEI_PERFORMANCE_STRING_SIZE]; /// Measured token string name
+ CHAR8 Module[PEI_PERFORMANCE_STRING_SIZE]; /// Module string name
+ UINT64 StartTimeStamp; /// Start time point
+ UINT64 EndTimeStamp; /// End time point
} PEI_PERFORMANCE_LOG_ENTRY;
//
// The header must be aligned at 8 bytes.
//
typedef struct {
- UINT32 NumberOfEntries;
- UINT32 Reserved;
+ UINT32 NumberOfEntries; /// The number of all performance log entries
+ UINT32 Reserved;
} PEI_PERFORMANCE_LOG_HEADER;
diff --git a/MdeModulePkg/Include/Guid/ShellFile.h b/MdeModulePkg/Include/Guid/ShellFile.h
index c785b3ab0d..c51a5f20b9 100644
--- a/MdeModulePkg/Include/Guid/ShellFile.h
+++ b/MdeModulePkg/Include/Guid/ShellFile.h
@@ -1,5 +1,5 @@
/** @file
- This file defnies FFS GUID Filename for EFI Shell.
+ This file defines FFS GUID Filename for EFI Shell.
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
diff --git a/MdeModulePkg/Include/Guid/StandardErrorDevice.h b/MdeModulePkg/Include/Guid/StandardErrorDevice.h
index bacfefe051..95d6f269dd 100644
--- a/MdeModulePkg/Include/Guid/StandardErrorDevice.h
+++ b/MdeModulePkg/Include/Guid/StandardErrorDevice.h
@@ -1,5 +1,5 @@
/** @file
- This guid is used to specifiy the device is the StdErr device.
+ This guid is used to specify the device is the StdErr device.
If the device is the StdErr device, this guid as the protocol guid
will be installed into this device handle.
diff --git a/MdeModulePkg/Include/Guid/SystemNvDataGuid.h b/MdeModulePkg/Include/Guid/SystemNvDataGuid.h
index 137ed230a1..1f9e5e7987 100644
--- a/MdeModulePkg/Include/Guid/SystemNvDataGuid.h
+++ b/MdeModulePkg/Include/Guid/SystemNvDataGuid.h
@@ -1,6 +1,7 @@
/** @file
- This file defines GUIDs used for System Non Volatile HOB entries in the HOB list,
- and FV Guids that carrying the System specific information.
+ This file defines NvDataHob GUIDs for System Non Volatile HOB entries
+ in the HOB list and NV system hob entry structure.
+ It also defines NvDataFv GUID used as the signature of FTW working block header.
Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -22,17 +23,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define EFI_SYSTEM_NV_DATA_HOB_GUID \
{0xd6e5092d, 0xc7b2, 0x4872, {0xaf, 0x66, 0xfd, 0xc0, 0xe6, 0xf9, 0x5e, 0x78} }
+///
+/// Hob entry for NV data region
+///
typedef struct {
- EFI_GUID SystemNvDataHobGuid;
- EFI_GUID SystemNvDataFvGuid;
- EFI_LBA StartLba;
- UINTN StartLbaOffset;
- EFI_LBA EndLba;
- UINTN EndLbaOffset;
- UINT32 DataTypeSignature;
+ EFI_GUID SystemNvDataHobGuid; /// EFI_SYSTEM_NV_DATA_HOB_GUID
+ EFI_GUID SystemNvDataFvGuid; /// Guid specifies the NvData Fv for the specific purpose, such as FTW, Error Log.
+ EFI_LBA StartLba; /// The starting logical block index.
+ UINTN StartLbaOffset; /// Offset into the starting block at which to the start of NvData region.
+ EFI_LBA EndLba; /// The last logical block index.
+ UINTN EndLbaOffset; /// Offset into the last block at which to the end of Nvdata region.
+ UINT32 DataTypeSignature; /// NvData type in the specified NV range.
} NV_SYSTEM_DATA_GUID_TYPE;
extern EFI_GUID gEfiSystemNvDataHobGuid;
+
+///
+/// NvDataFv GUID used as the signature of FTW working block header.
+///
extern EFI_GUID gEfiSystemNvDataFvGuid;
#endif
diff --git a/MdeModulePkg/Include/Guid/VariableInfo.h b/MdeModulePkg/Include/Guid/VariableInfo.h
index e63224fd5b..45a7b87cb6 100644
--- a/MdeModulePkg/Include/Guid/VariableInfo.h
+++ b/MdeModulePkg/Include/Guid/VariableInfo.h
@@ -24,21 +24,20 @@ extern EFI_GUID gEfiVariableInfoGuid;
typedef struct _VARIABLE_INFO_ENTRY VARIABLE_INFO_ENTRY;
-//
-// This list gets put in the EFI system table. It is produced by the Variable driver at
-// Boot Services time and records read and write access to a given variable
-//
+///
+/// This list gets put in the EFI system table. It is produced by the Variable driver at
+/// Boot Services time and records read and write access to a given variable
+///
struct _VARIABLE_INFO_ENTRY {
- VARIABLE_INFO_ENTRY *Next;
- EFI_GUID VendorGuid;
- CHAR16 *Name;
- UINT32 Attributes;
- UINT32 ReadCount;
- UINT32 WriteCount;
- UINT32 DeleteCount;
- UINT32 CacheCount;
- BOOLEAN Volatile;
+ VARIABLE_INFO_ENTRY *Next; /// Pointer to next entry
+ EFI_GUID VendorGuid; /// Guid of Variable
+ CHAR16 *Name; /// Name of Variable
+ UINT32 Attributes; /// Attributes of variable defined in UEFI spec
+ UINT32 ReadCount; /// Times to read this variable
+ UINT32 WriteCount; /// Times to write this variable
+ UINT32 DeleteCount; /// Times to delete this variable
+ UINT32 CacheCount; /// Times that cache hits this variable
+ BOOLEAN Volatile; /// TRUE if volatile FALSE if non-volatile
};
-
#endif
diff --git a/MdeModulePkg/Include/Library/ExtendedIfrSupportLib.h b/MdeModulePkg/Include/Library/ExtendedIfrSupportLib.h
index feb27f1dc1..cbfa4f77b7 100644
--- a/MdeModulePkg/Include/Library/ExtendedIfrSupportLib.h
+++ b/MdeModulePkg/Include/Library/ExtendedIfrSupportLib.h
@@ -114,9 +114,9 @@ IfrLibUpdateForm (
If FormSetHelp is NULL, then ASSERT.
@param HiiHandle Hii handle
- @param Class On output, Class of the formset
- @param FormSetTitle On output, Formset title string
- @param FormSetHelp On output, Formset help string
+ @param Class On output, Class of the formset
+ @param FormSetTitle On output, Formset title string
+ @param FormSetHelp On output, Formset help string
@retval EFI_SUCCESS Successfully extract Class for specified Hii
handle.
diff --git a/MdeModulePkg/Include/MdeModuleHii.h b/MdeModulePkg/Include/MdeModuleHii.h
index e6bccdb7aa..9f5c3e3e0e 100644
--- a/MdeModulePkg/Include/MdeModuleHii.h
+++ b/MdeModulePkg/Include/MdeModuleHii.h
@@ -19,16 +19,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define WIDE_CHAR 0xFFF1
#define NON_BREAKING_CHAR 0xFFF2
-//
-// State defined for password statemachine
-//
+///
+/// State defined for password statemachine
+///
#define BROWSER_STATE_VALIDATE_PASSWORD 0
#define BROWSER_STATE_SET_PASSWORD 1
-//
-// Tiano Implementation specific Device Path definition.
-//
+///
+/// HII specific Vendor Device Path Node definition.
+///
#pragma pack(1)
typedef struct {
VENDOR_DEVICE_PATH VendorDevicePath;
@@ -37,31 +37,47 @@ typedef struct {
} HII_VENDOR_DEVICE_PATH_NODE;
#pragma pack()
+///
+/// HII specific Vendor Device Path definition.
+///
typedef struct {
HII_VENDOR_DEVICE_PATH_NODE Node;
EFI_DEVICE_PATH_PROTOCOL End;
} HII_VENDOR_DEVICE_PATH;
-
-//
-// GUIDed opcodes defined for Tiano
-//
+///
+/// GUIDed opcodes defined for EDKII implementation
+///
#define EFI_IFR_TIANO_GUID \
{ 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} }
#pragma pack(1)
+///
+/// EDKII implementation extension opcodes, new extension can be added here later.
+///
#define EFI_IFR_EXTEND_OP_LABEL 0x0
#define EFI_IFR_EXTEND_OP_BANNER 0x1
#define EFI_IFR_EXTEND_OP_TIMEOUT 0x2
#define EFI_IFR_EXTEND_OP_CLASS 0x3
#define EFI_IFR_EXTEND_OP_SUBCLASS 0x4
-
+///
+/// Label opcode
+///
typedef struct _EFI_IFR_GUID_LABEL {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID
+ ///
EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_LABEL
+ ///
UINT8 ExtendOpCode;
+ ///
+ /// Label Number
+ ///
UINT16 Number;
} EFI_IFR_GUID_LABEL;
@@ -69,20 +85,38 @@ typedef struct _EFI_IFR_GUID_LABEL {
#define EFI_IFR_BANNER_ALIGN_CENTER 1
#define EFI_IFR_BANNER_ALIGN_RIGHT 2
+///
+/// Banner opcode
+///
typedef struct _EFI_IFR_GUID_BANNER {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID
+ ///
EFI_GUID Guid;
- UINT8 ExtendOpCode; // Extended opcode is EFI_IFR_EXTEND_OP_BANNER
- EFI_STRING_ID Title; // The string token for the banner title
- UINT16 LineNumber; // 1-based line number
- UINT8 Alignment; // left, center, or right-aligned
+ ///
+ /// EFI_IFR_EXTEND_OP_BANNER
+ ///
+ UINT8 ExtendOpCode;
+ EFI_STRING_ID Title; /// The string token for the banner title
+ UINT16 LineNumber; /// 1-based line number
+ UINT8 Alignment; /// left, center, or right-aligned
} EFI_IFR_GUID_BANNER;
+///
+/// Timeout opcode
+///
typedef struct _EFI_IFR_GUID_TIMEOUT {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID
+ ///
EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_TIMEOUT
+ ///
UINT8 ExtendOpCode;
- UINT16 TimeOut;
+ UINT16 TimeOut; /// TimeOut Value
} EFI_IFR_GUID_TIMEOUT;
#define EFI_NON_DEVICE_CLASS 0x00
@@ -93,11 +127,20 @@ typedef struct _EFI_IFR_GUID_TIMEOUT {
#define EFI_ON_BOARD_DEVICE_CLASS 0x10
#define EFI_OTHER_DEVICE_CLASS 0x20
+///
+/// Device Class opcode
+///
typedef struct _EFI_IFR_GUID_CLASS {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID
+ ///
EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_CLASS
+ ///
UINT8 ExtendOpCode;
- UINT16 Class;
+ UINT16 Class; /// Device Class from the above
} EFI_IFR_GUID_CLASS;
#define EFI_SETUP_APPLICATION_SUBCLASS 0x00
@@ -105,66 +148,86 @@ typedef struct _EFI_IFR_GUID_CLASS {
#define EFI_FRONT_PAGE_SUBCLASS 0x02
#define EFI_SINGLE_USE_SUBCLASS 0x03
+///
+/// SubClass opcode
+///
typedef struct _EFI_IFR_GUID_SUBCLASS {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_TIANO_GUID
+ ///
EFI_GUID Guid;
+ ///
+ /// EFI_IFR_EXTEND_OP_SUBCLASS
+ ///
UINT8 ExtendOpCode;
- UINT16 SubClass;
+ UINT16 SubClass; ///Sub Class type from the above
} EFI_IFR_GUID_SUBCLASS;
-//
-// GUIDed opcodes defined for framework vfr.
-//
+///
+/// GUIDed opcodes support for framework vfr.
+///
#define EFI_IFR_FRAMEWORK_GUID \
{ 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } }
+///
+/// Two extended opcode are added, new extension can be added here later.
+/// One is for framework OneOf question Option Key value,
+/// Another is for framework vareqval.
+///
#define EFI_IFR_EXTEND_OP_OPTIONKEY 0x0
#define EFI_IFR_EXTEND_OP_VAREQNAME 0x1
-//
-// Store the framework vfr option key value
-//
+///
+/// Store the framework vfr option key value
+///
typedef struct _EFI_IFR_GUID_OPTIONKEY {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_FRAMEWORK_GUID
+ ///
EFI_GUID Guid;
- //
- // EFI_IFR_EXTEND_OP_OPTIONKEY
- //
+ ///
+ /// EFI_IFR_EXTEND_OP_OPTIONKEY
+ ///
UINT8 ExtendOpCode;
- //
- // UEFI One Of Questiond ID.
- //
+ ///
+ /// OneOf Questiond ID binded by OneOf Option
+ ///
EFI_QUESTION_ID QuestionId;
- //
- // The One Of Option Value.
- //
+ ///
+ /// The OneOf Option Value.
+ ///
EFI_IFR_TYPE_VALUE OptionValue;
- //
- // The Framework One Of Option Key Value.
- //
+ ///
+ /// The Framework OneOf Option Key Value.
+ ///
UINT16 KeyValue;
} EFI_IFR_GUID_OPTIONKEY;
-
-//
-// Store the framework vfr vareqval name number
-//
+///
+/// Store the framework vfr vareqval name number
+///
typedef struct _EFI_IFR_GUID_VAREQNAME {
EFI_IFR_OP_HEADER Header;
+ ///
+ /// EFI_IFR_FRAMEWORK_GUID
+ ///
EFI_GUID Guid;
- //
- // EFI_IFR_EXTEND_OP_VAREQNAME
- //
+ ///
+ /// EFI_IFR_EXTEND_OP_VAREQNAME
+ ///
UINT8 ExtendOpCode;
- //
- // Question ID of the Numeric Opcode created.
- //
+ ///
+ /// Question ID of the Numeric Opcode created.
+ ///
EFI_QUESTION_ID QuestionId;
- //
- // For vareqval (0x100),
- // NameId is 0x100. This value will converte to a Unicode String following this rule.
- // sprintf(StringBuffer, "%d", NameId)
- // The the Unicode String will be used as a EFI Variable Name.
+ ///
+ /// For vareqval (0x100), NameId is 0x100.
+ /// This value will converte to a Unicode String following this rule.
+ /// sprintf(StringBuffer, "%d", NameId)
+ /// The the Unicode String will be used as a EFI Variable Name.
+ ///
UINT16 NameId;
} EFI_IFR_GUID_VAREQNAME;
diff --git a/MdeModulePkg/Include/VariableFormat.h b/MdeModulePkg/Include/VariableFormat.h
index ac25b0c1f6..72830eccce 100644
--- a/MdeModulePkg/Include/VariableFormat.h
+++ b/MdeModulePkg/Include/VariableFormat.h
@@ -1,12 +1,12 @@
/** @file
- EDK II specific implementation of UEFI variable depend on data structure.
+ The variable data structure related to EDK II specific UEFI variable implementation.
Copyright (c) 2006 - 2008 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
-
+
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@@ -15,31 +15,25 @@
#ifndef __VARIABLE_FORMAT_H__
#define __VARIABLE_FORMAT_H__
-#define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')
-
+///
+/// Maximum buffer for the single variable.
+///
#ifndef MAX_VARIABLE_SIZE
#define MAX_VARIABLE_SIZE FixedPcdGet32(PcdMaxVariableSize)
#endif
-//
-// Enlarges the hardware error record maximum variable size to 32K bytes
-//
+
+///
+/// Hardware error record maximum variable size
+///
#ifndef MAX_HARDWARE_ERROR_VARIABLE_SIZE
#define MAX_HARDWARE_ERROR_VARIABLE_SIZE FixedPcdGet32(PcdMaxHardwareErrorVariableSize)
#endif
-#define VARIABLE_DATA 0x55AA
-
-//
-// Variable Store Header flags
-//
-#define VARIABLE_STORE_FORMATTED 0x5a
-#define VARIABLE_STORE_HEALTHY 0xfe
-
-//
-// The alignment of variable's start offset.
-// For IA32/X64 architecture, the alignment is set to 1, and
-// 8 is for IPF archtecture.
-//
+///
+/// The alignment of variable's start offset.
+/// For IA32/X64 architecture, the alignment is set to 1, and
+/// 8 is for IPF archtecture.
+///
#if defined (MDE_CPU_IPF)
#define ALIGNMENT 8
#else
@@ -48,9 +42,9 @@
#define HEADER_ALIGNMENT 4
-//
-// Variable Store Status
-//
+///
+/// Variable Store Status
+///
typedef enum {
EfiRaw,
EfiValid,
@@ -58,40 +52,86 @@ typedef enum {
EfiUnknown
} VARIABLE_STORE_STATUS;
-//
-// Variable State flags
-//
-#define VAR_IN_DELETED_TRANSITION 0xfe // Variable is in obsolete transistion
-#define VAR_DELETED 0xfd // Variable is obsolete
-#define VAR_HEADER_VALID_ONLY 0x7f // Variable header has been valid
-#define VAR_ADDED 0x3f // Variable has been completely added
- //
-#define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)
-
#pragma pack(1)
-//
-// Variable Store region header
-//
+#define VARIABLE_STORE_SIGNATURE EFI_SIGNATURE_32 ('$', 'V', 'S', 'S')
+
+///
+/// Variable Store Header Format and State
+///
+#define VARIABLE_STORE_FORMATTED 0x5a
+#define VARIABLE_STORE_HEALTHY 0xfe
+
+///
+/// Variable Store region header
+///
typedef struct {
+ ///
+ /// Variable store region signature.
+ ///
UINT32 Signature;
+ ///
+ /// Size of variable store region including this header
+ ///
UINT32 Size;
+ ///
+ /// variable region format state
+ ///
UINT8 Format;
+ ///
+ /// variable region healthy state
+ ///
UINT8 State;
UINT16 Reserved;
UINT32 Reserved1;
} VARIABLE_STORE_HEADER;
-//
-// Variable header structure
-//
+///
+/// Variable data start flag
+///
+#define VARIABLE_DATA 0x55AA
+
+///
+/// Variable State flags
+///
+#define VAR_IN_DELETED_TRANSITION 0xfe /// Variable is in obsolete transistion
+#define VAR_DELETED 0xfd /// Variable is obsolete
+#define VAR_HEADER_VALID_ONLY 0x7f /// Variable header has been valid
+#define VAR_ADDED 0x3f /// Variable has been completely added
+
+///
+/// Removed
+///
+#define IS_VARIABLE_STATE(_c, _Mask) (BOOLEAN) (((~_c) & (~_Mask)) != 0)
+
+///
+/// Variable Data Header Structure
+///
typedef struct {
+ ///
+ /// Variable Data Start Flag
+ ///
UINT16 StartId;
+ ///
+ /// Variable State defined above
+ ///
UINT8 State;
UINT8 Reserved;
+ ///
+ /// Attributes of variable defined in UEFI spec
+ ///
UINT32 Attributes;
+ ///
+ /// Size of variable Null-terminated Unicode string name
+ ///
UINT32 NameSize;
+ ///
+ /// Size of the variable data without this header
+ ///
UINT32 DataSize;
+ ///
+ /// A unique identifier for the vendor.
+ ///
EFI_GUID VendorGuid;
} VARIABLE_HEADER;
diff --git a/MdeModulePkg/Include/WorkingBlockHeader.h b/MdeModulePkg/Include/WorkingBlockHeader.h
index 1158e9a2c7..93a0c8d934 100644
--- a/MdeModulePkg/Include/WorkingBlockHeader.h
+++ b/MdeModulePkg/Include/WorkingBlockHeader.h
@@ -16,23 +16,37 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef __EFI_WORKING_BLOCK_HEADER_H__
#define __EFI_WORKING_BLOCK_HEADER_H__
-//
-// EFI Fault tolerant working block header
-// The header is immediately followed by the write queue.
-//
+#define WORKING_BLOCK_VALID 0x1
+#define WORKING_BLOCK_INVALID 0x2
+
+///
+/// EFI Fault tolerant working block header
+/// The header is immediately followed by the write queue.
+///
typedef struct {
+ ///
+ /// System Non Volatile FV Guid
+ ///
EFI_GUID Signature;
+ ///
+ /// 32bit CRC caculated for this header
+ ///
UINT32 Crc;
+ ///
+ /// Working block valid bit
+ ///
UINT8 WorkingBlockValid : 1;
UINT8 WorkingBlockInvalid : 1;
-#define WORKING_BLOCK_VALID 0x1
-#define WORKING_BLOCK_INVALID 0x2
UINT8 Reserved : 6;
UINT8 Reserved3[3];
+ ///
+ /// Total size of the following write queue range.
+ ///
UINT64 WriteQueueSize;
- //
- // UINT8 WriteQueue[WriteQueueSize];
- //
+ ///
+ /// Write Queue data
+ /// UINT8 WriteQueue[WriteQueueSize];
+ ///
} EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER;
#endif