summaryrefslogtreecommitdiff
path: root/MdePkg/Include/Library
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-16 05:22:09 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-16 05:22:09 +0000
commit55f298c3a371fc7c04fda5d120a601cda68c140d (patch)
tree98cd902b00196239b747f7d3b577828d856a1f4e /MdePkg/Include/Library
parent1349236994106e461f82b2df1df5ebbf1bd80898 (diff)
downloadedk2-platforms-55f298c3a371fc7c04fda5d120a601cda68c140d.tar.xz
follow up the comments from code review.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5892 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include/Library')
-rw-r--r--MdePkg/Include/Library/HiiLib.h6
-rw-r--r--MdePkg/Include/Library/HobLib.h25
-rw-r--r--MdePkg/Include/Library/IfrSupportLib.h39
3 files changed, 43 insertions, 27 deletions
diff --git a/MdePkg/Include/Library/HiiLib.h b/MdePkg/Include/Library/HiiLib.h
index ea73100ddd..59e1780a99 100644
--- a/MdePkg/Include/Library/HiiLib.h
+++ b/MdePkg/Include/Library/HiiLib.h
@@ -16,7 +16,7 @@
#define __HII_LIB_H__
///
-/// Limited buffer size recommended by RFC4646 (4.3. Length Considerations)
+/// Limited buffer size recommended by RFC3066
/// (42 characters plus a NULL terminator)
///
#define RFC_3066_ENTRY_SIZE (42 + 1)
@@ -30,8 +30,8 @@
If not enough resource to complete the operation, then ASSERT.
@param NumberOfPackages Number of packages.
- @param GuidId Package GUID.
- @param ... Variable argument list for packages to be assembled.
+ @param GuidId Package GUID.
+ @param ... Variable argument list for packages to be assembled.
@return Pointer of EFI_HII_PACKAGE_LIST_HEADER.
diff --git a/MdePkg/Include/Library/HobLib.h b/MdePkg/Include/Library/HobLib.h
index a02246f6b0..02f364ccc6 100644
--- a/MdePkg/Include/Library/HobLib.h
+++ b/MdePkg/Include/Library/HobLib.h
@@ -373,15 +373,34 @@ BuildMemoryAllocationHob (
IN EFI_MEMORY_TYPE MemoryType
);
+///
+/// Get a HOB's type from HOB header
+///
#define GET_HOB_TYPE(Hob) ((Hob).Header->HobType)
+
+///
+/// Get a HOB's length from HOB header
+///
#define GET_HOB_LENGTH(Hob) ((Hob).Header->HobLength)
+
+///
+/// Get the pointer to next HOB in HOB List
+///
#define GET_NEXT_HOB(Hob) ((Hob).Raw + GET_HOB_LENGTH (Hob))
+
+///
+/// Judge if the HOB is the end of HOB List
+///
#define END_OF_HOB_LIST(Hob) (GET_HOB_TYPE (Hob) == (UINT16)EFI_HOB_TYPE_END_OF_HOB_LIST)
-//
-// Get the data and data size field of GUID
-//
+///
+/// Get the pointer to data field of GUID HOB
+///
#define GET_GUID_HOB_DATA(GuidHob) ((VOID *) (((UINT8 *) &((GuidHob)->Name)) + sizeof (EFI_GUID)))
+
+///
+/// Get the data size of GUID HOB
+///
#define GET_GUID_HOB_DATA_SIZE(GuidHob) (((GuidHob)->Header).HobLength - sizeof (EFI_HOB_GUID_TYPE))
#endif
diff --git a/MdePkg/Include/Library/IfrSupportLib.h b/MdePkg/Include/Library/IfrSupportLib.h
index 447ab73897..d8cdcf4280 100644
--- a/MdePkg/Include/Library/IfrSupportLib.h
+++ b/MdePkg/Include/Library/IfrSupportLib.h
@@ -39,10 +39,10 @@
#define UEFI_LANGUAGE_VARIABLE L"PlatformLang"
#define UEFI_LANGUAGE_CODES_VARIABLE L"PlatformLangCodes"
-//
-// Limited buffer size recommended by RFC4646 (4.3. Length Considerations)
-// (42 characters plus a NULL terminator)
-//
+///
+/// Limited buffer size recommended by RFC3066
+/// (42 characters plus a NULL terminator)
+///
#define RFC_3066_ENTRY_SIZE (42 + 1)
#define ISO_639_2_ENTRY_SIZE 3
@@ -51,9 +51,6 @@
#define QUESTION_FLAGS (EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_OPTIONS_ONLY)
#define QUESTION_FLAGS_MASK (~QUESTION_FLAGS)
-extern EFI_HII_DATABASE_PROTOCOL *gIfrLibHiiDatabase;
-extern EFI_HII_STRING_PROTOCOL *gIfrLibHiiString;
-
#pragma pack(1)
typedef struct {
EFI_STRING_ID StringToken;
@@ -312,8 +309,8 @@ CreateOrderedListOpCode (
IN UINT8 DataType,
IN UINT8 MaxContainers,
IN IFR_OPTION *OptionsList,
- IN UINTN OptionCount,
- IN OUT EFI_HII_UPDATE_DATA *Data
+ IN UINTN OptionCount,
+ IN OUT EFI_HII_UPDATE_DATA *Data
)
;
@@ -554,7 +551,7 @@ EFIAPI
ConstructConfigHdr (
IN OUT CHAR16 *ConfigHdr,
IN OUT UINTN *StrBufferLen,
- IN EFI_GUID *Guid,
+ IN CONST EFI_GUID *Guid,
IN CHAR16 *Name, OPTIONAL
IN EFI_HANDLE *DriverHandle
)
@@ -576,8 +573,8 @@ BOOLEAN
EFIAPI
FindBlockName (
IN OUT CHAR16 *String,
- UINTN Offset,
- UINTN Width
+ IN UINTN Offset,
+ IN UINTN Width
)
;
@@ -601,10 +598,10 @@ FindBlockName (
EFI_STATUS
EFIAPI
GetBrowserData (
- EFI_GUID *VariableGuid, OPTIONAL
- CHAR16 *VariableName, OPTIONAL
- UINTN *BufferSize,
- UINT8 *Buffer
+ IN CONST EFI_GUID *VariableGuid, OPTIONAL
+ IN CONST CHAR16 *VariableName, OPTIONAL
+ IN OUT UINTN *BufferSize,
+ IN OUT UINT8 *Buffer
)
;
@@ -630,11 +627,11 @@ GetBrowserData (
EFI_STATUS
EFIAPI
SetBrowserData (
- EFI_GUID *VariableGuid, OPTIONAL
- CHAR16 *VariableName, OPTIONAL
- UINTN BufferSize,
- UINT8 *Buffer,
- CHAR16 *RequestElement OPTIONAL
+ IN CONST EFI_GUID *VariableGuid, OPTIONAL
+ IN CONST CHAR16 *VariableName, OPTIONAL
+ IN UINTN BufferSize,
+ IN CONST UINT8 *Buffer,
+ IN CONST CHAR16 *RequestElement OPTIONAL
)
;