From: klu2 Date: Thu, 14 Aug 2008 03:30:12 +0000 (+0000) Subject: Use doxygen comment style for document entity such as struct, enum, variable that... X-Git-Tag: edk2-stable201903~20573 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=fc30687f39436f5b5e00396a5161b30b70db8277 Use doxygen comment style for document entity such as struct, enum, variable that use /// but not // git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5647 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index 73b800d90b..0c16c48130 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -20,15 +20,15 @@ // These include SPIN_LOCK and BASE_LIBRARY_JUMP_BUFFER // -// -// SPIN_LOCK -// +/// +/// SPIN_LOCK +/// typedef volatile UINTN SPIN_LOCK; #if defined (MDE_CPU_IA32) -// -// IA32 context buffer used by SetJump() and LongJump() -// +/// +/// IA32 context buffer used by SetJump() and LongJump() +/// typedef struct { UINT32 Ebx; UINT32 Esi; @@ -42,9 +42,9 @@ typedef struct { #elif defined (MDE_CPU_IPF) -// -// IPF context buffer used by SetJump() and LongJump() -// +/// +/// IPF context buffer used by SetJump() and LongJump() +/// typedef struct { UINT64 F2[2]; UINT64 F3[2]; @@ -89,9 +89,9 @@ typedef struct { #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 0x10 #elif defined (MDE_CPU_X64) -// -// X64 context buffer used by SetJump() and LongJump() -// +/// +/// X64 context buffer used by SetJump() and LongJump() +/// typedef struct { UINT64 Rbx; UINT64 Rsp; @@ -108,9 +108,9 @@ typedef struct { #define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 #elif defined (MDE_CPU_EBC) -// -// EBC context buffer used by SetJump() and LongJump() -// +/// +/// EBC context buffer used by SetJump() and LongJump() +/// typedef struct { UINT64 R0; UINT64 R1; diff --git a/MdePkg/Include/Library/DxeCoreEntryPoint.h b/MdePkg/Include/Library/DxeCoreEntryPoint.h index 2317dd4844..d735c82165 100644 --- a/MdePkg/Include/Library/DxeCoreEntryPoint.h +++ b/MdePkg/Include/Library/DxeCoreEntryPoint.h @@ -15,9 +15,9 @@ #ifndef __MODULE_ENTRY_POINT_H__ #define __MODULE_ENTRY_POINT_H__ -// -// Declare the cache of copy of HobList. -// +/// +/// Declare the cache of copy of HobList. +/// extern VOID *gHobList; diff --git a/MdePkg/Include/Library/DxeServicesTableLib.h b/MdePkg/Include/Library/DxeServicesTableLib.h index e020937a1c..be996ead48 100644 --- a/MdePkg/Include/Library/DxeServicesTableLib.h +++ b/MdePkg/Include/Library/DxeServicesTableLib.h @@ -15,9 +15,9 @@ #ifndef __DXE_SERVICES_TABLE_LIB_H__ #define __DXE_SERVICES_TABLE_LIB_H__ -// -// Cache copy of the DXE Services Table -// +/// +/// Cache copy of the DXE Services Table +/// extern EFI_DXE_SERVICES *gDS; #endif diff --git a/MdePkg/Include/Library/DxeSmmDriverEntryPoint.h b/MdePkg/Include/Library/DxeSmmDriverEntryPoint.h index 12d35d5f52..ad23571b49 100644 --- a/MdePkg/Include/Library/DxeSmmDriverEntryPoint.h +++ b/MdePkg/Include/Library/DxeSmmDriverEntryPoint.h @@ -15,19 +15,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __MODULE_ENTRY_POINT_H__ #define __MODULE_ENTRY_POINT_H__ -// -// Declare the EFI/UEFI Specification Revision to which this driver is implemented -// +/// +/// Declare the EFI/UEFI Specification Revision to which this driver is implemented +/// extern const UINT32 _gUefiDriverRevision; -// -// Declare the number of entry points in the image. -// +/// +/// Declare the number of entry points in the image. +/// extern const UINT8 _gDriverEntryPointCount; -// -// Declare the number of unload handler in the image. -// +/// +/// Declare the number of unload handler in the image. +/// extern const UINT8 _gDriverUnloadImageCount; /** diff --git a/MdePkg/Include/Library/HiiLib.h b/MdePkg/Include/Library/HiiLib.h index 33bcf30a21..d99b100ecb 100644 --- a/MdePkg/Include/Library/HiiLib.h +++ b/MdePkg/Include/Library/HiiLib.h @@ -15,10 +15,10 @@ #ifndef __HII_LIB_H__ #define __HII_LIB_H__ -// -// Limited buffer size recommended by RFC4646 (4.3. Length Considerations) -// (42 characters plus a NULL terminator) -// +/// +/// Limited buffer size recommended by RFC4646 (4.3. Length Considerations) +/// (42 characters plus a NULL terminator) +/// #define RFC_3066_ENTRY_SIZE (42 + 1) #define ISO_639_2_ENTRY_SIZE 3 diff --git a/MdePkg/Include/Library/IfrSupportLib.h b/MdePkg/Include/Library/IfrSupportLib.h index a187b9e0a6..9efd88d5b7 100644 --- a/MdePkg/Include/Library/IfrSupportLib.h +++ b/MdePkg/Include/Library/IfrSupportLib.h @@ -1,665 +1,665 @@ -/** @file - The file contain all library functions and definitions for IFR opcode creation and - related Form Browser utility Operations. - - Copyright (c) 2007 - 2008, Intel Corporation - 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. - -**/ - -#ifndef _IFR_SUPPORT_LIBRARY_H_ -#define _IFR_SUPPORT_LIBRARY_H_ - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -// -// The architectural variable "Lang" and "LangCodes" are deprecated in UEFI -// specification. While, UEFI specification also states that these deprecated -// variables may be provided for backwards compatibility. - -#define EFI_LANGUAGE_VARIABLE L"Lang" -#define EFI_LANGUAGE_CODES_VARIABLE L"LangCodes" - -#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) -// -#define RFC_3066_ENTRY_SIZE (42 + 1) -#define ISO_639_2_ENTRY_SIZE 3 - -#define INVALID_VARSTORE_ID 0 - -#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; - EFI_IFR_TYPE_VALUE Value; - UINT8 Flags; -} IFR_OPTION; -#pragma pack() - -typedef struct { - // - // Buffer size allocated for Data. - // - UINT32 BufferSize; - - // - // Offset in Data to append the newly created opcode binary. - // It will be adjusted automatically in Create***OpCode(), and should be - // initialized to 0 before invocation of a serial of Create***OpCode() - // - UINT32 Offset; - - // - // The destination buffer for created op-codes - // - UINT8 *Data; -} EFI_HII_UPDATE_DATA; - - -/** - Create EFI_IFR_END_OP opcode. - - If Data is NULL or Data->Data is NULL, then ASSERT. - - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - -**/ -EFI_STATUS -EFIAPI -CreateEndOpCode ( - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Create EFI_IFR_DEFAULT_OP opcode. - - @param Value Value for the default - @param Type Type for the default - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - @retval EFI_INVALID_PARAMETER The type is not valid. - -**/ -EFI_STATUS -EFIAPI -CreateDefaultOpCode ( - IN EFI_IFR_TYPE_VALUE *Value, - IN UINT8 Type, - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Create EFI_IFR_ACTION_OP opcode. - - @param QuestionId Question ID - @param Prompt String ID for Prompt - @param Help String ID for Help - @param QuestionFlags Flags in Question Header - @param QuestionConfig String ID for configuration - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. - -**/ -EFI_STATUS -EFIAPI -CreateActionOpCode ( - IN EFI_QUESTION_ID QuestionId, - IN EFI_STRING_ID Prompt, - IN EFI_STRING_ID Help, - IN UINT8 QuestionFlags, - IN EFI_STRING_ID QuestionConfig, - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Create EFI_IFR_SUBTITLE_OP opcode. - - @param Prompt String ID for Prompt - @param Help String ID for Help - @param Flags Subtitle opcode flags - @param Scope Subtitle Scope bit - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - -**/ -EFI_STATUS -EFIAPI -CreateSubTitleOpCode ( - IN EFI_STRING_ID Prompt, - IN EFI_STRING_ID Help, - IN UINT8 Flags, - IN UINT8 Scope, - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Create EFI_IFR_TEXT_OP opcode. - - @param Prompt String ID for Prompt - @param Help String ID for Help - @param TextTwo String ID for text two - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - -**/ -EFI_STATUS -EFIAPI -CreateTextOpCode ( - IN EFI_STRING_ID Prompt, - IN EFI_STRING_ID Help, - IN EFI_STRING_ID TextTwo, - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Create EFI_IFR_REF_OP opcode. - - @param FormId Destination Form ID - @param Prompt String ID for Prompt - @param Help String ID for Help - @param QuestionFlags Flags in Question Header - @param QuestionId Question ID - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. - -**/ -EFI_STATUS -EFIAPI -CreateGotoOpCode ( - IN EFI_FORM_ID FormId, - IN EFI_STRING_ID Prompt, - IN EFI_STRING_ID Help, - IN UINT8 QuestionFlags, - IN EFI_QUESTION_ID QuestionId, - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Create EFI_IFR_ONE_OF_OPTION_OP opcode. - - @param OptionCount The number of options. - @param OptionsList The list of Options. - @param Type The data type. - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - -**/ -EFI_STATUS -EFIAPI -CreateOneOfOptionOpCode ( - IN UINTN OptionCount, - IN IFR_OPTION *OptionsList, - IN UINT8 Type, - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Create EFI_IFR_ONE_OF_OP opcode. - - @param QuestionId Question ID - @param VarStoreId Storage ID - @param VarOffset Offset in Storage - @param Prompt String ID for Prompt - @param Help String ID for Help - @param QuestionFlags Flags in Question Header - @param OneOfFlags Flags for oneof opcode - @param OptionsList List of options - @param OptionCount Number of options in option list - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. - -**/ -EFI_STATUS -EFIAPI -CreateOneOfOpCode ( - IN EFI_QUESTION_ID QuestionId, - IN EFI_VARSTORE_ID VarStoreId, - IN UINT16 VarOffset, - IN EFI_STRING_ID Prompt, - IN EFI_STRING_ID Help, - IN UINT8 QuestionFlags, - IN UINT8 OneOfFlags, - IN IFR_OPTION *OptionsList, - IN UINTN OptionCount, - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Create EFI_IFR_ORDERED_LIST_OP opcode. - - @param QuestionId Question ID - @param VarStoreId Storage ID - @param VarOffset Offset in Storage - @param Prompt String ID for Prompt - @param Help String ID for Help - @param QuestionFlags Flags in Question Header - @param OrderedListFlags Flags for ordered list opcode - @param DataType Type for option value - @param MaxContainers Maximum count for options in this ordered list - @param OptionsList List of options - @param OptionCount Number of options in option list - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. - -**/ -EFI_STATUS -EFIAPI -CreateOrderedListOpCode ( - IN EFI_QUESTION_ID QuestionId, - IN EFI_VARSTORE_ID VarStoreId, - IN UINT16 VarOffset, - IN EFI_STRING_ID Prompt, - IN EFI_STRING_ID Help, - IN UINT8 QuestionFlags, - IN UINT8 OrderedListFlags, - IN UINT8 DataType, - IN UINT8 MaxContainers, - IN IFR_OPTION *OptionsList, - IN UINTN OptionCount, - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Create EFI_IFR_CHECKBOX_OP opcode. - - @param QuestionId Question ID - @param VarStoreId Storage ID - @param VarOffset Offset in Storage - @param Prompt String ID for Prompt - @param Help String ID for Help - @param QuestionFlags Flags in Question Header - @param CheckBoxFlags Flags for checkbox opcode - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. - -**/ -EFI_STATUS -EFIAPI -CreateCheckBoxOpCode ( - IN EFI_QUESTION_ID QuestionId, - IN EFI_VARSTORE_ID VarStoreId, - IN UINT16 VarOffset, - IN EFI_STRING_ID Prompt, - IN EFI_STRING_ID Help, - IN UINT8 QuestionFlags, - IN UINT8 CheckBoxFlags, - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Create EFI_IFR_NUMERIC_OP opcode. - - @param QuestionId Question ID - @param VarStoreId Storage ID - @param VarOffset Offset in Storage - @param Prompt String ID for Prompt - @param Help String ID for Help - @param QuestionFlags Flags in Question Header - @param NumericFlags Flags for numeric opcode - @param Minimum Numeric minimum value - @param Maximum Numeric maximum value - @param Step Numeric step for edit - @param Default Numeric default value - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. - -**/ -EFI_STATUS -EFIAPI -CreateNumericOpCode ( - IN EFI_QUESTION_ID QuestionId, - IN EFI_VARSTORE_ID VarStoreId, - IN UINT16 VarOffset, - IN EFI_STRING_ID Prompt, - IN EFI_STRING_ID Help, - IN UINT8 QuestionFlags, - IN UINT8 NumericFlags, - IN UINT64 Minimum, - IN UINT64 Maximum, - IN UINT64 Step, - IN UINT64 Default, - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Create EFI_IFR_STRING_OP opcode. - - @param QuestionId Question ID - @param VarStoreId Storage ID - @param VarOffset Offset in Storage - @param Prompt String ID for Prompt - @param Help String ID for Help - @param QuestionFlags Flags in Question Header - @param StringFlags Flags for string opcode - @param MinSize String minimum length - @param MaxSize String maximum length - @param Data Destination for the created opcode binary - - @retval EFI_SUCCESS Opcode create success - @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. - @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. - -**/ -EFI_STATUS -EFIAPI -CreateStringOpCode ( - IN EFI_QUESTION_ID QuestionId, - IN EFI_VARSTORE_ID VarStoreId, - IN UINT16 VarOffset, - IN EFI_STRING_ID Prompt, - IN EFI_STRING_ID Help, - IN UINT8 QuestionFlags, - IN UINT8 StringFlags, - IN UINT8 MinSize, - IN UINT8 MaxSize, - IN OUT EFI_HII_UPDATE_DATA *Data - ) -; - -/** - Converts the unicode character of the string from uppercase to lowercase. - - @param Str String to be converted - - -**/ -VOID -EFIAPI -ToLower ( - IN OUT CHAR16 *Str - ) -; - -/** - Converts binary buffer to Unicode string in reversed byte order to BufToHexString(). - - @param Str String for output - @param Buffer Binary buffer. - @param BufferSize Size of the buffer in bytes. - - @retval EFI_SUCCESS The function completed successfully. - -**/ -EFI_STATUS -EFIAPI -BufferToHexString ( - IN OUT CHAR16 *Str, - IN UINT8 *Buffer, - IN UINTN BufferSize - ) -; - -/** - Converts Hex String to binary buffer in reversed byte order to HexStringToBuf(). - - @param Buffer Pointer to buffer that receives the data. - @param BufferSize Length in bytes of the buffer to hold converted - data. If routine return with EFI_SUCCESS, - containing length of converted data. If routine - return with EFI_BUFFER_TOO_SMALL, containg length - of buffer desired. - @param Str String to be converted from. - - @retval EFI_SUCCESS The function completed successfully. - -**/ -EFI_STATUS -EFIAPI -HexStringToBuffer ( - IN OUT UINT8 *Buffer, - IN OUT UINTN *BufferSize, - IN CHAR16 *Str - ) -; - -/** - Convert binary representation Config string (e.g. "0041004200430044") to the - original string (e.g. "ABCD"). Config string appears in (i.e. - "&NAME="), or Name/Value pair in (i.e. "label="). - - @param UnicodeString Original Unicode string. - @param StrBufferLen On input: Length in bytes of buffer to hold the Unicode string. - Includes tailing '\0' character. - On output: - If return EFI_SUCCESS, containing length of Unicode string buffer. - If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired. - @param ConfigString Binary representation of Unicode String, := (4)+ - - @retval EFI_SUCCESS Routine success. - @retval EFI_BUFFER_TOO_SMALL The string buffer is too small. - -**/ -EFI_STATUS -EFIAPI -ConfigStringToUnicode ( - IN OUT CHAR16 *UnicodeString, - IN OUT UINTN *StrBufferLen, - IN CHAR16 *ConfigString - ) -; - -/** - Convert Unicode string to binary representation Config string, e.g. - "ABCD" => "0041004200430044". Config string appears in (i.e. - "&NAME="), or Name/Value pair in (i.e. "label="). - - @param ConfigString Binary representation of Unicode String, := (4)+ - @param StrBufferLen On input: Length in bytes of buffer to hold the Unicode string. - Includes tailing '\0' character. - On output: - If return EFI_SUCCESS, containing length of Unicode string buffer. - If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired. - @param UnicodeString Original Unicode string. - - @retval EFI_SUCCESS Routine success. - @retval EFI_BUFFER_TOO_SMALL The string buffer is too small. - -**/ -EFI_STATUS -EFIAPI -UnicodeToConfigString ( - IN OUT CHAR16 *ConfigString, - IN OUT UINTN *StrBufferLen, - IN CHAR16 *UnicodeString - ) -; - -/** - Construct using routing information GUID/NAME/PATH. - - @param ConfigHdr Pointer to the ConfigHdr string. - @param StrBufferLen On input: Length in bytes of buffer to hold the - ConfigHdr string. Includes tailing '\0' character. - On output: If return EFI_SUCCESS, containing - length of ConfigHdr string buffer. If return - EFI_BUFFER_TOO_SMALL, containg length of string - buffer desired. - @param Guid Routing information: GUID. - @param Name Routing information: NAME. - @param DriverHandle Driver handle which contains the routing - information: PATH. - - @retval EFI_SUCCESS Routine success. - @retval EFI_BUFFER_TOO_SMALL The ConfigHdr string buffer is too small. - -**/ -EFI_STATUS -EFIAPI -ConstructConfigHdr ( - IN OUT CHAR16 *ConfigHdr, - IN OUT UINTN *StrBufferLen, - IN EFI_GUID *Guid, - IN CHAR16 *Name, OPTIONAL - IN EFI_HANDLE *DriverHandle - ) - -; - -/** - Search BlockName "&OFFSET=Offset&WIDTH=Width" in a string. - - @param String The string to be searched in. - @param Offset Offset in BlockName. - @param Width Width in BlockName. - - @retval TRUE Block name found. - @retval FALSE Block name not found. - -**/ -BOOLEAN -EFIAPI -FindBlockName ( - IN OUT CHAR16 *String, - UINTN Offset, - UINTN Width - ) -; - -/** - This routine is invoked by ConfigAccess.Callback() to retrived uncommitted data from Form Browser. - - @param VariableGuid An optional field to indicate the target variable - GUID name to use. - @param VariableName An optional field to indicate the target - human-readable variable name. - @param BufferSize On input: Length in bytes of buffer to hold - retrived data. On output: If return - EFI_BUFFER_TOO_SMALL, containg length of buffer - desired. - @param Buffer Buffer to hold retrived data. - - @retval EFI_SUCCESS Routine success. - @retval EFI_BUFFER_TOO_SMALL The intput buffer is too small. - -**/ -EFI_STATUS -EFIAPI -GetBrowserData ( - EFI_GUID *VariableGuid, OPTIONAL - CHAR16 *VariableName, OPTIONAL - UINTN *BufferSize, - UINT8 *Buffer - ) -; - -/** - This routine is invoked by ConfigAccess.Callback() to update uncommitted data of Form Browser. - - @param VariableGuid An optional field to indicate the target variable - GUID name to use. - @param VariableName An optional field to indicate the target - human-readable variable name. - @param BufferSize Length in bytes of buffer to hold retrived data. - @param Buffer Buffer to hold retrived data. - @param RequestElement An optional field to specify which part of the - buffer data will be send back to Browser. If NULL, - the whole buffer of data will be committed to - Browser. ::= - &OFFSET=&WIDTH=* - - @retval EFI_SUCCESS Routine success. - @retval Other Updating Browser uncommitted data failed. - -**/ -EFI_STATUS -EFIAPI -SetBrowserData ( - EFI_GUID *VariableGuid, OPTIONAL - CHAR16 *VariableName, OPTIONAL - UINTN BufferSize, - UINT8 *Buffer, - CHAR16 *RequestElement OPTIONAL - ) -; - -/** - Draw a dialog and return the selected key. - - @param NumberOfLines The number of lines for the dialog box - @param KeyValue The EFI_KEY value returned if HotKey is TRUE.. - @param String Pointer to the first string in the list - @param ... A series of (quantity == NumberOfLines - 1) text - strings which will be used to construct the dialog - box - - @retval EFI_SUCCESS Displayed dialog and received user interaction - @retval EFI_INVALID_PARAMETER One of the parameters was invalid. - -**/ -EFI_STATUS -EFIAPI -IfrLibCreatePopUp ( - IN UINTN NumberOfLines, - OUT EFI_INPUT_KEY *KeyValue, - IN CHAR16 *String, - ... - ) -; - -#endif +/** @file + The file contain all library functions and definitions for IFR opcode creation and + related Form Browser utility Operations. + + Copyright (c) 2007 - 2008, Intel Corporation + 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. + +**/ + +#ifndef _IFR_SUPPORT_LIBRARY_H_ +#define _IFR_SUPPORT_LIBRARY_H_ + + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +// +// The architectural variable "Lang" and "LangCodes" are deprecated in UEFI +// specification. While, UEFI specification also states that these deprecated +// variables may be provided for backwards compatibility. + +#define EFI_LANGUAGE_VARIABLE L"Lang" +#define EFI_LANGUAGE_CODES_VARIABLE L"LangCodes" + +#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) +// +#define RFC_3066_ENTRY_SIZE (42 + 1) +#define ISO_639_2_ENTRY_SIZE 3 + +#define INVALID_VARSTORE_ID 0 + +#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; + EFI_IFR_TYPE_VALUE Value; + UINT8 Flags; +} IFR_OPTION; +#pragma pack() + +typedef struct { + /// + /// Buffer size allocated for Data. + /// + UINT32 BufferSize; + + /// + /// Offset in Data to append the newly created opcode binary. + /// It will be adjusted automatically in Create***OpCode(), and should be + /// initialized to 0 before invocation of a serial of Create***OpCode() + /// + UINT32 Offset; + + /// + /// The destination buffer for created op-codes + /// + UINT8 *Data; +} EFI_HII_UPDATE_DATA; + + +/** + Create EFI_IFR_END_OP opcode. + + If Data is NULL or Data->Data is NULL, then ASSERT. + + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + +**/ +EFI_STATUS +EFIAPI +CreateEndOpCode ( + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Create EFI_IFR_DEFAULT_OP opcode. + + @param Value Value for the default + @param Type Type for the default + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + @retval EFI_INVALID_PARAMETER The type is not valid. + +**/ +EFI_STATUS +EFIAPI +CreateDefaultOpCode ( + IN EFI_IFR_TYPE_VALUE *Value, + IN UINT8 Type, + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Create EFI_IFR_ACTION_OP opcode. + + @param QuestionId Question ID + @param Prompt String ID for Prompt + @param Help String ID for Help + @param QuestionFlags Flags in Question Header + @param QuestionConfig String ID for configuration + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. + +**/ +EFI_STATUS +EFIAPI +CreateActionOpCode ( + IN EFI_QUESTION_ID QuestionId, + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN UINT8 QuestionFlags, + IN EFI_STRING_ID QuestionConfig, + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Create EFI_IFR_SUBTITLE_OP opcode. + + @param Prompt String ID for Prompt + @param Help String ID for Help + @param Flags Subtitle opcode flags + @param Scope Subtitle Scope bit + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + +**/ +EFI_STATUS +EFIAPI +CreateSubTitleOpCode ( + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN UINT8 Flags, + IN UINT8 Scope, + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Create EFI_IFR_TEXT_OP opcode. + + @param Prompt String ID for Prompt + @param Help String ID for Help + @param TextTwo String ID for text two + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + +**/ +EFI_STATUS +EFIAPI +CreateTextOpCode ( + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN EFI_STRING_ID TextTwo, + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Create EFI_IFR_REF_OP opcode. + + @param FormId Destination Form ID + @param Prompt String ID for Prompt + @param Help String ID for Help + @param QuestionFlags Flags in Question Header + @param QuestionId Question ID + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. + +**/ +EFI_STATUS +EFIAPI +CreateGotoOpCode ( + IN EFI_FORM_ID FormId, + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN UINT8 QuestionFlags, + IN EFI_QUESTION_ID QuestionId, + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Create EFI_IFR_ONE_OF_OPTION_OP opcode. + + @param OptionCount The number of options. + @param OptionsList The list of Options. + @param Type The data type. + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + +**/ +EFI_STATUS +EFIAPI +CreateOneOfOptionOpCode ( + IN UINTN OptionCount, + IN IFR_OPTION *OptionsList, + IN UINT8 Type, + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Create EFI_IFR_ONE_OF_OP opcode. + + @param QuestionId Question ID + @param VarStoreId Storage ID + @param VarOffset Offset in Storage + @param Prompt String ID for Prompt + @param Help String ID for Help + @param QuestionFlags Flags in Question Header + @param OneOfFlags Flags for oneof opcode + @param OptionsList List of options + @param OptionCount Number of options in option list + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. + +**/ +EFI_STATUS +EFIAPI +CreateOneOfOpCode ( + IN EFI_QUESTION_ID QuestionId, + IN EFI_VARSTORE_ID VarStoreId, + IN UINT16 VarOffset, + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN UINT8 QuestionFlags, + IN UINT8 OneOfFlags, + IN IFR_OPTION *OptionsList, + IN UINTN OptionCount, + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Create EFI_IFR_ORDERED_LIST_OP opcode. + + @param QuestionId Question ID + @param VarStoreId Storage ID + @param VarOffset Offset in Storage + @param Prompt String ID for Prompt + @param Help String ID for Help + @param QuestionFlags Flags in Question Header + @param OrderedListFlags Flags for ordered list opcode + @param DataType Type for option value + @param MaxContainers Maximum count for options in this ordered list + @param OptionsList List of options + @param OptionCount Number of options in option list + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. + +**/ +EFI_STATUS +EFIAPI +CreateOrderedListOpCode ( + IN EFI_QUESTION_ID QuestionId, + IN EFI_VARSTORE_ID VarStoreId, + IN UINT16 VarOffset, + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN UINT8 QuestionFlags, + IN UINT8 OrderedListFlags, + IN UINT8 DataType, + IN UINT8 MaxContainers, + IN IFR_OPTION *OptionsList, + IN UINTN OptionCount, + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Create EFI_IFR_CHECKBOX_OP opcode. + + @param QuestionId Question ID + @param VarStoreId Storage ID + @param VarOffset Offset in Storage + @param Prompt String ID for Prompt + @param Help String ID for Help + @param QuestionFlags Flags in Question Header + @param CheckBoxFlags Flags for checkbox opcode + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. + +**/ +EFI_STATUS +EFIAPI +CreateCheckBoxOpCode ( + IN EFI_QUESTION_ID QuestionId, + IN EFI_VARSTORE_ID VarStoreId, + IN UINT16 VarOffset, + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN UINT8 QuestionFlags, + IN UINT8 CheckBoxFlags, + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Create EFI_IFR_NUMERIC_OP opcode. + + @param QuestionId Question ID + @param VarStoreId Storage ID + @param VarOffset Offset in Storage + @param Prompt String ID for Prompt + @param Help String ID for Help + @param QuestionFlags Flags in Question Header + @param NumericFlags Flags for numeric opcode + @param Minimum Numeric minimum value + @param Maximum Numeric maximum value + @param Step Numeric step for edit + @param Default Numeric default value + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. + +**/ +EFI_STATUS +EFIAPI +CreateNumericOpCode ( + IN EFI_QUESTION_ID QuestionId, + IN EFI_VARSTORE_ID VarStoreId, + IN UINT16 VarOffset, + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN UINT8 QuestionFlags, + IN UINT8 NumericFlags, + IN UINT64 Minimum, + IN UINT64 Maximum, + IN UINT64 Step, + IN UINT64 Default, + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Create EFI_IFR_STRING_OP opcode. + + @param QuestionId Question ID + @param VarStoreId Storage ID + @param VarOffset Offset in Storage + @param Prompt String ID for Prompt + @param Help String ID for Help + @param QuestionFlags Flags in Question Header + @param StringFlags Flags for string opcode + @param MinSize String minimum length + @param MaxSize String maximum length + @param Data Destination for the created opcode binary + + @retval EFI_SUCCESS Opcode create success + @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small. + @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid. + +**/ +EFI_STATUS +EFIAPI +CreateStringOpCode ( + IN EFI_QUESTION_ID QuestionId, + IN EFI_VARSTORE_ID VarStoreId, + IN UINT16 VarOffset, + IN EFI_STRING_ID Prompt, + IN EFI_STRING_ID Help, + IN UINT8 QuestionFlags, + IN UINT8 StringFlags, + IN UINT8 MinSize, + IN UINT8 MaxSize, + IN OUT EFI_HII_UPDATE_DATA *Data + ) +; + +/** + Converts the unicode character of the string from uppercase to lowercase. + + @param Str String to be converted + + +**/ +VOID +EFIAPI +ToLower ( + IN OUT CHAR16 *Str + ) +; + +/** + Converts binary buffer to Unicode string in reversed byte order to BufToHexString(). + + @param Str String for output + @param Buffer Binary buffer. + @param BufferSize Size of the buffer in bytes. + + @retval EFI_SUCCESS The function completed successfully. + +**/ +EFI_STATUS +EFIAPI +BufferToHexString ( + IN OUT CHAR16 *Str, + IN UINT8 *Buffer, + IN UINTN BufferSize + ) +; + +/** + Converts Hex String to binary buffer in reversed byte order to HexStringToBuf(). + + @param Buffer Pointer to buffer that receives the data. + @param BufferSize Length in bytes of the buffer to hold converted + data. If routine return with EFI_SUCCESS, + containing length of converted data. If routine + return with EFI_BUFFER_TOO_SMALL, containg length + of buffer desired. + @param Str String to be converted from. + + @retval EFI_SUCCESS The function completed successfully. + +**/ +EFI_STATUS +EFIAPI +HexStringToBuffer ( + IN OUT UINT8 *Buffer, + IN OUT UINTN *BufferSize, + IN CHAR16 *Str + ) +; + +/** + Convert binary representation Config string (e.g. "0041004200430044") to the + original string (e.g. "ABCD"). Config string appears in (i.e. + "&NAME="), or Name/Value pair in (i.e. "label="). + + @param UnicodeString Original Unicode string. + @param StrBufferLen On input: Length in bytes of buffer to hold the Unicode string. + Includes tailing '\0' character. + On output: + If return EFI_SUCCESS, containing length of Unicode string buffer. + If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired. + @param ConfigString Binary representation of Unicode String, := (4)+ + + @retval EFI_SUCCESS Routine success. + @retval EFI_BUFFER_TOO_SMALL The string buffer is too small. + +**/ +EFI_STATUS +EFIAPI +ConfigStringToUnicode ( + IN OUT CHAR16 *UnicodeString, + IN OUT UINTN *StrBufferLen, + IN CHAR16 *ConfigString + ) +; + +/** + Convert Unicode string to binary representation Config string, e.g. + "ABCD" => "0041004200430044". Config string appears in (i.e. + "&NAME="), or Name/Value pair in (i.e. "label="). + + @param ConfigString Binary representation of Unicode String, := (4)+ + @param StrBufferLen On input: Length in bytes of buffer to hold the Unicode string. + Includes tailing '\0' character. + On output: + If return EFI_SUCCESS, containing length of Unicode string buffer. + If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired. + @param UnicodeString Original Unicode string. + + @retval EFI_SUCCESS Routine success. + @retval EFI_BUFFER_TOO_SMALL The string buffer is too small. + +**/ +EFI_STATUS +EFIAPI +UnicodeToConfigString ( + IN OUT CHAR16 *ConfigString, + IN OUT UINTN *StrBufferLen, + IN CHAR16 *UnicodeString + ) +; + +/** + Construct using routing information GUID/NAME/PATH. + + @param ConfigHdr Pointer to the ConfigHdr string. + @param StrBufferLen On input: Length in bytes of buffer to hold the + ConfigHdr string. Includes tailing '\0' character. + On output: If return EFI_SUCCESS, containing + length of ConfigHdr string buffer. If return + EFI_BUFFER_TOO_SMALL, containg length of string + buffer desired. + @param Guid Routing information: GUID. + @param Name Routing information: NAME. + @param DriverHandle Driver handle which contains the routing + information: PATH. + + @retval EFI_SUCCESS Routine success. + @retval EFI_BUFFER_TOO_SMALL The ConfigHdr string buffer is too small. + +**/ +EFI_STATUS +EFIAPI +ConstructConfigHdr ( + IN OUT CHAR16 *ConfigHdr, + IN OUT UINTN *StrBufferLen, + IN EFI_GUID *Guid, + IN CHAR16 *Name, OPTIONAL + IN EFI_HANDLE *DriverHandle + ) + +; + +/** + Search BlockName "&OFFSET=Offset&WIDTH=Width" in a string. + + @param String The string to be searched in. + @param Offset Offset in BlockName. + @param Width Width in BlockName. + + @retval TRUE Block name found. + @retval FALSE Block name not found. + +**/ +BOOLEAN +EFIAPI +FindBlockName ( + IN OUT CHAR16 *String, + UINTN Offset, + UINTN Width + ) +; + +/** + This routine is invoked by ConfigAccess.Callback() to retrived uncommitted data from Form Browser. + + @param VariableGuid An optional field to indicate the target variable + GUID name to use. + @param VariableName An optional field to indicate the target + human-readable variable name. + @param BufferSize On input: Length in bytes of buffer to hold + retrived data. On output: If return + EFI_BUFFER_TOO_SMALL, containg length of buffer + desired. + @param Buffer Buffer to hold retrived data. + + @retval EFI_SUCCESS Routine success. + @retval EFI_BUFFER_TOO_SMALL The intput buffer is too small. + +**/ +EFI_STATUS +EFIAPI +GetBrowserData ( + EFI_GUID *VariableGuid, OPTIONAL + CHAR16 *VariableName, OPTIONAL + UINTN *BufferSize, + UINT8 *Buffer + ) +; + +/** + This routine is invoked by ConfigAccess.Callback() to update uncommitted data of Form Browser. + + @param VariableGuid An optional field to indicate the target variable + GUID name to use. + @param VariableName An optional field to indicate the target + human-readable variable name. + @param BufferSize Length in bytes of buffer to hold retrived data. + @param Buffer Buffer to hold retrived data. + @param RequestElement An optional field to specify which part of the + buffer data will be send back to Browser. If NULL, + the whole buffer of data will be committed to + Browser. ::= + &OFFSET=&WIDTH=* + + @retval EFI_SUCCESS Routine success. + @retval Other Updating Browser uncommitted data failed. + +**/ +EFI_STATUS +EFIAPI +SetBrowserData ( + EFI_GUID *VariableGuid, OPTIONAL + CHAR16 *VariableName, OPTIONAL + UINTN BufferSize, + UINT8 *Buffer, + CHAR16 *RequestElement OPTIONAL + ) +; + +/** + Draw a dialog and return the selected key. + + @param NumberOfLines The number of lines for the dialog box + @param KeyValue The EFI_KEY value returned if HotKey is TRUE.. + @param String Pointer to the first string in the list + @param ... A series of (quantity == NumberOfLines - 1) text + strings which will be used to construct the dialog + box + + @retval EFI_SUCCESS Displayed dialog and received user interaction + @retval EFI_INVALID_PARAMETER One of the parameters was invalid. + +**/ +EFI_STATUS +EFIAPI +IfrLibCreatePopUp ( + IN UINTN NumberOfLines, + OUT EFI_INPUT_KEY *KeyValue, + IN CHAR16 *String, + ... + ) +; + +#endif diff --git a/MdePkg/Include/Library/PcdLib.h b/MdePkg/Include/Library/PcdLib.h index ae63de933c..5cb6174098 100644 --- a/MdePkg/Include/Library/PcdLib.h +++ b/MdePkg/Include/Library/PcdLib.h @@ -30,9 +30,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define PcdToken(TokenName) _PCD_TOKEN_##TokenName -// -// Feature Flag is in the form of a global constant -// +/// +/// Feature Flag is in the form of a global constant +/// #define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName diff --git a/MdePkg/Include/Library/PeimEntryPoint.h b/MdePkg/Include/Library/PeimEntryPoint.h index 37d3476361..dedf32d67d 100644 --- a/MdePkg/Include/Library/PeimEntryPoint.h +++ b/MdePkg/Include/Library/PeimEntryPoint.h @@ -15,9 +15,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __MODULE_ENTRY_POINT_H__ #define __MODULE_ENTRY_POINT_H__ -// -// Declare the EFI/UEFI Specification Revision to which this driver is implemented -// +/// +/// Declare the EFI/UEFI Specification Revision to which this driver is implemented +/// extern const UINT32 _gPeimRevision; /** diff --git a/MdePkg/Include/Library/PerformanceLib.h b/MdePkg/Include/Library/PerformanceLib.h index 8de5adc8c7..06c1fcc45d 100644 --- a/MdePkg/Include/Library/PerformanceLib.h +++ b/MdePkg/Include/Library/PerformanceLib.h @@ -15,9 +15,9 @@ #ifndef __PERFORMANCE_LIB_H__ #define __PERFORMANCE_LIB_H__ -// -// Performance library propery mask bits -// +/// +/// Performance library propery mask bits +/// #define PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED 0x00000001 /** diff --git a/MdePkg/Include/Library/ScsiLib.h b/MdePkg/Include/Library/ScsiLib.h index 2087d82ad3..e8b33a08ef 100644 --- a/MdePkg/Include/Library/ScsiLib.h +++ b/MdePkg/Include/Library/ScsiLib.h @@ -24,24 +24,24 @@ #define EFI_SCSI_STALL_1_MILLISECOND 10000 #define EFI_SCSI_STALL_1_SECOND 10000000 -// -// this macro cannot be directly used by the gBS->Stall(), -// since the value output by this macro is in 100ns unit, -// not 1us unit (1us = 1000ns) -// +/// +/// this macro cannot be directly used by the gBS->Stall(), +/// since the value output by this macro is in 100ns unit, +/// not 1us unit (1us = 1000ns) +/// #define EfiScsiStallSeconds(a) ((a) * EFI_SCSI_STALL_1_SECOND) -/** +/** Function test the ready status of the SCSI unit. - - @param[in] ScsiIo A pointer to SCSI IO protocol. - @param[in] Timeout The length of timeout period. - @param[out] SenseData A pointer to output sense data. - @param[out] SenseDataLength The length of output sense data. - @param[out] HostAdapterStatus The status of Host Adapter. - @param[out] TargetStatus The status of the target. - + + @param[in] ScsiIo A pointer to SCSI IO protocol. + @param[in] Timeout The length of timeout period. + @param[out] SenseData A pointer to output sense data. + @param[out] SenseDataLength The length of output sense data. + @param[out] HostAdapterStatus The status of Host Adapter. + @param[out] TargetStatus The status of the target. + @retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could not be transferred. @@ -58,7 +58,7 @@ Host Controller). @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute. - + **/ EFI_STATUS EFIAPI @@ -72,19 +72,19 @@ ScsiTestUnitReadyCommand ( ); -/** +/** Function to submit SCSI inquiry command. - - @param[in] ScsiIo SCSI IO Protocol to use - @param[in] Timeout The length of timeout period. - @param[in] SenseData A pointer to output sense data. - @param[in out] SenseDataLength The length of output sense data. - @param[out] HostAdapterStatus The status of Host Adapter. - @param[out] TargetStatus The status of the target. - @param[in out] InquirydataBuffer A pointer to inquiry data buffer. - @param[in out] InquiryDataLength The length of inquiry data buffer. - @param[in] EnableVitalProductData Boolean to enable Vital Product Data. - + + @param[in] ScsiIo SCSI IO Protocol to use + @param[in] Timeout The length of timeout period. + @param[in] SenseData A pointer to output sense data. + @param[in out] SenseDataLength The length of output sense data. + @param[out] HostAdapterStatus The status of Host Adapter. + @param[out] TargetStatus The status of the target. + @param[in out] InquirydataBuffer A pointer to inquiry data buffer. + @param[in out] InquiryDataLength The length of inquiry data buffer. + @param[in] EnableVitalProductData Boolean to enable Vital Product Data. + @retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could not be transferred. @@ -101,7 +101,7 @@ ScsiTestUnitReadyCommand ( Host Controller). @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute. - + **/ EFI_STATUS EFIAPI @@ -118,21 +118,21 @@ ScsiInquiryCommand ( ); -/** +/** Function to submit SCSI mode sense 10 command. - - @param[in] ScsiIo A pointer to SCSI IO protocol. - @param[in] Timeout The length of timeout period. - @param[in] SenseData A pointer to output sense data. - @param[in out] SenseDataLength The length of output sense data. - @param[out] HostAdapterStatus The status of Host Adapter. - @param[out] TargetStatus The status of the target. - @param[in] DataBuffer A pointer to input data buffer. - @param[in out] DataLength The length of input data buffer. - @param[in] DBDField The DBD Field (Optional). - @param[in] PageControl Page Control. - @param[in] PageCode Page code. - + + @param[in] ScsiIo A pointer to SCSI IO protocol. + @param[in] Timeout The length of timeout period. + @param[in] SenseData A pointer to output sense data. + @param[in out] SenseDataLength The length of output sense data. + @param[out] HostAdapterStatus The status of Host Adapter. + @param[out] TargetStatus The status of the target. + @param[in] DataBuffer A pointer to input data buffer. + @param[in out] DataLength The length of input data buffer. + @param[in] DBDField The DBD Field (Optional). + @param[in] PageControl Page Control. + @param[in] PageCode Page code. + @retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could not be transferred. @@ -149,7 +149,7 @@ ScsiInquiryCommand ( Host Controller). @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute. - + **/ EFI_STATUS EFIAPI @@ -169,7 +169,7 @@ ScsiModeSense10Command ( -/** +/** Function to submit SCSI request sense command. ScsiIo - A pointer to SCSI IO protocol. Timeout - The length of timeout period. @@ -177,15 +177,15 @@ ScsiModeSense10Command ( SenseDataLength - The length of output sense data. HostAdapterStatus - The status of Host Adapter. TargetStatus - The status of the target. - - @param[in] ScsiIo SCSI IO Protocol to use - @param[in] Timeout TODO: - @param[in] SenseData TODO: - @param[in out] SenseDataLength TODO: - @param[out] HostAdapterStatus TODO: - @param[out] TargetStatus TODO: - - @retval EFI_SUCCESS Valid data returned + + @param[in] ScsiIo SCSI IO Protocol to use + @param[in] Timeout TODO: + @param[in] SenseData TODO: + @param[in out] SenseDataLength TODO: + @param[out] HostAdapterStatus TODO: + @param[out] TargetStatus TODO: + + @retval EFI_SUCCESS Valid data returned @retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could not be transferred. @@ -202,7 +202,7 @@ ScsiModeSense10Command ( Host Controller). @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute. - + **/ EFI_STATUS EFIAPI @@ -216,19 +216,19 @@ ScsiRequestSenseCommand ( ); -/** +/** Function to submit read capacity command. - @param[in] ScsiIo A pointer to SCSI IO protocol. - @param[in] Timeout The length of timeout period. - @param[in] SenseData A pointer to output sense data. - @param[in out] SenseDataLength The length of output sense data. - @param[out] HostAdapterStatus The status of Host Adapter. - @param[out] TargetStatus The status of the target. - @param[out] DataBuffer A pointer to a data buffer. - @param[in out] DataLength The length of data buffer. - @param[in] PMI Partial medium indicator. - + @param[in] ScsiIo A pointer to SCSI IO protocol. + @param[in] Timeout The length of timeout period. + @param[in] SenseData A pointer to output sense data. + @param[in out] SenseDataLength The length of output sense data. + @param[out] HostAdapterStatus The status of Host Adapter. + @param[out] TargetStatus The status of the target. + @param[out] DataBuffer A pointer to a data buffer. + @param[in out] DataLength The length of data buffer. + @param[in] PMI Partial medium indicator. + @retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could not be transferred. @@ -245,7 +245,7 @@ ScsiRequestSenseCommand ( Host Controller). @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute. - + **/ EFI_STATUS EFIAPI @@ -262,20 +262,20 @@ ScsiReadCapacityCommand ( ); -/** +/** Function to submit read 10 command. - - @param[in] ScsiIo A pointer to SCSI IO protocol. - @param[in] Timeout The length of timeout period. - @param[in] SenseData A pointer to output sense data. - @param[in out] SenseDataLength The length of output sense data. - @param[out] HostAdapterStatus The status of Host Adapter. - @param[out] TargetStatus The status of the target. - @param[out] DataBuffer Read 10 command data. - @param[in out] DataLength The length of data buffer. - @param[in] StartLba The start address of LBA. - @param[in] SectorSize The sector size. - + + @param[in] ScsiIo A pointer to SCSI IO protocol. + @param[in] Timeout The length of timeout period. + @param[in] SenseData A pointer to output sense data. + @param[in out] SenseDataLength The length of output sense data. + @param[out] HostAdapterStatus The status of Host Adapter. + @param[out] TargetStatus The status of the target. + @param[out] DataBuffer Read 10 command data. + @param[in out] DataLength The length of data buffer. + @param[in] StartLba The start address of LBA. + @param[in] SectorSize The sector size. + @retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could not be transferred. @@ -292,7 +292,7 @@ ScsiReadCapacityCommand ( Host Controller). @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute. - + **/ EFI_STATUS EFIAPI @@ -310,20 +310,20 @@ ScsiRead10Command ( ); -/** +/** Function to submit SCSI write 10 command. - - @param[in] ScsiIo SCSI IO Protocol to use - @param[in] Timeout The length of timeout period. - @param[in] SenseData A pointer to output sense data. - @param[in out] SenseDataLength The length of output sense data. - @param[out] HostAdapterStatus The status of Host Adapter. - @param[out] TargetStatus The status of the target. - @param[out] DataBuffer A pointer to a data buffer. - @param[in out] DataLength The length of data buffer. - @param[in] StartLba The start address of LBA. - @param[in] SectorSize The sector size. - + + @param[in] ScsiIo SCSI IO Protocol to use + @param[in] Timeout The length of timeout period. + @param[in] SenseData A pointer to output sense data. + @param[in out] SenseDataLength The length of output sense data. + @param[out] HostAdapterStatus The status of Host Adapter. + @param[out] TargetStatus The status of the target. + @param[out] DataBuffer A pointer to a data buffer. + @param[in out] DataLength The length of data buffer. + @param[in] StartLba The start address of LBA. + @param[in] SectorSize The sector size. + @retval EFI_SUCCESS The status of the unit is tested successfully. @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could not be transferred. @@ -340,7 +340,7 @@ ScsiRead10Command ( Host Controller). @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute. - + **/ EFI_STATUS EFIAPI diff --git a/MdePkg/Include/Library/SmbusLib.h b/MdePkg/Include/Library/SmbusLib.h index c74e40acd0..c59f0bb4cf 100644 --- a/MdePkg/Include/Library/SmbusLib.h +++ b/MdePkg/Include/Library/SmbusLib.h @@ -15,9 +15,9 @@ #ifndef __SMBUS_LIB__ #define __SMBUS_LIB__ -// -// PEC BIT is bit 22 in SMBUS address -// +/// +/// PEC BIT is bit 22 in SMBUS address +/// #define SMBUS_LIB_PEC_BIT (1 << 22) /** diff --git a/MdePkg/Include/Library/UefiApplicationEntryPoint.h b/MdePkg/Include/Library/UefiApplicationEntryPoint.h index b1067acf72..d9c25d92cb 100644 --- a/MdePkg/Include/Library/UefiApplicationEntryPoint.h +++ b/MdePkg/Include/Library/UefiApplicationEntryPoint.h @@ -15,9 +15,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __UEFI_APPLICATION_ENTRY_POINT_H__ #define __UEFI_APPLICATION_ENTRY_POINT_H__ -// -// Declare the EFI/UEFI Specification Revision to which this driver is implemented -// +/// +/// Declare the EFI/UEFI Specification Revision to which this driver is implemented +/// extern const UINT32 _gUefiDriverRevision; /** diff --git a/MdePkg/Include/Library/UefiBootServicesTableLib.h b/MdePkg/Include/Library/UefiBootServicesTableLib.h index c5611b41b7..46683fd42f 100644 --- a/MdePkg/Include/Library/UefiBootServicesTableLib.h +++ b/MdePkg/Include/Library/UefiBootServicesTableLib.h @@ -15,19 +15,19 @@ #ifndef __UEFI_BOOT_SERVICES_TABLE_LIB_H__ #define __UEFI_BOOT_SERVICES_TABLE_LIB_H__ -// -// Cache the Image Handle -// +/// +/// Cache the Image Handle +/// extern EFI_HANDLE gImageHandle; -// -// Cache pointer to the EFI System Table -// +/// +/// Cache pointer to the EFI System Table +/// extern EFI_SYSTEM_TABLE *gST; -// -// Cache pointer to the EFI Boot Services Table -// +/// +/// Cache pointer to the EFI Boot Services Table +/// extern EFI_BOOT_SERVICES *gBS; #endif diff --git a/MdePkg/Include/Library/UefiDriverEntryPoint.h b/MdePkg/Include/Library/UefiDriverEntryPoint.h index 6908830f13..3ce8c28955 100644 --- a/MdePkg/Include/Library/UefiDriverEntryPoint.h +++ b/MdePkg/Include/Library/UefiDriverEntryPoint.h @@ -15,29 +15,29 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __MODULE_ENTRY_POINT_H__ #define __MODULE_ENTRY_POINT_H__ -// -// Declare the EFI/UEFI Specification Revision to which this driver is implemented -// +/// +/// Declare the EFI/UEFI Specification Revision to which this driver is implemented +/// extern const UINT32 _gUefiDriverRevision; -// -// Declare the number of entry points in the image. -// +/// +/// Declare the number of entry points in the image. +/// extern const UINT8 _gDriverEntryPointCount; -// -// Declare the number of unload handler in the image. -// +/// +/// Declare the number of unload handler in the image. +/// extern const UINT8 _gDriverUnloadImageCount; -// -// Declare the arrary of Boot Sevice Exit Event callbacks . -// +/// +/// Declare the arrary of Boot Sevice Exit Event callbacks . +/// extern const EFI_EVENT_NOTIFY _gDriverExitBootServicesEvent[]; -// -// Declare the arrary of Virtual Address Change Event callbacks . -// +/// +/// Declare the arrary of Virtual Address Change Event callbacks . +/// extern const EFI_EVENT_NOTIFY _gDriverSetVirtualAddressMapEvent[]; /** diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h index 4ad8d413cf..45373e4fa1 100644 --- a/MdePkg/Include/Library/UefiLib.h +++ b/MdePkg/Include/Library/UefiLib.h @@ -22,26 +22,26 @@ #include #include -// -// Unicode String Table -// +/// +/// Unicode String Table +/// typedef struct { CHAR8 *Language; CHAR16 *UnicodeString; } EFI_UNICODE_STRING_TABLE; -// -// EFI Lock Status -// +/// +/// EFI Lock Status +/// typedef enum { EfiLockUninitialized = 0, EfiLockReleased = 1, EfiLockAcquired = 2 } EFI_LOCK_STATE; -// -// EFI Lock -// +/// +/// EFI Lock +/// typedef struct { EFI_TPL Tpl; EFI_TPL OwnerTpl; diff --git a/MdePkg/Include/Library/UefiRuntimeServicesTableLib.h b/MdePkg/Include/Library/UefiRuntimeServicesTableLib.h index 866fb96a1c..ed66948098 100644 --- a/MdePkg/Include/Library/UefiRuntimeServicesTableLib.h +++ b/MdePkg/Include/Library/UefiRuntimeServicesTableLib.h @@ -15,9 +15,9 @@ #ifndef __UEFI_RUNTIME_SERVICES_TABLE_LIB_H__ #define __UEFI_RUNTIME_SERVICES_TABLE_LIB_H__ -// -// Cached copy of the EFI Runtime Services Table -// +/// +/// Cached copy of the EFI Runtime Services Table +/// extern EFI_RUNTIME_SERVICES *gRT; #endif diff --git a/MdePkg/Include/Library/UsbLib.h b/MdePkg/Include/Library/UsbLib.h index 4d81b35ee2..ad48218882 100644 --- a/MdePkg/Include/Library/UsbLib.h +++ b/MdePkg/Include/Library/UsbLib.h @@ -18,9 +18,9 @@ #include -// -// define the timeout time as 3ms -// +/// +/// define the timeout time as 3ms +/// #define TIMEOUT_VALUE 3 * 1000 /**