MdePkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdePkg package

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:05 -08:00
committed by mergify[bot]
parent 1436aea4d5
commit 2f88bd3a12
975 changed files with 55681 additions and 57790 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -51,8 +51,8 @@ InvalidateInstructionCache (
VOID *
EFIAPI
InvalidateInstructionCacheRange (
IN VOID *Address,
IN UINTN Length
IN VOID *Address,
IN UINTN Length
);
/**
@@ -100,8 +100,8 @@ WriteBackInvalidateDataCache (
VOID *
EFIAPI
WriteBackInvalidateDataCacheRange (
IN VOID *Address,
IN UINTN Length
IN VOID *Address,
IN UINTN Length
);
/**
@@ -148,8 +148,8 @@ WriteBackDataCache (
VOID *
EFIAPI
WriteBackDataCacheRange (
IN VOID *Address,
IN UINTN Length
IN VOID *Address,
IN UINTN Length
);
/**
@@ -199,8 +199,8 @@ InvalidateDataCache (
VOID *
EFIAPI
InvalidateDataCacheRange (
IN VOID *Address,
IN UINTN Length
IN VOID *Address,
IN UINTN Length
);
#endif

View File

@@ -41,5 +41,4 @@ CpuFlushTlb (
VOID
);
#endif

View File

@@ -48,7 +48,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define DEBUG_CACHE 0x00200000 // Memory range cachability changes
#define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may
// significantly impact boot performance
#define DEBUG_ERROR 0x80000000 // Error
#define DEBUG_ERROR 0x80000000 // Error
//
// Aliases of debug message mask bits
@@ -129,7 +129,6 @@ DebugPrint (
...
);
/**
Prints a debug message to the debug output device if the specified
error level is enabled.
@@ -148,12 +147,11 @@ DebugPrint (
VOID
EFIAPI
DebugVPrint (
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN VA_LIST VaListMarker
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN VA_LIST VaListMarker
);
/**
Prints a debug message to the debug output device if the specified
error level is enabled.
@@ -174,12 +172,11 @@ DebugVPrint (
VOID
EFIAPI
DebugBPrint (
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN BASE_LIST BaseListMarker
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN BASE_LIST BaseListMarker
);
/**
Prints an assert message containing a filename, line number, and description.
This may be followed by a breakpoint or a dead loop.
@@ -209,7 +206,6 @@ DebugAssert (
IN CONST CHAR8 *Description
);
/**
Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
@@ -232,7 +228,6 @@ DebugClearMemory (
IN UINTN Length
);
/**
Returns TRUE if ASSERT() macros are enabled.
@@ -249,7 +244,6 @@ DebugAssertEnabled (
VOID
);
/**
Returns TRUE if DEBUG() macros are enabled.
@@ -266,7 +260,6 @@ DebugPrintEnabled (
VOID
);
/**
Returns TRUE if DEBUG_CODE() macros are enabled.
@@ -283,7 +276,6 @@ DebugCodeEnabled (
VOID
);
/**
Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
@@ -312,7 +304,7 @@ DebugClearMemoryEnabled (
BOOLEAN
EFIAPI
DebugPrintLevelEnabled (
IN CONST UINTN ErrorLevel
IN CONST UINTN ErrorLevel
);
/**
@@ -325,6 +317,7 @@ DebugPrintLevelEnabled (
**/
#if defined (EDKII_UNIT_TEST_FRAMEWORK_ENABLED)
/**
Unit test library replacement for DebugAssert() in DebugLib.
@@ -344,17 +337,17 @@ UnitTestDebugAssert (
IN CONST CHAR8 *Description
);
#if defined(__clang__) && defined(__FILE_NAME__)
#if defined (__clang__) && defined (__FILE_NAME__)
#define _ASSERT(Expression) UnitTestDebugAssert (__FILE_NAME__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))
#else
#else
#define _ASSERT(Expression) UnitTestDebugAssert (__FILE__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))
#endif
#endif
#else
#if defined(__clang__) && defined(__FILE_NAME__)
#if defined (__clang__) && defined (__FILE_NAME__)
#define _ASSERT(Expression) DebugAssert (__FILE_NAME__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))
#else
#else
#define _ASSERT(Expression) DebugAssert (__FILE__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))
#endif
#endif
#endif
/**
@@ -370,16 +363,16 @@ UnitTestDebugAssert (
**/
#if !defined(MDE_CPU_EBC) && (!defined (_MSC_VER) || _MSC_VER > 1400)
#define _DEBUG_PRINT(PrintLevel, ...) \
#if !defined (MDE_CPU_EBC) && (!defined (_MSC_VER) || _MSC_VER > 1400)
#define _DEBUG_PRINT(PrintLevel, ...) \
do { \
if (DebugPrintLevelEnabled (PrintLevel)) { \
DebugPrint (PrintLevel, ##__VA_ARGS__); \
} \
} while (FALSE)
#define _DEBUG(Expression) _DEBUG_PRINT Expression
#define _DEBUG(Expression) _DEBUG_PRINT Expression
#else
#define _DEBUG(Expression) DebugPrint Expression
#define _DEBUG(Expression) DebugPrint Expression
#endif
/**
@@ -394,8 +387,8 @@ UnitTestDebugAssert (
@param Expression Boolean expression.
**/
#if !defined(MDEPKG_NDEBUG)
#define ASSERT(Expression) \
#if !defined (MDEPKG_NDEBUG)
#define ASSERT(Expression) \
do { \
if (DebugAssertEnabled ()) { \
if (!(Expression)) { \
@@ -405,7 +398,7 @@ UnitTestDebugAssert (
} \
} while (FALSE)
#else
#define ASSERT(Expression)
#define ASSERT(Expression)
#endif
/**
@@ -420,15 +413,15 @@ UnitTestDebugAssert (
**/
#if !defined(MDEPKG_NDEBUG)
#define DEBUG(Expression) \
#if !defined (MDEPKG_NDEBUG)
#define DEBUG(Expression) \
do { \
if (DebugPrintEnabled ()) { \
_DEBUG (Expression); \
} \
} while (FALSE)
#else
#define DEBUG(Expression)
#define DEBUG(Expression)
#endif
/**
@@ -443,8 +436,8 @@ UnitTestDebugAssert (
@param StatusParameter EFI_STATUS value to evaluate.
**/
#if !defined(MDEPKG_NDEBUG)
#define ASSERT_EFI_ERROR(StatusParameter) \
#if !defined (MDEPKG_NDEBUG)
#define ASSERT_EFI_ERROR(StatusParameter) \
do { \
if (DebugAssertEnabled ()) { \
if (EFI_ERROR (StatusParameter)) { \
@@ -454,7 +447,7 @@ UnitTestDebugAssert (
} \
} while (FALSE)
#else
#define ASSERT_EFI_ERROR(StatusParameter)
#define ASSERT_EFI_ERROR(StatusParameter)
#endif
/**
@@ -469,8 +462,8 @@ UnitTestDebugAssert (
@param StatusParameter RETURN_STATUS value to evaluate.
**/
#if !defined(MDEPKG_NDEBUG)
#define ASSERT_RETURN_ERROR(StatusParameter) \
#if !defined (MDEPKG_NDEBUG)
#define ASSERT_RETURN_ERROR(StatusParameter) \
do { \
if (DebugAssertEnabled ()) { \
if (RETURN_ERROR (StatusParameter)) { \
@@ -481,7 +474,7 @@ UnitTestDebugAssert (
} \
} while (FALSE)
#else
#define ASSERT_RETURN_ERROR(StatusParameter)
#define ASSERT_RETURN_ERROR(StatusParameter)
#endif
/**
@@ -506,8 +499,8 @@ UnitTestDebugAssert (
@param Guid The pointer to a protocol GUID.
**/
#if !defined(MDEPKG_NDEBUG)
#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid) \
#if !defined (MDEPKG_NDEBUG)
#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid) \
do { \
if (DebugAssertEnabled ()) { \
VOID *Instance; \
@@ -524,7 +517,7 @@ UnitTestDebugAssert (
} \
} while (FALSE)
#else
#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)
#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)
#endif
/**
@@ -538,7 +531,6 @@ UnitTestDebugAssert (
**/
#define DEBUG_CODE_BEGIN() do { if (DebugCodeEnabled ()) { UINT8 __DebugCodeLocal
/**
The macro that marks the end of debug source code.
@@ -548,8 +540,7 @@ UnitTestDebugAssert (
are not included in a module.
**/
#define DEBUG_CODE_END() __DebugCodeLocal = 0; __DebugCodeLocal++; } } while (FALSE)
#define DEBUG_CODE_END() __DebugCodeLocal = 0; __DebugCodeLocal++; } } while (FALSE)
/**
The macro that declares a section of debug source code.
@@ -564,7 +555,6 @@ UnitTestDebugAssert (
Expression \
DEBUG_CODE_END ()
/**
The macro that calls DebugClearMemory() to clear a buffer to a default value.
@@ -582,7 +572,6 @@ UnitTestDebugAssert (
} \
} while (FALSE)
/**
Macro that calls DebugAssert() if the containing record does not have a
matching signature. If the signatures matches, then a pointer to the data
@@ -625,13 +614,13 @@ UnitTestDebugAssert (
@param TestSignature The 32-bit signature value to match.
**/
#if !defined(MDEPKG_NDEBUG)
#define CR(Record, TYPE, Field, TestSignature) \
#if !defined (MDEPKG_NDEBUG)
#define CR(Record, TYPE, Field, TestSignature) \
(DebugAssertEnabled () && (BASE_CR (Record, TYPE, Field)->Signature != TestSignature)) ? \
(TYPE *) (_ASSERT (CR has Bad Signature), Record) : \
BASE_CR (Record, TYPE, Field)
#else
#define CR(Record, TYPE, Field, TestSignature) \
#define CR(Record, TYPE, Field, TestSignature) \
BASE_CR (Record, TYPE, Field)
#endif

View File

@@ -5,6 +5,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _DEBUG_PRINT_ERROR_LEVEL_LIB_H_
#define _DEBUG_PRINT_ERROR_LEVEL_LIB_H_
@@ -34,4 +35,5 @@ EFIAPI
SetDebugPrintErrorLevel (
UINT32 ErrorLevel
);
#endif

View File

@@ -12,7 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef __DEVICE_PATH_LIB_H__
#define __DEVICE_PATH_LIB_H__
#define END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL))
#define END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL))
/**
Determine whether a given device path is valid.
@@ -33,8 +33,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
BOOLEAN
EFIAPI
IsDevicePathValid (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN UINTN MaxSize
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN UINTN MaxSize
);
/**
@@ -384,8 +384,8 @@ AppendDevicePathInstance (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
GetNextDevicePathInstance (
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
OUT UINTN *Size
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
OUT UINTN *Size
);
/**
@@ -409,9 +409,9 @@ GetNextDevicePathInstance (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
CreateDeviceNode (
IN UINT8 NodeType,
IN UINT8 NodeSubType,
IN UINT16 NodeLength
IN UINT8 NodeType,
IN UINT8 NodeSubType,
IN UINT16 NodeLength
);
/**
@@ -447,7 +447,7 @@ IsDevicePathMultiInstance (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
DevicePathFromHandle (
IN EFI_HANDLE Handle
IN EFI_HANDLE Handle
);
/**
@@ -474,8 +474,8 @@ DevicePathFromHandle (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
FileDevicePath (
IN EFI_HANDLE Device OPTIONAL,
IN CONST CHAR16 *FileName
IN EFI_HANDLE Device OPTIONAL,
IN CONST CHAR16 *FileName
);
/**
@@ -496,9 +496,9 @@ FileDevicePath (
CHAR16 *
EFIAPI
ConvertDevicePathToText (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN BOOLEAN DisplayOnly,
IN BOOLEAN AllowShortcuts
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN BOOLEAN DisplayOnly,
IN BOOLEAN AllowShortcuts
);
/**
@@ -538,7 +538,7 @@ ConvertDeviceNodeToText (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
ConvertTextToDeviceNode (
IN CONST CHAR16 *TextDeviceNode
IN CONST CHAR16 *TextDeviceNode
);
/**
@@ -555,7 +555,7 @@ ConvertTextToDeviceNode (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
ConvertTextToDevicePath (
IN CONST CHAR16 *TextDevicePath
IN CONST CHAR16 *TextDevicePath
);
#endif

View File

@@ -14,7 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
extern VOID *gHobList;
/**
The entry point of PE/COFF Image for the DXE Core.
@@ -33,7 +32,6 @@ _ModuleEntryPoint (
IN VOID *HobStart
);
/**
Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
@@ -48,7 +46,6 @@ EfiMain (
IN VOID *HobStart
);
/**
Autogenerated function that calls the library constructors for all of the module's dependent libraries.
@@ -72,7 +69,6 @@ ProcessLibraryConstructorList (
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
Autogenerated function that calls a set of module entry points.

View File

@@ -53,12 +53,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
EFI_STATUS
EFIAPI
GetSectionFromAnyFvByFileType (
IN EFI_FV_FILETYPE FileType,
IN UINTN FileInstance,
IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance,
OUT VOID **Buffer,
OUT UINTN *Size
IN EFI_FV_FILETYPE FileType,
IN UINTN FileInstance,
IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance,
OUT VOID **Buffer,
OUT UINTN *Size
);
/**
@@ -107,11 +107,11 @@ GetSectionFromAnyFvByFileType (
EFI_STATUS
EFIAPI
GetSectionFromAnyFv (
IN CONST EFI_GUID *NameGuid,
IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance,
OUT VOID **Buffer,
OUT UINTN *Size
IN CONST EFI_GUID *NameGuid,
IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance,
OUT VOID **Buffer,
OUT UINTN *Size
);
/**
@@ -162,14 +162,13 @@ GetSectionFromAnyFv (
EFI_STATUS
EFIAPI
GetSectionFromFv (
IN CONST EFI_GUID *NameGuid,
IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance,
OUT VOID **Buffer,
OUT UINTN *Size
IN CONST EFI_GUID *NameGuid,
IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance,
OUT VOID **Buffer,
OUT UINTN *Size
);
/**
Searches the FFS file the currently executing module was loaded from and returns the first matching FFS section.
@@ -215,13 +214,12 @@ GetSectionFromFv (
EFI_STATUS
EFIAPI
GetSectionFromFfs (
IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance,
OUT VOID **Buffer,
OUT UINTN *Size
IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance,
OUT VOID **Buffer,
OUT UINTN *Size
);
/**
Get the image file buffer data and buffer size by its device path.
@@ -251,10 +249,10 @@ GetSectionFromFfs (
VOID *
EFIAPI
GetFileBufferByFilePath (
IN BOOLEAN BootPolicy,
IN CONST EFI_DEVICE_PATH_PROTOCOL *FilePath,
OUT UINTN *FileSize,
OUT UINT32 *AuthenticationStatus
IN BOOLEAN BootPolicy,
IN CONST EFI_DEVICE_PATH_PROTOCOL *FilePath,
OUT UINTN *FileSize,
OUT UINT32 *AuthenticationStatus
);
/**

View File

@@ -25,4 +25,3 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
extern EFI_DXE_SERVICES *gDS;
#endif

View File

@@ -14,6 +14,7 @@ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef __EXTRACT_GUIDED_SECTION_H__
#define __EXTRACT_GUIDED_SECTION_H__

View File

@@ -14,7 +14,7 @@
/// The tag for use in identifying UNICODE files.
/// If the file is UNICODE, the first 16 bits of the file will equal this value.
extern CONST UINT16 gUnicodeFileTag;
extern CONST UINT16 gUnicodeFileTag;
/**
This function retrieves information about the file for the handle
@@ -29,10 +29,10 @@ extern CONST UINT16 gUnicodeFileTag;
@retval NULL Information could not be retrieved.
@retval !NULL The information about the file.
**/
EFI_FILE_INFO*
EFI_FILE_INFO *
EFIAPI
FileHandleGetInfo (
IN EFI_FILE_HANDLE FileHandle
IN EFI_FILE_HANDLE FileHandle
);
/**
@@ -57,8 +57,8 @@ FileHandleGetInfo (
EFI_STATUS
EFIAPI
FileHandleSetInfo (
IN EFI_FILE_HANDLE FileHandle,
IN CONST EFI_FILE_INFO *FileInfo
IN EFI_FILE_HANDLE FileHandle,
IN CONST EFI_FILE_INFO *FileInfo
);
/**
@@ -92,10 +92,10 @@ FileHandleSetInfo (
**/
EFI_STATUS
EFIAPI
FileHandleRead(
IN EFI_FILE_HANDLE FileHandle,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
FileHandleRead (
IN EFI_FILE_HANDLE FileHandle,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
);
/**
@@ -124,10 +124,10 @@ FileHandleRead(
**/
EFI_STATUS
EFIAPI
FileHandleWrite(
IN EFI_FILE_HANDLE FileHandle,
IN OUT UINTN *BufferSize,
IN VOID *Buffer
FileHandleWrite (
IN EFI_FILE_HANDLE FileHandle,
IN OUT UINTN *BufferSize,
IN VOID *Buffer
);
/**
@@ -144,7 +144,7 @@ FileHandleWrite(
EFI_STATUS
EFIAPI
FileHandleClose (
IN EFI_FILE_HANDLE FileHandle
IN EFI_FILE_HANDLE FileHandle
);
/**
@@ -164,7 +164,7 @@ FileHandleClose (
EFI_STATUS
EFIAPI
FileHandleDelete (
IN EFI_FILE_HANDLE FileHandle
IN EFI_FILE_HANDLE FileHandle
);
/**
@@ -189,8 +189,8 @@ FileHandleDelete (
EFI_STATUS
EFIAPI
FileHandleSetPosition (
IN EFI_FILE_HANDLE FileHandle,
IN UINT64 Position
IN EFI_FILE_HANDLE FileHandle,
IN UINT64 Position
);
/**
@@ -211,9 +211,10 @@ FileHandleSetPosition (
EFI_STATUS
EFIAPI
FileHandleGetPosition (
IN EFI_FILE_HANDLE FileHandle,
OUT UINT64 *Position
IN EFI_FILE_HANDLE FileHandle,
OUT UINT64 *Position
);
/**
Flushes data on a file.
@@ -231,7 +232,7 @@ FileHandleGetPosition (
EFI_STATUS
EFIAPI
FileHandleFlush (
IN EFI_FILE_HANDLE FileHandle
IN EFI_FILE_HANDLE FileHandle
);
/**
@@ -250,7 +251,7 @@ FileHandleFlush (
EFI_STATUS
EFIAPI
FileHandleIsDirectory (
IN EFI_FILE_HANDLE DirHandle
IN EFI_FILE_HANDLE DirHandle
);
/** Retrieve first entry from a directory.
@@ -278,8 +279,8 @@ FileHandleIsDirectory (
EFI_STATUS
EFIAPI
FileHandleFindFirstFile (
IN EFI_FILE_HANDLE DirHandle,
OUT EFI_FILE_INFO **Buffer
IN EFI_FILE_HANDLE DirHandle,
OUT EFI_FILE_INFO **Buffer
);
/** Retrieve next entries from a directory.
@@ -302,10 +303,10 @@ FileHandleFindFirstFile (
**/
EFI_STATUS
EFIAPI
FileHandleFindNextFile(
IN EFI_FILE_HANDLE DirHandle,
OUT EFI_FILE_INFO *Buffer,
OUT BOOLEAN *NoFile
FileHandleFindNextFile (
IN EFI_FILE_HANDLE DirHandle,
OUT EFI_FILE_INFO *Buffer,
OUT BOOLEAN *NoFile
);
/**
@@ -325,8 +326,8 @@ FileHandleFindNextFile(
EFI_STATUS
EFIAPI
FileHandleGetSize (
IN EFI_FILE_HANDLE FileHandle,
OUT UINT64 *Size
IN EFI_FILE_HANDLE FileHandle,
OUT UINT64 *Size
);
/**
@@ -345,8 +346,8 @@ FileHandleGetSize (
EFI_STATUS
EFIAPI
FileHandleSetSize (
IN EFI_FILE_HANDLE FileHandle,
IN UINT64 Size
IN EFI_FILE_HANDLE FileHandle,
IN UINT64 Size
);
/**
@@ -367,8 +368,8 @@ FileHandleSetSize (
EFI_STATUS
EFIAPI
FileHandleGetFileName (
IN CONST EFI_FILE_HANDLE Handle,
OUT CHAR16 **FullFileName
IN CONST EFI_FILE_HANDLE Handle,
OUT CHAR16 **FullFileName
);
/**
@@ -401,12 +402,12 @@ FileHandleGetFileName (
**/
EFI_STATUS
EFIAPI
FileHandleReadLine(
IN EFI_FILE_HANDLE Handle,
IN OUT CHAR16 *Buffer,
IN OUT UINTN *Size,
IN BOOLEAN Truncate,
IN OUT BOOLEAN *Ascii
FileHandleReadLine (
IN EFI_FILE_HANDLE Handle,
IN OUT CHAR16 *Buffer,
IN OUT UINTN *Size,
IN BOOLEAN Truncate,
IN OUT BOOLEAN *Ascii
);
/**
@@ -424,11 +425,11 @@ FileHandleReadLine(
@sa FileHandleReadLine
**/
CHAR16*
CHAR16 *
EFIAPI
FileHandleReturnLine(
IN EFI_FILE_HANDLE Handle,
IN OUT BOOLEAN *Ascii
FileHandleReturnLine (
IN EFI_FILE_HANDLE Handle,
IN OUT BOOLEAN *Ascii
);
/**
@@ -454,9 +455,9 @@ FileHandleReturnLine(
**/
EFI_STATUS
EFIAPI
FileHandleWriteLine(
IN EFI_FILE_HANDLE Handle,
IN CHAR16 *Buffer
FileHandleWriteLine (
IN EFI_FILE_HANDLE Handle,
IN CHAR16 *Buffer
);
/**
@@ -473,7 +474,7 @@ FileHandleWriteLine(
**/
EFI_STATUS
EFIAPI
FileHandlePrintLine(
FileHandlePrintLine (
IN EFI_FILE_HANDLE Handle,
IN CONST CHAR16 *Format,
...
@@ -493,9 +494,8 @@ FileHandlePrintLine(
**/
BOOLEAN
EFIAPI
FileHandleEof(
IN EFI_FILE_HANDLE Handle
FileHandleEof (
IN EFI_FILE_HANDLE Handle
);
#endif //_FILE_HANDLE_LIBRARY_HEADER_

View File

@@ -58,8 +58,8 @@ GetHobList (
VOID *
EFIAPI
GetNextHob (
IN UINT16 Type,
IN CONST VOID *HobStart
IN UINT16 Type,
IN CONST VOID *HobStart
);
/**
@@ -78,7 +78,7 @@ GetNextHob (
VOID *
EFIAPI
GetFirstHob (
IN UINT16 Type
IN UINT16 Type
);
/**
@@ -106,8 +106,8 @@ GetFirstHob (
VOID *
EFIAPI
GetNextGuidHob (
IN CONST EFI_GUID *Guid,
IN CONST VOID *HobStart
IN CONST EFI_GUID *Guid,
IN CONST VOID *HobStart
);
/**
@@ -131,7 +131,7 @@ GetNextGuidHob (
VOID *
EFIAPI
GetFirstGuidHob (
IN CONST EFI_GUID *Guid
IN CONST EFI_GUID *Guid
);
/**
@@ -172,10 +172,10 @@ GetBootModeHob (
VOID
EFIAPI
BuildModuleHob (
IN CONST EFI_GUID *ModuleName,
IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule,
IN UINT64 ModuleLength,
IN EFI_PHYSICAL_ADDRESS EntryPoint
IN CONST EFI_GUID *ModuleName,
IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule,
IN UINT64 ModuleLength,
IN EFI_PHYSICAL_ADDRESS EntryPoint
);
/**
@@ -253,8 +253,8 @@ BuildResourceDescriptorHob (
VOID *
EFIAPI
BuildGuidHob (
IN CONST EFI_GUID *Guid,
IN UINTN DataLength
IN CONST EFI_GUID *Guid,
IN UINTN DataLength
);
/**
@@ -285,9 +285,9 @@ BuildGuidHob (
VOID *
EFIAPI
BuildGuidDataHob (
IN CONST EFI_GUID *Guid,
IN VOID *Data,
IN UINTN DataLength
IN CONST EFI_GUID *Guid,
IN VOID *Data,
IN UINTN DataLength
);
/**
@@ -307,8 +307,8 @@ BuildGuidDataHob (
VOID
EFIAPI
BuildFvHob (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
);
/**
@@ -330,10 +330,10 @@ BuildFvHob (
VOID
EFIAPI
BuildFv2Hob (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN CONST EFI_GUID *FvName,
IN CONST EFI_GUID *FileName
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN CONST EFI_GUID *FvName,
IN CONST EFI_GUID *FileName
);
/**
@@ -360,12 +360,12 @@ BuildFv2Hob (
VOID
EFIAPI
BuildFv3Hob (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN UINT32 AuthenticationStatus,
IN BOOLEAN ExtractedFv,
IN CONST EFI_GUID *FvName OPTIONAL,
IN CONST EFI_GUID *FileName OPTIONAL
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN UINT32 AuthenticationStatus,
IN BOOLEAN ExtractedFv,
IN CONST EFI_GUID *FvName OPTIONAL,
IN CONST EFI_GUID *FileName OPTIONAL
);
/**
@@ -385,8 +385,8 @@ BuildFv3Hob (
VOID
EFIAPI
BuildCvHob (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
);
/**
@@ -405,8 +405,8 @@ BuildCvHob (
VOID
EFIAPI
BuildCpuHob (
IN UINT8 SizeOfMemorySpace,
IN UINT8 SizeOfIoSpace
IN UINT8 SizeOfMemorySpace,
IN UINT8 SizeOfIoSpace
);
/**
@@ -425,8 +425,8 @@ BuildCpuHob (
VOID
EFIAPI
BuildStackHob (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length
);
/**
@@ -446,9 +446,9 @@ BuildStackHob (
VOID
EFIAPI
BuildBspStoreHob (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN EFI_MEMORY_TYPE MemoryType
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN EFI_MEMORY_TYPE MemoryType
);
/**
@@ -468,9 +468,9 @@ BuildBspStoreHob (
VOID
EFIAPI
BuildMemoryAllocationHob (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN EFI_MEMORY_TYPE MemoryType
IN EFI_PHYSICAL_ADDRESS BaseAddress,
IN UINT64 Length,
IN EFI_MEMORY_TYPE MemoryType
);
/**

View File

@@ -28,8 +28,8 @@
EFI_STATUS
EFIAPI
HstiLibSetTable (
IN VOID *Hsti,
IN UINTN HstiSize
IN VOID *Hsti,
IN UINTN HstiSize
);
/**
@@ -51,10 +51,10 @@ HstiLibSetTable (
EFI_STATUS
EFIAPI
HstiLibGetTable (
IN UINT32 Role,
IN CHAR16 *ImplementationID OPTIONAL,
OUT VOID **Hsti,
OUT UINTN *HstiSize
IN UINT32 Role,
IN CHAR16 *ImplementationID OPTIONAL,
OUT VOID **Hsti,
OUT UINTN *HstiSize
);
/**
@@ -75,10 +75,10 @@ HstiLibGetTable (
EFI_STATUS
EFIAPI
HstiLibSetFeaturesVerified (
IN UINT32 Role,
IN CHAR16 *ImplementationID OPTIONAL,
IN UINT32 ByteIndex,
IN UINT8 BitMask
IN UINT32 Role,
IN CHAR16 *ImplementationID OPTIONAL,
IN UINT32 ByteIndex,
IN UINT8 BitMask
);
/**
@@ -99,10 +99,10 @@ HstiLibSetFeaturesVerified (
EFI_STATUS
EFIAPI
HstiLibClearFeaturesVerified (
IN UINT32 Role,
IN CHAR16 *ImplementationID OPTIONAL,
IN UINT32 ByteIndex,
IN UINT8 BitMask
IN UINT32 Role,
IN CHAR16 *ImplementationID OPTIONAL,
IN UINT32 ByteIndex,
IN UINT8 BitMask
);
/**
@@ -122,9 +122,9 @@ HstiLibClearFeaturesVerified (
EFI_STATUS
EFIAPI
HstiLibAppendErrorString (
IN UINT32 Role,
IN CHAR16 *ImplementationID OPTIONAL,
IN CHAR16 *ErrorString
IN UINT32 Role,
IN CHAR16 *ImplementationID OPTIONAL,
IN CHAR16 *ErrorString
);
/**
@@ -144,9 +144,9 @@ HstiLibAppendErrorString (
EFI_STATUS
EFIAPI
HstiLibSetErrorString (
IN UINT32 Role,
IN CHAR16 *ImplementationID OPTIONAL,
IN CHAR16 *ErrorString
IN UINT32 Role,
IN CHAR16 *ImplementationID OPTIONAL,
IN CHAR16 *ErrorString
);
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -481,7 +481,7 @@ ReallocateReservedPool (
VOID
EFIAPI
FreePool (
IN VOID *Buffer
IN VOID *Buffer
);
#endif

View File

@@ -14,6 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <PiMm.h>
extern EFI_MM_SYSTEM_TABLE *gMmst;
extern EFI_MM_SYSTEM_TABLE *gMmst;
#endif

View File

@@ -37,8 +37,8 @@
RETURN_STATUS
EFIAPI
MmUnblockMemoryRequest (
IN PHYSICAL_ADDRESS UnblockAddress,
IN UINT64 NumberOfPages
);
IN PHYSICAL_ADDRESS UnblockAddress,
IN UINT64 NumberOfPages
);
#endif // MM_UNBLOCK_MEMORY_LIB_H_

View File

@@ -82,7 +82,6 @@ INTN
IN CONST VOID *UserStruct
);
//
// Some functions below are read-only, while others are read-write. If any
// write operation is expected to run concurrently with any other operation on
@@ -104,10 +103,9 @@ INTN
VOID *
EFIAPI
OrderedCollectionUserStruct (
IN CONST ORDERED_COLLECTION_ENTRY *Entry
IN CONST ORDERED_COLLECTION_ENTRY *Entry
);
/**
Allocate and initialize the ORDERED_COLLECTION structure.
@@ -128,11 +126,10 @@ OrderedCollectionUserStruct (
ORDERED_COLLECTION *
EFIAPI
OrderedCollectionInit (
IN ORDERED_COLLECTION_USER_COMPARE UserStructCompare,
IN ORDERED_COLLECTION_KEY_COMPARE KeyCompare
IN ORDERED_COLLECTION_USER_COMPARE UserStructCompare,
IN ORDERED_COLLECTION_KEY_COMPARE KeyCompare
);
/**
Check whether the collection is empty (has no entries).
@@ -147,10 +144,9 @@ OrderedCollectionInit (
BOOLEAN
EFIAPI
OrderedCollectionIsEmpty (
IN CONST ORDERED_COLLECTION *Collection
IN CONST ORDERED_COLLECTION *Collection
);
/**
Uninitialize and release an empty ORDERED_COLLECTION structure.
@@ -164,10 +160,9 @@ OrderedCollectionIsEmpty (
VOID
EFIAPI
OrderedCollectionUninit (
IN ORDERED_COLLECTION *Collection
IN ORDERED_COLLECTION *Collection
);
/**
Look up the collection entry that links the user structure that matches the
specified standalone key.
@@ -188,11 +183,10 @@ OrderedCollectionUninit (
ORDERED_COLLECTION_ENTRY *
EFIAPI
OrderedCollectionFind (
IN CONST ORDERED_COLLECTION *Collection,
IN CONST VOID *StandaloneKey
IN CONST ORDERED_COLLECTION *Collection,
IN CONST VOID *StandaloneKey
);
/**
Find the collection entry of the minimum user structure stored in the
collection.
@@ -211,10 +205,9 @@ OrderedCollectionFind (
ORDERED_COLLECTION_ENTRY *
EFIAPI
OrderedCollectionMin (
IN CONST ORDERED_COLLECTION *Collection
IN CONST ORDERED_COLLECTION *Collection
);
/**
Find the collection entry of the maximum user structure stored in the
collection.
@@ -234,10 +227,9 @@ OrderedCollectionMin (
ORDERED_COLLECTION_ENTRY *
EFIAPI
OrderedCollectionMax (
IN CONST ORDERED_COLLECTION *Collection
IN CONST ORDERED_COLLECTION *Collection
);
/**
Get the collection entry of the least user structure that is greater than the
one linked by Entry.
@@ -255,10 +247,9 @@ OrderedCollectionMax (
ORDERED_COLLECTION_ENTRY *
EFIAPI
OrderedCollectionNext (
IN CONST ORDERED_COLLECTION_ENTRY *Entry
IN CONST ORDERED_COLLECTION_ENTRY *Entry
);
/**
Get the collection entry of the greatest user structure that is less than the
one linked by Entry.
@@ -276,10 +267,9 @@ OrderedCollectionNext (
ORDERED_COLLECTION_ENTRY *
EFIAPI
OrderedCollectionPrev (
IN CONST ORDERED_COLLECTION_ENTRY *Entry
IN CONST ORDERED_COLLECTION_ENTRY *Entry
);
/**
Insert (link) a user structure into the collection, allocating a new
collection entry.
@@ -344,12 +334,11 @@ OrderedCollectionPrev (
RETURN_STATUS
EFIAPI
OrderedCollectionInsert (
IN OUT ORDERED_COLLECTION *Collection,
OUT ORDERED_COLLECTION_ENTRY **Entry OPTIONAL,
IN VOID *UserStruct
IN OUT ORDERED_COLLECTION *Collection,
OUT ORDERED_COLLECTION_ENTRY **Entry OPTIONAL,
IN VOID *UserStruct
);
/**
Delete an entry from the collection, unlinking the associated user structure.
@@ -411,9 +400,9 @@ OrderedCollectionInsert (
VOID
EFIAPI
OrderedCollectionDelete (
IN OUT ORDERED_COLLECTION *Collection,
IN ORDERED_COLLECTION_ENTRY *Entry,
OUT VOID **UserStruct OPTIONAL
IN OUT ORDERED_COLLECTION *Collection,
IN ORDERED_COLLECTION_ENTRY *Entry,
OUT VOID **UserStruct OPTIONAL
);
#endif

View File

@@ -22,7 +22,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef __PCD_LIB_H__
#define __PCD_LIB_H__
/**
Retrieves a token number based on a token name.
@@ -34,8 +33,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The token number associated with the PCD.
**/
#define PcdToken(TokenName) _PCD_TOKEN_##TokenName
#define PcdToken(TokenName) _PCD_TOKEN_##TokenName
/**
Retrieves a Boolean PCD feature flag based on a token name.
@@ -49,8 +47,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Boolean value for the PCD feature flag.
**/
#define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName
#define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName
/**
Retrieves an 8-bit fixed PCD token value based on a token name.
@@ -64,8 +61,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 8-bit value for the token specified by TokenName.
**/
#define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName
#define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName
/**
Retrieves a 16-bit fixed PCD token value based on a token name.
@@ -79,8 +75,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 16-bit value for the token specified by TokenName.
**/
#define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName
#define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName
/**
Retrieves a 32-bit fixed PCD token value based on a token name.
@@ -94,8 +89,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 32-bit value for the token specified by TokenName.
**/
#define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName
#define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName
/**
Retrieves a 64-bit fixed PCD token value based on a token name.
@@ -109,8 +103,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 64-bit value for the token specified by TokenName.
**/
#define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName
#define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName
/**
Retrieves a Boolean fixed PCD token value based on a token name.
@@ -124,8 +117,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The Boolean value for the token.
**/
#define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName
#define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName
/**
Retrieves a pointer to a fixed PCD token buffer based on a token name.
@@ -139,8 +131,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A pointer to the buffer.
**/
#define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)
#define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)
/**
Retrieves an 8-bit binary patchable PCD token value based on a token name.
@@ -154,7 +145,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return An 8-bit binary patchable PCD token value.
**/
#define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
#define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName
/**
Retrieves a 16-bit binary patchable PCD token value based on a token name.
@@ -168,8 +159,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 16-bit binary patchable PCD token value.
**/
#define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
#define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName
/**
Retrieves a 32-bit binary patchable PCD token value based on a token name.
@@ -183,8 +173,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 32-bit binary patchable PCD token value.
**/
#define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
#define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName
/**
Retrieves a 64-bit binary patchable PCD token value based on a token name.
@@ -198,8 +187,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 64-bit binary patchable PCD token value.
**/
#define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
#define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName
/**
Retrieves a Boolean binary patchable PCD token value based on a token name.
@@ -213,8 +201,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The Boolean value for the token.
**/
#define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
#define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName
/**
Retrieves a pointer to a binary patchable PCD token buffer based on a token name.
@@ -228,8 +215,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A pointer to the buffer for the token.
**/
#define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
#define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName)
/**
Sets an 8-bit binary patchable PCD token value based on a token name.
@@ -244,8 +230,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the Value that was set.
**/
#define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
#define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
/**
Sets a 16-bit binary patchable PCD token value based on a token name.
@@ -260,8 +245,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the Value that was set.
**/
#define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
#define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
/**
Sets a 32-bit binary patchable PCD token value based on a token name.
@@ -276,8 +260,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the Value that was set.
**/
#define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
#define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
/**
Sets a 64-bit binary patchable PCD token value based on a token name.
@@ -292,8 +275,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the Value that was set.
**/
#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
/**
Sets a Boolean binary patchable PCD token value based on a token name.
@@ -308,8 +290,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the Value that was set.
**/
#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))
/**
Sets a pointer to a binary patchable PCD token buffer based on a token name.
@@ -340,6 +321,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
(Size), \
(Buffer) \
)
/**
Retrieves an 8-bit PCD token value based on a token name.
@@ -351,8 +333,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 8-bit value for the token specified by TokenName.
**/
#define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName
#define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName
/**
Retrieves a 16-bit PCD token value based on a token name.
@@ -365,8 +346,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 16-bit value for the token specified by TokenName.
**/
#define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName
#define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName
/**
Retrieves a 32-bit PCD token value based on a token name.
@@ -379,8 +359,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 32-bit value for the token specified by TokenName.
**/
#define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName
#define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName
/**
Retrieves a 64-bit PCD token value based on a token name.
@@ -393,8 +372,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return 64-bit value for the token specified by TokenName.
**/
#define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName
#define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName
/**
Retrieves a pointer to a PCD token buffer based on a token name.
@@ -407,8 +385,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A pointer to the buffer.
**/
#define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName
#define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName
/**
Retrieves a Boolean PCD token value based on a token name.
@@ -421,8 +398,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A Boolean PCD token value.
**/
#define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName
#define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName
/**
Retrieves the size of a fixed PCD token based on a token name.
@@ -435,8 +411,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the size
**/
#define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName
#define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName
/**
Retrieves the size of a binary patchable PCD token based on a token name.
@@ -449,8 +424,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the size
**/
#define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName
#define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName
/**
Retrieves the size of the PCD token based on a token name.
@@ -463,8 +437,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the size
**/
#define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName
#define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName
/**
Retrieve the size of a given PCD token.
@@ -479,7 +452,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the size.
**/
#define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName))
#define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName))
/**
Sets a 8-bit PCD token value based on a token name.
@@ -493,7 +466,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
#define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))
#define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value))
/**
Sets a 16-bit PCD token value based on a token name.
@@ -507,7 +480,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
#define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))
#define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value))
/**
Sets a 32-bit PCD token value based on a token name.
@@ -521,7 +494,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
#define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))
#define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value))
/**
Sets a 64-bit PCD token value based on a token name.
@@ -535,7 +508,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
#define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))
#define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value))
/**
Sets a pointer to a PCD token buffer based on a token name.
@@ -561,8 +534,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \
_PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer))
/**
Sets a boolean PCD token value based on a token name.
@@ -575,7 +546,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
#define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))
#define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value))
/**
Retrieves a token number based on a GUID and a token name.
@@ -590,7 +561,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return Return the token number.
**/
#define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid)
#define PcdTokenEx(Guid, TokenName) _PCD_TOKEN_EX_##TokenName(Guid)
/**
Retrieves an 8-bit PCD token value based on a GUID and a token name.
@@ -608,7 +579,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return An 8-bit PCD token value.
**/
#define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))
#define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName))
/**
Retrieves a 16-bit PCD token value based on a GUID and a token name.
@@ -626,8 +597,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 16-bit PCD token value.
**/
#define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))
#define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName))
/**
Retrieves a 32-bit PCD token value based on a GUID and a token name.
@@ -645,8 +615,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 32-bit PCD token value.
**/
#define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))
#define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName))
/**
Retrieves a 64-bit PCD token value based on a GUID and a token name.
@@ -664,8 +633,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A 64-bit PCD token value.
**/
#define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))
#define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName))
/**
Retrieves a pointer to a PCD token buffer based on a GUID and a token name.
@@ -683,8 +651,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A pointer to a PCD token buffer.
**/
#define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))
#define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName))
/**
Retrieves a Boolean PCD token value based on a GUID and a token name.
@@ -702,9 +669,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return A Boolean PCD token value.
**/
#define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))
#define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName))
/**
Sets an 8-bit PCD token value based on a GUID and a token name.
@@ -723,7 +688,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
#define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
#define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
/**
Sets an 16-bit PCD token value based on a GUID and a token name.
@@ -742,7 +707,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
#define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
#define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
/**
Sets an 32-bit PCD token value based on a GUID and a token name.
@@ -761,7 +726,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
#define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
#define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
/**
Sets an 64-bit PCD token value based on a GUID and a token name.
@@ -780,7 +745,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The status of the set operation.
**/
#define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
#define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value))
/**
Sets a pointer to a PCD token buffer based on a GUID and a token name.
@@ -810,7 +775,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \
LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer))
/**
Sets an boolean PCD token value based on a GUID and a token name.
@@ -845,10 +809,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
UINTN
EFIAPI
LibPcdSetSku (
IN UINTN SkuId
IN UINTN SkuId
);
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -862,10 +825,9 @@ LibPcdSetSku (
UINT8
EFIAPI
LibPcdGet8 (
IN UINTN TokenNumber
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -879,10 +841,9 @@ LibPcdGet8 (
UINT16
EFIAPI
LibPcdGet16 (
IN UINTN TokenNumber
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -896,10 +857,9 @@ LibPcdGet16 (
UINT32
EFIAPI
LibPcdGet32 (
IN UINTN TokenNumber
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -913,10 +873,9 @@ LibPcdGet32 (
UINT64
EFIAPI
LibPcdGet64 (
IN UINTN TokenNumber
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -930,10 +889,9 @@ LibPcdGet64 (
VOID *
EFIAPI
LibPcdGetPtr (
IN UINTN TokenNumber
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -947,10 +905,9 @@ LibPcdGetPtr (
BOOLEAN
EFIAPI
LibPcdGetBool (
IN UINTN TokenNumber
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve the size of a given PCD token.
@@ -962,10 +919,9 @@ LibPcdGetBool (
UINTN
EFIAPI
LibPcdGetSize (
IN UINTN TokenNumber
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -983,11 +939,10 @@ LibPcdGetSize (
UINT8
EFIAPI
LibPcdGetEx8 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1005,11 +960,10 @@ LibPcdGetEx8 (
UINT16
EFIAPI
LibPcdGetEx16 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
Returns the 32-bit value for the token specified by TokenNumber and Guid.
If Guid is NULL, then ASSERT().
@@ -1024,11 +978,10 @@ LibPcdGetEx16 (
UINT32
EFIAPI
LibPcdGetEx32 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1046,11 +999,10 @@ LibPcdGetEx32 (
UINT64
EFIAPI
LibPcdGetEx64 (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1068,11 +1020,10 @@ LibPcdGetEx64 (
VOID *
EFIAPI
LibPcdGetExPtr (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve a value for a given PCD token.
@@ -1090,11 +1041,10 @@ LibPcdGetExPtr (
BOOLEAN
EFIAPI
LibPcdGetExBool (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
This function provides a means by which to retrieve the size of a given PCD token.
@@ -1112,11 +1062,10 @@ LibPcdGetExBool (
UINTN
EFIAPI
LibPcdGetExSize (
IN CONST GUID *Guid,
IN UINTN TokenNumber
IN CONST GUID *Guid,
IN UINTN TokenNumber
);
/**
This function provides a means by which to set a value for a given PCD token.
@@ -1132,8 +1081,8 @@ LibPcdGetExSize (
RETURN_STATUS
EFIAPI
LibPcdSet8S (
IN UINTN TokenNumber,
IN UINT8 Value
IN UINTN TokenNumber,
IN UINT8 Value
);
/**
@@ -1151,8 +1100,8 @@ LibPcdSet8S (
RETURN_STATUS
EFIAPI
LibPcdSet16S (
IN UINTN TokenNumber,
IN UINT16 Value
IN UINTN TokenNumber,
IN UINT16 Value
);
/**
@@ -1170,8 +1119,8 @@ LibPcdSet16S (
RETURN_STATUS
EFIAPI
LibPcdSet32S (
IN UINTN TokenNumber,
IN UINT32 Value
IN UINTN TokenNumber,
IN UINT32 Value
);
/**
@@ -1189,8 +1138,8 @@ LibPcdSet32S (
RETURN_STATUS
EFIAPI
LibPcdSet64S (
IN UINTN TokenNumber,
IN UINT64 Value
IN UINTN TokenNumber,
IN UINT64 Value
);
/**
@@ -1218,9 +1167,9 @@ LibPcdSet64S (
RETURN_STATUS
EFIAPI
LibPcdSetPtrS (
IN UINTN TokenNumber,
IN OUT UINTN *SizeOfBuffer,
IN CONST VOID *Buffer
IN UINTN TokenNumber,
IN OUT UINTN *SizeOfBuffer,
IN CONST VOID *Buffer
);
/**
@@ -1238,8 +1187,8 @@ LibPcdSetPtrS (
RETURN_STATUS
EFIAPI
LibPcdSetBoolS (
IN UINTN TokenNumber,
IN BOOLEAN Value
IN UINTN TokenNumber,
IN BOOLEAN Value
);
/**
@@ -1261,9 +1210,9 @@ LibPcdSetBoolS (
RETURN_STATUS
EFIAPI
LibPcdSetEx8S (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT8 Value
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT8 Value
);
/**
@@ -1285,9 +1234,9 @@ LibPcdSetEx8S (
RETURN_STATUS
EFIAPI
LibPcdSetEx16S (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT16 Value
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT16 Value
);
/**
@@ -1309,9 +1258,9 @@ LibPcdSetEx16S (
RETURN_STATUS
EFIAPI
LibPcdSetEx32S (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT32 Value
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT32 Value
);
/**
@@ -1333,9 +1282,9 @@ LibPcdSetEx32S (
RETURN_STATUS
EFIAPI
LibPcdSetEx64S (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT64 Value
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN UINT64 Value
);
/**
@@ -1363,10 +1312,10 @@ LibPcdSetEx64S (
RETURN_STATUS
EFIAPI
LibPcdSetExPtrS (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN OUT UINTN *SizeOfBuffer,
IN VOID *Buffer
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN OUT UINTN *SizeOfBuffer,
IN VOID *Buffer
);
/**
@@ -1388,9 +1337,9 @@ LibPcdSetExPtrS (
RETURN_STATUS
EFIAPI
LibPcdSetExBoolS (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN BOOLEAN Value
IN CONST GUID *Guid,
IN UINTN TokenNumber,
IN BOOLEAN Value
);
/**
@@ -1418,7 +1367,6 @@ VOID
IN UINTN TokenDataSize
);
/**
Set up a notification function that is called when a specified token is set.
@@ -1438,12 +1386,11 @@ VOID
VOID
EFIAPI
LibPcdCallbackOnSet (
IN CONST GUID *Guid OPTIONAL,
IN UINTN TokenNumber,
IN PCD_CALLBACK NotificationFunction
IN CONST GUID *Guid OPTIONAL,
IN UINTN TokenNumber,
IN PCD_CALLBACK NotificationFunction
);
/**
Disable a notification function that was established with LibPcdCallbackonSet().
@@ -1460,12 +1407,11 @@ LibPcdCallbackOnSet (
VOID
EFIAPI
LibPcdCancelCallback (
IN CONST GUID *Guid OPTIONAL,
IN UINTN TokenNumber,
IN PCD_CALLBACK NotificationFunction
IN CONST GUID *Guid OPTIONAL,
IN UINTN TokenNumber,
IN PCD_CALLBACK NotificationFunction
);
/**
Retrieves the next token in a token space.
@@ -1488,12 +1434,10 @@ LibPcdCancelCallback (
UINTN
EFIAPI
LibPcdGetNextToken (
IN CONST GUID *Guid OPTIONAL,
IN UINTN TokenNumber
IN CONST GUID *Guid OPTIONAL,
IN UINTN TokenNumber
);
/**
Used to retrieve the list of available PCD token space GUIDs.
@@ -1513,7 +1457,6 @@ LibPcdGetNextTokenSpace (
IN CONST GUID *TokenSpaceGuid
);
/**
Sets a value of a patchable PCD entry that is type pointer.
@@ -1540,10 +1483,10 @@ LibPcdGetNextTokenSpace (
VOID *
EFIAPI
LibPatchPcdSetPtr (
OUT VOID *PatchVariable,
IN UINTN MaximumDatumSize,
IN OUT UINTN *SizeOfBuffer,
IN CONST VOID *Buffer
OUT VOID *PatchVariable,
IN UINTN MaximumDatumSize,
IN OUT UINTN *SizeOfBuffer,
IN CONST VOID *Buffer
);
/**
@@ -1572,10 +1515,10 @@ LibPatchPcdSetPtr (
RETURN_STATUS
EFIAPI
LibPatchPcdSetPtrS (
OUT VOID *PatchVariable,
IN UINTN MaximumDatumSize,
IN OUT UINTN *SizeOfBuffer,
IN CONST VOID *Buffer
OUT VOID *PatchVariable,
IN UINTN MaximumDatumSize,
IN OUT UINTN *SizeOfBuffer,
IN CONST VOID *Buffer
);
/**
@@ -1606,11 +1549,11 @@ LibPatchPcdSetPtrS (
VOID *
EFIAPI
LibPatchPcdSetPtrAndSize (
OUT VOID *PatchVariable,
OUT UINTN *SizeOfPatchVariable,
IN UINTN MaximumDatumSize,
IN OUT UINTN *SizeOfBuffer,
IN CONST VOID *Buffer
OUT VOID *PatchVariable,
OUT UINTN *SizeOfPatchVariable,
IN UINTN MaximumDatumSize,
IN OUT UINTN *SizeOfBuffer,
IN CONST VOID *Buffer
);
/**
@@ -1641,11 +1584,11 @@ LibPatchPcdSetPtrAndSize (
RETURN_STATUS
EFIAPI
LibPatchPcdSetPtrAndSizeS (
OUT VOID *PatchVariable,
OUT UINTN *SizeOfPatchVariable,
IN UINTN MaximumDatumSize,
IN OUT UINTN *SizeOfBuffer,
IN CONST VOID *Buffer
OUT VOID *PatchVariable,
OUT UINTN *SizeOfPatchVariable,
IN UINTN MaximumDatumSize,
IN OUT UINTN *SizeOfBuffer,
IN CONST VOID *Buffer
);
typedef enum {
@@ -1662,22 +1605,21 @@ typedef struct {
/// The returned information associated with the requested TokenNumber. If
/// TokenNumber is 0, then PcdType is set to PCD_TYPE_8.
///
PCD_TYPE PcdType;
PCD_TYPE PcdType;
///
/// The size of the data in bytes associated with the TokenNumber specified. If
/// TokenNumber is 0, then PcdSize is set 0.
///
UINTN PcdSize;
UINTN PcdSize;
///
/// The null-terminated ASCII string associated with a given token. If the
/// TokenNumber specified was 0, then this field corresponds to the null-terminated
/// ASCII string associated with the token's namespace Guid. If NULL, there is no
/// name associated with this request.
///
CHAR8 *PcdName;
CHAR8 *PcdName;
} PCD_INFO;
/**
Retrieve additional information associated with a PCD token.
@@ -1693,8 +1635,8 @@ typedef struct {
VOID
EFIAPI
LibPcdGetInfo (
IN UINTN TokenNumber,
OUT PCD_INFO *PcdInfo
IN UINTN TokenNumber,
OUT PCD_INFO *PcdInfo
);
/**
@@ -1713,9 +1655,9 @@ LibPcdGetInfo (
VOID
EFIAPI
LibPcdGetInfoEx (
IN CONST GUID *Guid,
IN UINTN TokenNumber,
OUT PCD_INFO *PcdInfo
IN CONST GUID *Guid,
IN UINTN TokenNumber,
OUT PCD_INFO *PcdInfo
);
/**

View File

@@ -13,7 +13,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef __PCI_CF8_LIB_H__
#define __PCI_CF8_LIB_H__
/**
Macro that converts PCI Bus, PCI Device, PCI Function and PCI Register to an
address that can be passed to the PCI Library functions.
@@ -30,7 +29,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The encode PCI address.
**/
#define PCI_CF8_LIB_ADDRESS(Bus,Device,Function,Offset) \
#define PCI_CF8_LIB_ADDRESS(Bus, Device, Function, Offset) \
(((Offset) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20))
/**
@@ -80,7 +79,7 @@ PciCf8RegisterForRuntimeAccess (
UINT8
EFIAPI
PciCf8Read8 (
IN UINTN Address
IN UINTN Address
);
/**
@@ -103,8 +102,8 @@ PciCf8Read8 (
UINT8
EFIAPI
PciCf8Write8 (
IN UINTN Address,
IN UINT8 Value
IN UINTN Address,
IN UINT8 Value
);
/**
@@ -131,8 +130,8 @@ PciCf8Write8 (
UINT8
EFIAPI
PciCf8Or8 (
IN UINTN Address,
IN UINT8 OrData
IN UINTN Address,
IN UINT8 OrData
);
/**
@@ -159,8 +158,8 @@ PciCf8Or8 (
UINT8
EFIAPI
PciCf8And8 (
IN UINTN Address,
IN UINT8 AndData
IN UINTN Address,
IN UINT8 AndData
);
/**
@@ -189,9 +188,9 @@ PciCf8And8 (
UINT8
EFIAPI
PciCf8AndThenOr8 (
IN UINTN Address,
IN UINT8 AndData,
IN UINT8 OrData
IN UINTN Address,
IN UINT8 AndData,
IN UINT8 OrData
);
/**
@@ -219,9 +218,9 @@ PciCf8AndThenOr8 (
UINT8
EFIAPI
PciCf8BitFieldRead8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -252,10 +251,10 @@ PciCf8BitFieldRead8 (
UINT8
EFIAPI
PciCf8BitFieldWrite8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 Value
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 Value
);
/**
@@ -289,10 +288,10 @@ PciCf8BitFieldWrite8 (
UINT8
EFIAPI
PciCf8BitFieldOr8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 OrData
);
/**
@@ -326,10 +325,10 @@ PciCf8BitFieldOr8 (
UINT8
EFIAPI
PciCf8BitFieldAnd8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData
);
/**
@@ -367,11 +366,11 @@ PciCf8BitFieldAnd8 (
UINT8
EFIAPI
PciCf8BitFieldAndThenOr8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData,
IN UINT8 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData,
IN UINT8 OrData
);
/**
@@ -394,7 +393,7 @@ PciCf8BitFieldAndThenOr8 (
UINT16
EFIAPI
PciCf8Read16 (
IN UINTN Address
IN UINTN Address
);
/**
@@ -418,8 +417,8 @@ PciCf8Read16 (
UINT16
EFIAPI
PciCf8Write16 (
IN UINTN Address,
IN UINT16 Value
IN UINTN Address,
IN UINT16 Value
);
/**
@@ -447,8 +446,8 @@ PciCf8Write16 (
UINT16
EFIAPI
PciCf8Or16 (
IN UINTN Address,
IN UINT16 OrData
IN UINTN Address,
IN UINT16 OrData
);
/**
@@ -476,8 +475,8 @@ PciCf8Or16 (
UINT16
EFIAPI
PciCf8And16 (
IN UINTN Address,
IN UINT16 AndData
IN UINTN Address,
IN UINT16 AndData
);
/**
@@ -507,9 +506,9 @@ PciCf8And16 (
UINT16
EFIAPI
PciCf8AndThenOr16 (
IN UINTN Address,
IN UINT16 AndData,
IN UINT16 OrData
IN UINTN Address,
IN UINT16 AndData,
IN UINT16 OrData
);
/**
@@ -538,9 +537,9 @@ PciCf8AndThenOr16 (
UINT16
EFIAPI
PciCf8BitFieldRead16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -572,10 +571,10 @@ PciCf8BitFieldRead16 (
UINT16
EFIAPI
PciCf8BitFieldWrite16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 Value
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 Value
);
/**
@@ -610,10 +609,10 @@ PciCf8BitFieldWrite16 (
UINT16
EFIAPI
PciCf8BitFieldOr16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 OrData
);
/**
@@ -648,10 +647,10 @@ PciCf8BitFieldOr16 (
UINT16
EFIAPI
PciCf8BitFieldAnd16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData
);
/**
@@ -690,11 +689,11 @@ PciCf8BitFieldAnd16 (
UINT16
EFIAPI
PciCf8BitFieldAndThenOr16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData,
IN UINT16 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData,
IN UINT16 OrData
);
/**
@@ -717,7 +716,7 @@ PciCf8BitFieldAndThenOr16 (
UINT32
EFIAPI
PciCf8Read32 (
IN UINTN Address
IN UINTN Address
);
/**
@@ -741,8 +740,8 @@ PciCf8Read32 (
UINT32
EFIAPI
PciCf8Write32 (
IN UINTN Address,
IN UINT32 Value
IN UINTN Address,
IN UINT32 Value
);
/**
@@ -770,8 +769,8 @@ PciCf8Write32 (
UINT32
EFIAPI
PciCf8Or32 (
IN UINTN Address,
IN UINT32 OrData
IN UINTN Address,
IN UINT32 OrData
);
/**
@@ -799,8 +798,8 @@ PciCf8Or32 (
UINT32
EFIAPI
PciCf8And32 (
IN UINTN Address,
IN UINT32 AndData
IN UINTN Address,
IN UINT32 AndData
);
/**
@@ -830,9 +829,9 @@ PciCf8And32 (
UINT32
EFIAPI
PciCf8AndThenOr32 (
IN UINTN Address,
IN UINT32 AndData,
IN UINT32 OrData
IN UINTN Address,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
@@ -861,9 +860,9 @@ PciCf8AndThenOr32 (
UINT32
EFIAPI
PciCf8BitFieldRead32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -895,10 +894,10 @@ PciCf8BitFieldRead32 (
UINT32
EFIAPI
PciCf8BitFieldWrite32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 Value
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 Value
);
/**
@@ -933,10 +932,10 @@ PciCf8BitFieldWrite32 (
UINT32
EFIAPI
PciCf8BitFieldOr32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 OrData
);
/**
@@ -971,10 +970,10 @@ PciCf8BitFieldOr32 (
UINT32
EFIAPI
PciCf8BitFieldAnd32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData
);
/**
@@ -1013,11 +1012,11 @@ PciCf8BitFieldAnd32 (
UINT32
EFIAPI
PciCf8BitFieldAndThenOr32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData,
IN UINT32 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
@@ -1047,9 +1046,9 @@ PciCf8BitFieldAndThenOr32 (
UINTN
EFIAPI
PciCf8ReadBuffer (
IN UINTN StartAddress,
IN UINTN Size,
OUT VOID *Buffer
IN UINTN StartAddress,
IN UINTN Size,
OUT VOID *Buffer
);
/**
@@ -1080,9 +1079,9 @@ PciCf8ReadBuffer (
UINTN
EFIAPI
PciCf8WriteBuffer (
IN UINTN StartAddress,
IN UINTN Size,
IN VOID *Buffer
IN UINTN StartAddress,
IN UINTN Size,
IN VOID *Buffer
);
#endif

View File

@@ -32,7 +32,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The encode PCI address.
**/
#define PCI_EXPRESS_LIB_ADDRESS(Bus,Device,Function,Offset) PCI_ECAM_ADDRESS ((Bus), (Device), (Function), (Offset))
#define PCI_EXPRESS_LIB_ADDRESS(Bus, Device, Function, Offset) PCI_ECAM_ADDRESS ((Bus), (Device), (Function), (Offset))
/**
Registers a PCI device so PCI configuration registers may be accessed after
@@ -80,7 +80,7 @@ PciExpressRegisterForRuntimeAccess (
UINT8
EFIAPI
PciExpressRead8 (
IN UINTN Address
IN UINTN Address
);
/**
@@ -102,8 +102,8 @@ PciExpressRead8 (
UINT8
EFIAPI
PciExpressWrite8 (
IN UINTN Address,
IN UINT8 Value
IN UINTN Address,
IN UINT8 Value
);
/**
@@ -129,8 +129,8 @@ PciExpressWrite8 (
UINT8
EFIAPI
PciExpressOr8 (
IN UINTN Address,
IN UINT8 OrData
IN UINTN Address,
IN UINT8 OrData
);
/**
@@ -156,8 +156,8 @@ PciExpressOr8 (
UINT8
EFIAPI
PciExpressAnd8 (
IN UINTN Address,
IN UINT8 AndData
IN UINTN Address,
IN UINT8 AndData
);
/**
@@ -185,9 +185,9 @@ PciExpressAnd8 (
UINT8
EFIAPI
PciExpressAndThenOr8 (
IN UINTN Address,
IN UINT8 AndData,
IN UINT8 OrData
IN UINTN Address,
IN UINT8 AndData,
IN UINT8 OrData
);
/**
@@ -214,9 +214,9 @@ PciExpressAndThenOr8 (
UINT8
EFIAPI
PciExpressBitFieldRead8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -246,10 +246,10 @@ PciExpressBitFieldRead8 (
UINT8
EFIAPI
PciExpressBitFieldWrite8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 Value
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 Value
);
/**
@@ -282,10 +282,10 @@ PciExpressBitFieldWrite8 (
UINT8
EFIAPI
PciExpressBitFieldOr8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 OrData
);
/**
@@ -318,10 +318,10 @@ PciExpressBitFieldOr8 (
UINT8
EFIAPI
PciExpressBitFieldAnd8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData
);
/**
@@ -358,11 +358,11 @@ PciExpressBitFieldAnd8 (
UINT8
EFIAPI
PciExpressBitFieldAndThenOr8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData,
IN UINT8 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData,
IN UINT8 OrData
);
/**
@@ -384,7 +384,7 @@ PciExpressBitFieldAndThenOr8 (
UINT16
EFIAPI
PciExpressRead16 (
IN UINTN Address
IN UINTN Address
);
/**
@@ -407,8 +407,8 @@ PciExpressRead16 (
UINT16
EFIAPI
PciExpressWrite16 (
IN UINTN Address,
IN UINT16 Value
IN UINTN Address,
IN UINT16 Value
);
/**
@@ -435,8 +435,8 @@ PciExpressWrite16 (
UINT16
EFIAPI
PciExpressOr16 (
IN UINTN Address,
IN UINT16 OrData
IN UINTN Address,
IN UINT16 OrData
);
/**
@@ -463,8 +463,8 @@ PciExpressOr16 (
UINT16
EFIAPI
PciExpressAnd16 (
IN UINTN Address,
IN UINT16 AndData
IN UINTN Address,
IN UINT16 AndData
);
/**
@@ -493,9 +493,9 @@ PciExpressAnd16 (
UINT16
EFIAPI
PciExpressAndThenOr16 (
IN UINTN Address,
IN UINT16 AndData,
IN UINT16 OrData
IN UINTN Address,
IN UINT16 AndData,
IN UINT16 OrData
);
/**
@@ -523,9 +523,9 @@ PciExpressAndThenOr16 (
UINT16
EFIAPI
PciExpressBitFieldRead16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -556,10 +556,10 @@ PciExpressBitFieldRead16 (
UINT16
EFIAPI
PciExpressBitFieldWrite16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 Value
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 Value
);
/**
@@ -593,10 +593,10 @@ PciExpressBitFieldWrite16 (
UINT16
EFIAPI
PciExpressBitFieldOr16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 OrData
);
/**
@@ -630,10 +630,10 @@ PciExpressBitFieldOr16 (
UINT16
EFIAPI
PciExpressBitFieldAnd16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData
);
/**
@@ -671,11 +671,11 @@ PciExpressBitFieldAnd16 (
UINT16
EFIAPI
PciExpressBitFieldAndThenOr16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData,
IN UINT16 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData,
IN UINT16 OrData
);
/**
@@ -697,7 +697,7 @@ PciExpressBitFieldAndThenOr16 (
UINT32
EFIAPI
PciExpressRead32 (
IN UINTN Address
IN UINTN Address
);
/**
@@ -720,8 +720,8 @@ PciExpressRead32 (
UINT32
EFIAPI
PciExpressWrite32 (
IN UINTN Address,
IN UINT32 Value
IN UINTN Address,
IN UINT32 Value
);
/**
@@ -748,8 +748,8 @@ PciExpressWrite32 (
UINT32
EFIAPI
PciExpressOr32 (
IN UINTN Address,
IN UINT32 OrData
IN UINTN Address,
IN UINT32 OrData
);
/**
@@ -776,8 +776,8 @@ PciExpressOr32 (
UINT32
EFIAPI
PciExpressAnd32 (
IN UINTN Address,
IN UINT32 AndData
IN UINTN Address,
IN UINT32 AndData
);
/**
@@ -806,9 +806,9 @@ PciExpressAnd32 (
UINT32
EFIAPI
PciExpressAndThenOr32 (
IN UINTN Address,
IN UINT32 AndData,
IN UINT32 OrData
IN UINTN Address,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
@@ -836,9 +836,9 @@ PciExpressAndThenOr32 (
UINT32
EFIAPI
PciExpressBitFieldRead32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -869,10 +869,10 @@ PciExpressBitFieldRead32 (
UINT32
EFIAPI
PciExpressBitFieldWrite32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 Value
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 Value
);
/**
@@ -906,10 +906,10 @@ PciExpressBitFieldWrite32 (
UINT32
EFIAPI
PciExpressBitFieldOr32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 OrData
);
/**
@@ -943,10 +943,10 @@ PciExpressBitFieldOr32 (
UINT32
EFIAPI
PciExpressBitFieldAnd32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData
);
/**
@@ -984,11 +984,11 @@ PciExpressBitFieldAnd32 (
UINT32
EFIAPI
PciExpressBitFieldAndThenOr32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData,
IN UINT32 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
@@ -1017,9 +1017,9 @@ PciExpressBitFieldAndThenOr32 (
UINTN
EFIAPI
PciExpressReadBuffer (
IN UINTN StartAddress,
IN UINTN Size,
OUT VOID *Buffer
IN UINTN StartAddress,
IN UINTN Size,
OUT VOID *Buffer
);
/**
@@ -1049,9 +1049,9 @@ PciExpressReadBuffer (
UINTN
EFIAPI
PciExpressWriteBuffer (
IN UINTN StartAddress,
IN UINTN Size,
IN VOID *Buffer
IN UINTN StartAddress,
IN UINTN Size,
IN VOID *Buffer
);
#endif

View File

@@ -31,7 +31,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The encoded PCI address.
**/
#define PCI_LIB_ADDRESS(Bus,Device,Function,Register) \
#define PCI_LIB_ADDRESS(Bus, Device, Function, Register) \
(((Register) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20))
/**
@@ -79,7 +79,7 @@ PciRegisterForRuntimeAccess (
UINT8
EFIAPI
PciRead8 (
IN UINTN Address
IN UINTN Address
);
/**
@@ -101,8 +101,8 @@ PciRead8 (
UINT8
EFIAPI
PciWrite8 (
IN UINTN Address,
IN UINT8 Value
IN UINTN Address,
IN UINT8 Value
);
/**
@@ -128,8 +128,8 @@ PciWrite8 (
UINT8
EFIAPI
PciOr8 (
IN UINTN Address,
IN UINT8 OrData
IN UINTN Address,
IN UINT8 OrData
);
/**
@@ -155,8 +155,8 @@ PciOr8 (
UINT8
EFIAPI
PciAnd8 (
IN UINTN Address,
IN UINT8 AndData
IN UINTN Address,
IN UINT8 AndData
);
/**
@@ -184,9 +184,9 @@ PciAnd8 (
UINT8
EFIAPI
PciAndThenOr8 (
IN UINTN Address,
IN UINT8 AndData,
IN UINT8 OrData
IN UINTN Address,
IN UINT8 AndData,
IN UINT8 OrData
);
/**
@@ -213,9 +213,9 @@ PciAndThenOr8 (
UINT8
EFIAPI
PciBitFieldRead8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -245,10 +245,10 @@ PciBitFieldRead8 (
UINT8
EFIAPI
PciBitFieldWrite8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 Value
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 Value
);
/**
@@ -281,10 +281,10 @@ PciBitFieldWrite8 (
UINT8
EFIAPI
PciBitFieldOr8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 OrData
);
/**
@@ -317,10 +317,10 @@ PciBitFieldOr8 (
UINT8
EFIAPI
PciBitFieldAnd8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData
);
/**
@@ -357,11 +357,11 @@ PciBitFieldAnd8 (
UINT8
EFIAPI
PciBitFieldAndThenOr8 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData,
IN UINT8 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData,
IN UINT8 OrData
);
/**
@@ -383,7 +383,7 @@ PciBitFieldAndThenOr8 (
UINT16
EFIAPI
PciRead16 (
IN UINTN Address
IN UINTN Address
);
/**
@@ -406,8 +406,8 @@ PciRead16 (
UINT16
EFIAPI
PciWrite16 (
IN UINTN Address,
IN UINT16 Value
IN UINTN Address,
IN UINT16 Value
);
/**
@@ -434,8 +434,8 @@ PciWrite16 (
UINT16
EFIAPI
PciOr16 (
IN UINTN Address,
IN UINT16 OrData
IN UINTN Address,
IN UINT16 OrData
);
/**
@@ -462,8 +462,8 @@ PciOr16 (
UINT16
EFIAPI
PciAnd16 (
IN UINTN Address,
IN UINT16 AndData
IN UINTN Address,
IN UINT16 AndData
);
/**
@@ -492,9 +492,9 @@ PciAnd16 (
UINT16
EFIAPI
PciAndThenOr16 (
IN UINTN Address,
IN UINT16 AndData,
IN UINT16 OrData
IN UINTN Address,
IN UINT16 AndData,
IN UINT16 OrData
);
/**
@@ -522,9 +522,9 @@ PciAndThenOr16 (
UINT16
EFIAPI
PciBitFieldRead16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -555,10 +555,10 @@ PciBitFieldRead16 (
UINT16
EFIAPI
PciBitFieldWrite16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 Value
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 Value
);
/**
@@ -592,10 +592,10 @@ PciBitFieldWrite16 (
UINT16
EFIAPI
PciBitFieldOr16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 OrData
);
/**
@@ -629,10 +629,10 @@ PciBitFieldOr16 (
UINT16
EFIAPI
PciBitFieldAnd16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData
);
/**
@@ -670,11 +670,11 @@ PciBitFieldAnd16 (
UINT16
EFIAPI
PciBitFieldAndThenOr16 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData,
IN UINT16 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData,
IN UINT16 OrData
);
/**
@@ -696,7 +696,7 @@ PciBitFieldAndThenOr16 (
UINT32
EFIAPI
PciRead32 (
IN UINTN Address
IN UINTN Address
);
/**
@@ -719,8 +719,8 @@ PciRead32 (
UINT32
EFIAPI
PciWrite32 (
IN UINTN Address,
IN UINT32 Value
IN UINTN Address,
IN UINT32 Value
);
/**
@@ -747,8 +747,8 @@ PciWrite32 (
UINT32
EFIAPI
PciOr32 (
IN UINTN Address,
IN UINT32 OrData
IN UINTN Address,
IN UINT32 OrData
);
/**
@@ -775,8 +775,8 @@ PciOr32 (
UINT32
EFIAPI
PciAnd32 (
IN UINTN Address,
IN UINT32 AndData
IN UINTN Address,
IN UINT32 AndData
);
/**
@@ -805,9 +805,9 @@ PciAnd32 (
UINT32
EFIAPI
PciAndThenOr32 (
IN UINTN Address,
IN UINT32 AndData,
IN UINT32 OrData
IN UINTN Address,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
@@ -835,9 +835,9 @@ PciAndThenOr32 (
UINT32
EFIAPI
PciBitFieldRead32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -868,10 +868,10 @@ PciBitFieldRead32 (
UINT32
EFIAPI
PciBitFieldWrite32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 Value
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 Value
);
/**
@@ -905,10 +905,10 @@ PciBitFieldWrite32 (
UINT32
EFIAPI
PciBitFieldOr32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 OrData
);
/**
@@ -942,10 +942,10 @@ PciBitFieldOr32 (
UINT32
EFIAPI
PciBitFieldAnd32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData
);
/**
@@ -983,11 +983,11 @@ PciBitFieldAnd32 (
UINT32
EFIAPI
PciBitFieldAndThenOr32 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData,
IN UINT32 OrData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
@@ -1016,9 +1016,9 @@ PciBitFieldAndThenOr32 (
UINTN
EFIAPI
PciReadBuffer (
IN UINTN StartAddress,
IN UINTN Size,
OUT VOID *Buffer
IN UINTN StartAddress,
IN UINTN Size,
OUT VOID *Buffer
);
/**
@@ -1048,9 +1048,9 @@ PciReadBuffer (
UINTN
EFIAPI
PciWriteBuffer (
IN UINTN StartAddress,
IN UINTN Size,
IN VOID *Buffer
IN UINTN StartAddress,
IN UINTN Size,
IN VOID *Buffer
);
#endif

View File

@@ -12,10 +12,10 @@
#define __PCI_SEGMENT_INFO_LIB__
typedef struct {
UINT16 SegmentNumber; ///< Segment number.
UINT64 BaseAddress; ///< ECAM Base address.
UINT8 StartBusNumber; ///< Start BUS number, for verifying the PCI Segment address.
UINT8 EndBusNumber; ///< End BUS number, for verifying the PCI Segment address.
UINT16 SegmentNumber; ///< Segment number.
UINT64 BaseAddress; ///< ECAM Base address.
UINT8 StartBusNumber; ///< Start BUS number, for verifying the PCI Segment address.
UINT8 EndBusNumber; ///< End BUS number, for verifying the PCI Segment address.
} PCI_SEGMENT_INFO;
/**

View File

@@ -31,7 +31,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef __PCI_SEGMENT_LIB__
#define __PCI_SEGMENT_LIB__
/**
Macro that converts PCI Segment, PCI Bus, PCI Device, PCI Function,
and PCI Register to an address that can be passed to the PCI Segment Library functions.
@@ -49,7 +48,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@return The address that is compatible with the PCI Segment Library functions.
**/
#define PCI_SEGMENT_LIB_ADDRESS(Segment,Bus,Device,Function,Register) \
#define PCI_SEGMENT_LIB_ADDRESS(Segment, Bus, Device, Function, Register) \
((Segment != 0) ? \
( ((Register) & 0xfff) | \
(((Function) & 0x07) << 12) | \
@@ -104,7 +103,7 @@ PciSegmentRegisterForRuntimeAccess (
UINT8
EFIAPI
PciSegmentRead8 (
IN UINT64 Address
IN UINT64 Address
);
/**
@@ -124,8 +123,8 @@ PciSegmentRead8 (
UINT8
EFIAPI
PciSegmentWrite8 (
IN UINT64 Address,
IN UINT8 Value
IN UINT64 Address,
IN UINT8 Value
);
/**
@@ -148,8 +147,8 @@ PciSegmentWrite8 (
UINT8
EFIAPI
PciSegmentOr8 (
IN UINT64 Address,
IN UINT8 OrData
IN UINT64 Address,
IN UINT8 OrData
);
/**
@@ -171,8 +170,8 @@ PciSegmentOr8 (
UINT8
EFIAPI
PciSegmentAnd8 (
IN UINT64 Address,
IN UINT8 AndData
IN UINT64 Address,
IN UINT8 AndData
);
/**
@@ -198,9 +197,9 @@ PciSegmentAnd8 (
UINT8
EFIAPI
PciSegmentAndThenOr8 (
IN UINT64 Address,
IN UINT8 AndData,
IN UINT8 OrData
IN UINT64 Address,
IN UINT8 AndData,
IN UINT8 OrData
);
/**
@@ -227,9 +226,9 @@ PciSegmentAndThenOr8 (
UINT8
EFIAPI
PciSegmentBitFieldRead8 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -259,10 +258,10 @@ PciSegmentBitFieldRead8 (
UINT8
EFIAPI
PciSegmentBitFieldWrite8 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 Value
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 Value
);
/**
@@ -295,10 +294,10 @@ PciSegmentBitFieldWrite8 (
UINT8
EFIAPI
PciSegmentBitFieldOr8 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 OrData
);
/**
@@ -331,10 +330,10 @@ PciSegmentBitFieldOr8 (
UINT8
EFIAPI
PciSegmentBitFieldAnd8 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData
);
/**
@@ -370,11 +369,11 @@ PciSegmentBitFieldAnd8 (
UINT8
EFIAPI
PciSegmentBitFieldAndThenOr8 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData,
IN UINT8 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData,
IN UINT8 OrData
);
/**
@@ -394,7 +393,7 @@ PciSegmentBitFieldAndThenOr8 (
UINT16
EFIAPI
PciSegmentRead16 (
IN UINT64 Address
IN UINT64 Address
);
/**
@@ -415,8 +414,8 @@ PciSegmentRead16 (
UINT16
EFIAPI
PciSegmentWrite16 (
IN UINT64 Address,
IN UINT16 Value
IN UINT64 Address,
IN UINT16 Value
);
/**
@@ -442,8 +441,8 @@ PciSegmentWrite16 (
UINT16
EFIAPI
PciSegmentOr16 (
IN UINT64 Address,
IN UINT16 OrData
IN UINT64 Address,
IN UINT16 OrData
);
/**
@@ -467,8 +466,8 @@ PciSegmentOr16 (
UINT16
EFIAPI
PciSegmentAnd16 (
IN UINT64 Address,
IN UINT16 AndData
IN UINT64 Address,
IN UINT16 AndData
);
/**
@@ -495,9 +494,9 @@ PciSegmentAnd16 (
UINT16
EFIAPI
PciSegmentAndThenOr16 (
IN UINT64 Address,
IN UINT16 AndData,
IN UINT16 OrData
IN UINT64 Address,
IN UINT16 AndData,
IN UINT16 OrData
);
/**
@@ -525,9 +524,9 @@ PciSegmentAndThenOr16 (
UINT16
EFIAPI
PciSegmentBitFieldRead16 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -558,10 +557,10 @@ PciSegmentBitFieldRead16 (
UINT16
EFIAPI
PciSegmentBitFieldWrite16 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 Value
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 Value
);
/**
@@ -595,10 +594,10 @@ PciSegmentBitFieldWrite16 (
UINT16
EFIAPI
PciSegmentBitFieldOr16 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 OrData
);
/**
@@ -632,10 +631,10 @@ PciSegmentBitFieldOr16 (
UINT16
EFIAPI
PciSegmentBitFieldAnd16 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData
);
/**
@@ -672,11 +671,11 @@ PciSegmentBitFieldAnd16 (
UINT16
EFIAPI
PciSegmentBitFieldAndThenOr16 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData,
IN UINT16 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData,
IN UINT16 OrData
);
/**
@@ -696,7 +695,7 @@ PciSegmentBitFieldAndThenOr16 (
UINT32
EFIAPI
PciSegmentRead32 (
IN UINT64 Address
IN UINT64 Address
);
/**
@@ -717,8 +716,8 @@ PciSegmentRead32 (
UINT32
EFIAPI
PciSegmentWrite32 (
IN UINT64 Address,
IN UINT32 Value
IN UINT64 Address,
IN UINT32 Value
);
/**
@@ -742,8 +741,8 @@ PciSegmentWrite32 (
UINT32
EFIAPI
PciSegmentOr32 (
IN UINT64 Address,
IN UINT32 OrData
IN UINT64 Address,
IN UINT32 OrData
);
/**
@@ -767,8 +766,8 @@ PciSegmentOr32 (
UINT32
EFIAPI
PciSegmentAnd32 (
IN UINT64 Address,
IN UINT32 AndData
IN UINT64 Address,
IN UINT32 AndData
);
/**
@@ -795,9 +794,9 @@ PciSegmentAnd32 (
UINT32
EFIAPI
PciSegmentAndThenOr32 (
IN UINT64 Address,
IN UINT32 AndData,
IN UINT32 OrData
IN UINT64 Address,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
@@ -825,9 +824,9 @@ PciSegmentAndThenOr32 (
UINT32
EFIAPI
PciSegmentBitFieldRead32 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -858,10 +857,10 @@ PciSegmentBitFieldRead32 (
UINT32
EFIAPI
PciSegmentBitFieldWrite32 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 Value
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 Value
);
/**
@@ -894,10 +893,10 @@ PciSegmentBitFieldWrite32 (
UINT32
EFIAPI
PciSegmentBitFieldOr32 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 OrData
);
/**
@@ -930,10 +929,10 @@ PciSegmentBitFieldOr32 (
UINT32
EFIAPI
PciSegmentBitFieldAnd32 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData
);
/**
@@ -970,11 +969,11 @@ PciSegmentBitFieldAnd32 (
UINT32
EFIAPI
PciSegmentBitFieldAndThenOr32 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData,
IN UINT32 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
@@ -1003,9 +1002,9 @@ PciSegmentBitFieldAndThenOr32 (
UINTN
EFIAPI
PciSegmentReadBuffer (
IN UINT64 StartAddress,
IN UINTN Size,
OUT VOID *Buffer
IN UINT64 StartAddress,
IN UINTN Size,
OUT VOID *Buffer
);
/**
@@ -1035,9 +1034,9 @@ PciSegmentReadBuffer (
UINTN
EFIAPI
PciSegmentWriteBuffer (
IN UINT64 StartAddress,
IN UINTN Size,
IN VOID *Buffer
IN UINT64 StartAddress,
IN UINTN Size,
IN VOID *Buffer
);
#endif

View File

@@ -76,7 +76,6 @@ PeCoffLoaderGetPdbPointer (
IN VOID *Pe32Data
);
/**
Returns the size of the PE/COFF headers
@@ -92,7 +91,7 @@ PeCoffLoaderGetPdbPointer (
UINT32
EFIAPI
PeCoffGetSizeOfHeaders (
IN VOID *Pe32Data
IN VOID *Pe32Data
);
/**
@@ -110,7 +109,7 @@ PeCoffGetSizeOfHeaders (
UINTN
EFIAPI
PeCoffSearchImageBase (
IN UINTN Address
IN UINTN Address
);
#endif

View File

@@ -76,121 +76,121 @@ typedef struct {
///
/// Set by PeCoffLoaderGetImageInfo() to the ImageBase in the PE/COFF header.
///
PHYSICAL_ADDRESS ImageAddress;
PHYSICAL_ADDRESS ImageAddress;
///
/// Set by PeCoffLoaderGetImageInfo() to the SizeOfImage in the PE/COFF header.
/// Image size includes the size of Debug Entry if it is present.
///
UINT64 ImageSize;
UINT64 ImageSize;
///
/// Is set to zero by PeCoffLoaderGetImageInfo(). If DestinationAddress is non-zero,
/// PeCoffLoaderRelocateImage() will relocate the image using this base address.
/// If the DestinationAddress is zero, the ImageAddress will be used as the base
/// address of relocation.
///
PHYSICAL_ADDRESS DestinationAddress;
PHYSICAL_ADDRESS DestinationAddress;
///
/// PeCoffLoaderLoadImage() sets EntryPoint to to the entry point of the PE/COFF image.
///
PHYSICAL_ADDRESS EntryPoint;
PHYSICAL_ADDRESS EntryPoint;
///
/// Passed in by the caller to PeCoffLoaderGetImageInfo() and PeCoffLoaderLoadImage()
/// to abstract accessing the image from the library.
///
PE_COFF_LOADER_READ_FILE ImageRead;
PE_COFF_LOADER_READ_FILE ImageRead;
///
/// Used as the FileHandle passed into the ImageRead function when it's called.
///
VOID *Handle;
VOID *Handle;
///
/// Caller allocated buffer of size FixupDataSize that can be optionally allocated
/// prior to calling PeCoffLoaderRelocateImage().
/// This buffer is filled with the information used to fix up the image.
/// The fixups have been applied to the image and this entry is just for information.
///
VOID *FixupData;
VOID *FixupData;
///
/// Set by PeCoffLoaderGetImageInfo() to the Section Alignment in the PE/COFF header.
/// If the image is a TE image, then this field is set to 0.
///
UINT32 SectionAlignment;
UINT32 SectionAlignment;
///
/// Set by PeCoffLoaderGetImageInfo() to offset to the PE/COFF header.
/// If the PE/COFF image does not start with a DOS header, this value is zero.
/// Otherwise, it's the offset to the PE/COFF header.
///
UINT32 PeCoffHeaderOffset;
UINT32 PeCoffHeaderOffset;
///
/// Set by PeCoffLoaderGetImageInfo() to the Relative Virtual Address of the debug directory,
/// if it exists in the image
///
UINT32 DebugDirectoryEntryRva;
UINT32 DebugDirectoryEntryRva;
///
/// Set by PeCoffLoaderLoadImage() to CodeView area of the PE/COFF Debug directory.
///
VOID *CodeView;
VOID *CodeView;
///
/// Set by PeCoffLoaderLoadImage() to point to the PDB entry contained in the CodeView area.
/// The PdbPointer points to the filename of the PDB file used for source-level debug of
/// the image by a debugger.
///
CHAR8 *PdbPointer;
CHAR8 *PdbPointer;
///
/// Is set by PeCoffLoaderGetImageInfo() to the Section Alignment in the PE/COFF header.
///
UINTN SizeOfHeaders;
UINTN SizeOfHeaders;
///
/// Not used by this library class. Other library classes that layer on top of this library
/// class fill in this value as part of their GetImageInfo call.
/// This allows the caller of the library to know what type of memory needs to be allocated
/// to load and relocate the image.
///
UINT32 ImageCodeMemoryType;
UINT32 ImageCodeMemoryType;
///
/// Not used by this library class. Other library classes that layer on top of this library
/// class fill in this value as part of their GetImageInfo call.
/// This allows the caller of the library to know what type of memory needs to be allocated
/// to load and relocate the image.
///
UINT32 ImageDataMemoryType;
UINT32 ImageDataMemoryType;
///
/// Set by any of the library functions if they encounter an error.
///
UINT32 ImageError;
UINT32 ImageError;
///
/// Set by PeCoffLoaderLoadImage() to indicate the size of FixupData that the caller must
/// allocate before calling PeCoffLoaderRelocateImage().
///
UINTN FixupDataSize;
UINTN FixupDataSize;
///
/// Set by PeCoffLoaderGetImageInfo() to the machine type stored in the PE/COFF header.
///
UINT16 Machine;
UINT16 Machine;
///
/// Set by PeCoffLoaderGetImageInfo() to the subsystem type stored in the PE/COFF header.
///
UINT16 ImageType;
UINT16 ImageType;
///
/// Set by PeCoffLoaderGetImageInfo() to TRUE if the PE/COFF image does not contain
/// relocation information.
///
BOOLEAN RelocationsStripped;
BOOLEAN RelocationsStripped;
///
/// Set by PeCoffLoaderGetImageInfo() to TRUE if the image is a TE image.
/// For a definition of the TE Image format, see the Platform Initialization Pre-EFI
/// Initialization Core Interface Specification.
///
BOOLEAN IsTeImage;
BOOLEAN IsTeImage;
///
/// Set by PeCoffLoaderLoadImage() to the HII resource offset
/// if the image contains a custom PE/COFF resource with the type 'HII'.
/// Otherwise, the entry remains to be 0.
///
PHYSICAL_ADDRESS HiiResourceData;
PHYSICAL_ADDRESS HiiResourceData;
///
/// Private storage for implementation specific data.
///
UINT64 Context;
UINT64 Context;
} PE_COFF_LOADER_IMAGE_CONTEXT;
/**
@@ -296,7 +296,6 @@ PeCoffLoaderLoadImage (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
);
/**
Reads contents of a PE/COFF image from a buffer in system memory.
@@ -323,13 +322,12 @@ PeCoffLoaderLoadImage (
RETURN_STATUS
EFIAPI
PeCoffLoaderImageReadFromMemory (
IN VOID *FileHandle,
IN UINTN FileOffset,
IN OUT UINTN *ReadSize,
OUT VOID *Buffer
IN VOID *FileHandle,
IN UINTN FileOffset,
IN OUT UINTN *ReadSize,
OUT VOID *Buffer
);
/**
Reapply fixups on a fixed up PE32/PE32+ image to allow virtual calling at EFI
runtime.
@@ -356,10 +354,10 @@ PeCoffLoaderImageReadFromMemory (
VOID
EFIAPI
PeCoffLoaderRelocateImageForRuntime (
IN PHYSICAL_ADDRESS ImageBase,
IN PHYSICAL_ADDRESS VirtImageBase,
IN UINTN ImageSize,
IN VOID *RelocationData
IN PHYSICAL_ADDRESS ImageBase,
IN PHYSICAL_ADDRESS VirtImageBase,
IN UINTN ImageSize,
IN VOID *RelocationData
);
/**
@@ -383,4 +381,5 @@ EFIAPI
PeCoffLoaderUnloadImage (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
);
#endif

View File

@@ -41,7 +41,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
VOID
EFIAPI
_ModuleEntryPoint(
_ModuleEntryPoint (
IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
);
@@ -92,11 +92,10 @@ EfiMain (
VOID
EFIAPI
ProcessLibraryConstructorList (
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
);
/**
Autogenerated function that calls a set of module entry points.

View File

@@ -24,7 +24,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
EFI_STATUS
EFIAPI
PeiServicesInstallPpi (
IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
);
/**
@@ -45,8 +45,8 @@ PeiServicesInstallPpi (
EFI_STATUS
EFIAPI
PeiServicesReInstallPpi (
IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,
IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi
IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,
IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi
);
/**
@@ -65,10 +65,10 @@ PeiServicesReInstallPpi (
EFI_STATUS
EFIAPI
PeiServicesLocatePpi (
IN CONST EFI_GUID *Guid,
IN UINTN Instance,
IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor OPTIONAL,
IN OUT VOID **Ppi
IN CONST EFI_GUID *Guid,
IN UINTN Instance,
IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor OPTIONAL,
IN OUT VOID **Ppi
);
/**
@@ -103,7 +103,7 @@ PeiServicesNotifyPpi (
EFI_STATUS
EFIAPI
PeiServicesGetBootMode (
OUT EFI_BOOT_MODE *BootMode
OUT EFI_BOOT_MODE *BootMode
);
/**
@@ -117,7 +117,7 @@ PeiServicesGetBootMode (
EFI_STATUS
EFIAPI
PeiServicesSetBootMode (
IN EFI_BOOT_MODE BootMode
IN EFI_BOOT_MODE BootMode
);
/**
@@ -132,7 +132,7 @@ PeiServicesSetBootMode (
EFI_STATUS
EFIAPI
PeiServicesGetHobList (
OUT VOID **HobList
OUT VOID **HobList
);
/**
@@ -149,9 +149,9 @@ PeiServicesGetHobList (
EFI_STATUS
EFIAPI
PeiServicesCreateHob (
IN UINT16 Type,
IN UINT16 Length,
OUT VOID **Hob
IN UINT16 Type,
IN UINT16 Length,
OUT VOID **Hob
);
/**
@@ -169,8 +169,8 @@ PeiServicesCreateHob (
EFI_STATUS
EFIAPI
PeiServicesFfsFindNextVolume (
IN UINTN Instance,
IN OUT EFI_PEI_FV_HANDLE *VolumeHandle
IN UINTN Instance,
IN OUT EFI_PEI_FV_HANDLE *VolumeHandle
);
/**
@@ -189,9 +189,9 @@ PeiServicesFfsFindNextVolume (
EFI_STATUS
EFIAPI
PeiServicesFfsFindNextFile (
IN EFI_FV_FILETYPE SearchType,
IN EFI_PEI_FV_HANDLE VolumeHandle,
IN OUT EFI_PEI_FILE_HANDLE *FileHandle
IN EFI_FV_FILETYPE SearchType,
IN EFI_PEI_FV_HANDLE VolumeHandle,
IN OUT EFI_PEI_FILE_HANDLE *FileHandle
);
/**
@@ -209,9 +209,9 @@ PeiServicesFfsFindNextFile (
EFI_STATUS
EFIAPI
PeiServicesFfsFindSectionData (
IN EFI_SECTION_TYPE SectionType,
IN EFI_PEI_FILE_HANDLE FileHandle,
OUT VOID **SectionData
IN EFI_SECTION_TYPE SectionType,
IN EFI_PEI_FILE_HANDLE FileHandle,
OUT VOID **SectionData
);
/**
@@ -231,11 +231,11 @@ PeiServicesFfsFindSectionData (
EFI_STATUS
EFIAPI
PeiServicesFfsFindSectionData3 (
IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance,
IN EFI_PEI_FILE_HANDLE FileHandle,
OUT VOID **SectionData,
OUT UINT32 *AuthenticationStatus
IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance,
IN EFI_PEI_FILE_HANDLE FileHandle,
OUT VOID **SectionData,
OUT UINT32 *AuthenticationStatus
);
/**
@@ -253,8 +253,8 @@ PeiServicesFfsFindSectionData3 (
EFI_STATUS
EFIAPI
PeiServicesInstallPeiMemory (
IN EFI_PHYSICAL_ADDRESS MemoryBegin,
IN UINT64 MemoryLength
IN EFI_PHYSICAL_ADDRESS MemoryBegin,
IN UINT64 MemoryLength
);
/**
@@ -274,9 +274,9 @@ PeiServicesInstallPeiMemory (
EFI_STATUS
EFIAPI
PeiServicesAllocatePages (
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT EFI_PHYSICAL_ADDRESS *Memory
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT EFI_PHYSICAL_ADDRESS *Memory
);
/**
@@ -294,8 +294,8 @@ PeiServicesAllocatePages (
EFI_STATUS
EFIAPI
PeiServicesFreePages (
IN EFI_PHYSICAL_ADDRESS Memory,
IN UINTN Pages
IN EFI_PHYSICAL_ADDRESS Memory,
IN UINTN Pages
);
/**
@@ -312,8 +312,8 @@ PeiServicesFreePages (
EFI_STATUS
EFIAPI
PeiServicesAllocatePool (
IN UINTN Size,
OUT VOID **Buffer
IN UINTN Size,
OUT VOID **Buffer
);
/**
@@ -329,7 +329,6 @@ PeiServicesResetSystem (
VOID
);
/**
This service is a wrapper for the PEI Service FfsFindByName(), except the pointer to the PEI Services
Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
@@ -354,12 +353,11 @@ PeiServicesResetSystem (
EFI_STATUS
EFIAPI
PeiServicesFfsFindFileByName (
IN CONST EFI_GUID *FileName,
IN CONST EFI_PEI_FV_HANDLE VolumeHandle,
OUT EFI_PEI_FILE_HANDLE *FileHandle
IN CONST EFI_GUID *FileName,
IN CONST EFI_PEI_FV_HANDLE VolumeHandle,
OUT EFI_PEI_FILE_HANDLE *FileHandle
);
/**
This service is a wrapper for the PEI Service FfsGetFileInfo(), except the pointer to the PEI Services
Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
@@ -381,8 +379,8 @@ PeiServicesFfsFindFileByName (
EFI_STATUS
EFIAPI
PeiServicesFfsGetFileInfo (
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_FV_FILE_INFO *FileInfo
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_FV_FILE_INFO *FileInfo
);
/**
@@ -406,8 +404,8 @@ PeiServicesFfsGetFileInfo (
EFI_STATUS
EFIAPI
PeiServicesFfsGetFileInfo2 (
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_FV_FILE_INFO2 *FileInfo
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_FV_FILE_INFO2 *FileInfo
);
/**
@@ -431,11 +429,10 @@ PeiServicesFfsGetFileInfo2 (
EFI_STATUS
EFIAPI
PeiServicesFfsGetVolumeInfo (
IN EFI_PEI_FV_HANDLE VolumeHandle,
OUT EFI_FV_INFO *VolumeInfo
IN EFI_PEI_FV_HANDLE VolumeHandle,
OUT EFI_FV_INFO *VolumeInfo
);
/**
This service is a wrapper for the PEI Service RegisterForShadow(), except the pointer to the PEI Services
Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface
@@ -456,7 +453,7 @@ PeiServicesFfsGetVolumeInfo (
EFI_STATUS
EFIAPI
PeiServicesRegisterForShadow (
IN EFI_PEI_FILE_HANDLE FileHandle
IN EFI_PEI_FILE_HANDLE FileHandle
);
/**
@@ -486,11 +483,11 @@ PeiServicesRegisterForShadow (
VOID
EFIAPI
PeiServicesInstallFvInfoPpi (
IN CONST EFI_GUID *FvFormat OPTIONAL,
IN CONST VOID *FvInfo,
IN UINT32 FvInfoSize,
IN CONST EFI_GUID *ParentFvName OPTIONAL,
IN CONST EFI_GUID *ParentFileName OPTIONAL
IN CONST EFI_GUID *FvFormat OPTIONAL,
IN CONST VOID *FvInfo,
IN UINT32 FvInfoSize,
IN CONST EFI_GUID *ParentFvName OPTIONAL,
IN CONST EFI_GUID *ParentFileName OPTIONAL
);
/**
@@ -526,12 +523,12 @@ PeiServicesInstallFvInfoPpi (
VOID
EFIAPI
PeiServicesInstallFvInfo2Ppi (
IN CONST EFI_GUID *FvFormat OPTIONAL,
IN CONST VOID *FvInfo,
IN UINT32 FvInfoSize,
IN CONST EFI_GUID *ParentFvName OPTIONAL,
IN CONST EFI_GUID *ParentFileName OPTIONAL,
IN UINT32 AuthenticationStatus
IN CONST EFI_GUID *FvFormat OPTIONAL,
IN CONST VOID *FvInfo,
IN UINT32 FvInfoSize,
IN CONST EFI_GUID *ParentFvName OPTIONAL,
IN CONST EFI_GUID *ParentFileName OPTIONAL,
IN UINT32 AuthenticationStatus
);
/**
@@ -550,10 +547,10 @@ PeiServicesInstallFvInfo2Ppi (
VOID
EFIAPI
PeiServicesResetSystem2 (
IN EFI_RESET_TYPE ResetType,
IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
IN EFI_RESET_TYPE ResetType,
IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
);
#endif

View File

@@ -41,7 +41,7 @@ GetPeiServicesTablePointer (
VOID
EFIAPI
SetPeiServicesTablePointer (
IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer
IN CONST EFI_PEI_SERVICES **PeiServicesTablePointer
);
/**
@@ -65,4 +65,3 @@ MigratePeiServicesTablePointer (
);
#endif

View File

@@ -12,8 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// Declare the EFI/UEFI Specification Revision to which this driver is implemented
///
extern CONST UINT32 _gPeimRevision;
extern CONST UINT32 _gPeimRevision;
/**
The entry point of PE/COFF Image for a PEIM.
@@ -31,11 +30,10 @@ extern CONST UINT32 _gPeimRevision;
EFI_STATUS
EFIAPI
_ModuleEntryPoint (
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
);
/**
Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
@@ -51,8 +49,8 @@ _ModuleEntryPoint (
EFI_STATUS
EFIAPI
EfiMain (
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
);
/**
@@ -74,8 +72,8 @@ EfiMain (
VOID
EFIAPI
ProcessLibraryConstructorList (
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
);
/**
@@ -96,8 +94,8 @@ ProcessLibraryConstructorList (
EFI_STATUS
EFIAPI
ProcessModuleEntryPointList (
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
);
#endif

View File

@@ -17,41 +17,41 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
// Public Progress Identifiers for Event Records.
//
#define PERF_EVENT_ID 0x00
#define PERF_EVENT_ID 0x00
#define MODULE_START_ID 0x01
#define MODULE_END_ID 0x02
#define MODULE_LOADIMAGE_START_ID 0x03
#define MODULE_LOADIMAGE_END_ID 0x04
#define MODULE_DB_START_ID 0x05
#define MODULE_DB_END_ID 0x06
#define MODULE_DB_SUPPORT_START_ID 0x07
#define MODULE_DB_SUPPORT_END_ID 0x08
#define MODULE_DB_STOP_START_ID 0x09
#define MODULE_DB_STOP_END_ID 0x0A
#define MODULE_START_ID 0x01
#define MODULE_END_ID 0x02
#define MODULE_LOADIMAGE_START_ID 0x03
#define MODULE_LOADIMAGE_END_ID 0x04
#define MODULE_DB_START_ID 0x05
#define MODULE_DB_END_ID 0x06
#define MODULE_DB_SUPPORT_START_ID 0x07
#define MODULE_DB_SUPPORT_END_ID 0x08
#define MODULE_DB_STOP_START_ID 0x09
#define MODULE_DB_STOP_END_ID 0x0A
#define PERF_EVENTSIGNAL_START_ID 0x10
#define PERF_EVENTSIGNAL_END_ID 0x11
#define PERF_CALLBACK_START_ID 0x20
#define PERF_CALLBACK_END_ID 0x21
#define PERF_FUNCTION_START_ID 0x30
#define PERF_FUNCTION_END_ID 0x31
#define PERF_INMODULE_START_ID 0x40
#define PERF_INMODULE_END_ID 0x41
#define PERF_CROSSMODULE_START_ID 0x50
#define PERF_CROSSMODULE_END_ID 0x51
#define PERF_EVENTSIGNAL_START_ID 0x10
#define PERF_EVENTSIGNAL_END_ID 0x11
#define PERF_CALLBACK_START_ID 0x20
#define PERF_CALLBACK_END_ID 0x21
#define PERF_FUNCTION_START_ID 0x30
#define PERF_FUNCTION_END_ID 0x31
#define PERF_INMODULE_START_ID 0x40
#define PERF_INMODULE_END_ID 0x41
#define PERF_CROSSMODULE_START_ID 0x50
#define PERF_CROSSMODULE_END_ID 0x51
//
// Declare bits for PcdPerformanceLibraryPropertyMask and
// also used as the Type parameter of LogPerformanceMeasurementEnabled().
//
#define PERF_CORE_START_IMAGE 0x0002
#define PERF_CORE_LOAD_IMAGE 0x0004
#define PERF_CORE_DB_SUPPORT 0x0008
#define PERF_CORE_DB_START 0x0010
#define PERF_CORE_DB_STOP 0x0020
#define PERF_CORE_START_IMAGE 0x0002
#define PERF_CORE_LOAD_IMAGE 0x0004
#define PERF_CORE_DB_SUPPORT 0x0008
#define PERF_CORE_DB_START 0x0010
#define PERF_CORE_DB_STOP 0x0020
#define PERF_GENERAL_TYPE 0x0040
#define PERF_GENERAL_TYPE 0x0040
/**
Creates a record for the beginning of a performance measurement.
@@ -157,12 +157,12 @@ EndPerformanceMeasurement (
UINTN
EFIAPI
GetPerformanceMeasurement (
IN UINTN LogEntryKey,
OUT CONST VOID **Handle,
OUT CONST CHAR8 **Token,
OUT CONST CHAR8 **Module,
OUT UINT64 *StartTimeStamp,
OUT UINT64 *EndTimeStamp
IN UINTN LogEntryKey,
OUT CONST VOID **Handle,
OUT CONST CHAR8 **Token,
OUT CONST CHAR8 **Module,
OUT UINT64 *StartTimeStamp,
OUT UINT64 *EndTimeStamp
);
/**
@@ -277,13 +277,13 @@ EndPerformanceMeasurementEx (
UINTN
EFIAPI
GetPerformanceMeasurementEx (
IN UINTN LogEntryKey,
OUT CONST VOID **Handle,
OUT CONST CHAR8 **Token,
OUT CONST CHAR8 **Module,
OUT UINT64 *StartTimeStamp,
OUT UINT64 *EndTimeStamp,
OUT UINT32 *Identifier
IN UINTN LogEntryKey,
OUT CONST VOID **Handle,
OUT CONST CHAR8 **Token,
OUT CONST CHAR8 **Module,
OUT UINT64 *StartTimeStamp,
OUT UINT64 *EndTimeStamp,
OUT UINT32 *Identifier
);
/**
@@ -304,7 +304,6 @@ PerformanceMeasurementEnabled (
VOID
);
/**
Check whether the specified performance measurement can be logged.
@@ -320,7 +319,7 @@ PerformanceMeasurementEnabled (
BOOLEAN
EFIAPI
LogPerformanceMeasurementEnabled (
IN CONST UINTN Type
IN CONST UINTN Type
);
/**
@@ -745,7 +744,7 @@ LogPerformanceMeasurement (
Otherwise, the source lines between PERF_CODE_BEGIN() and PERF_CODE_END() are not included in a module.
**/
#define PERF_CODE_END() __PerformanceCodeLocal = 0; __PerformanceCodeLocal++; } } while (FALSE)
#define PERF_CODE_END() __PerformanceCodeLocal = 0; __PerformanceCodeLocal++; } } while (FALSE)
/**
Macro that declares a section of performance measurement source code.
@@ -762,5 +761,4 @@ LogPerformanceMeasurement (
Expression \
PERF_CODE_END ()
#endif

View File

@@ -36,7 +36,6 @@ PostCode (
IN UINT32 Value
);
/**
Sends a 32-bit value to a POST and associated ASCII string.
@@ -68,7 +67,6 @@ PostCodeWithDescription (
IN CONST CHAR8 *Description OPTIONAL
);
/**
Returns TRUE if POST Codes are enabled.
@@ -87,7 +85,6 @@ PostCodeEnabled (
VOID
);
/**
Returns TRUE if POST code descriptions are enabled.
@@ -106,7 +103,6 @@ PostCodeDescriptionEnabled (
VOID
);
/**
Sends a 32-bit value to a POST card.
@@ -134,7 +130,7 @@ PostCodeDescriptionEnabled (
@return Value The 32-bit value to write to the POST card.
**/
#define POST_CODE_WITH_DESCRIPTION(Value,Description) \
#define POST_CODE_WITH_DESCRIPTION(Value, Description) \
PostCodeEnabled() ? \
(PostCodeDescriptionEnabled() ? \
PostCodeWithDescription(Value,Description) : \

View File

@@ -192,10 +192,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
/// Flags bitmask values use in UnicodeValueToString() and
/// AsciiValueToString()
///
#define LEFT_JUSTIFY 0x01
#define COMMA_TYPE 0x08
#define PREFIX_ZERO 0x20
#define RADIX_HEX 0x80
#define LEFT_JUSTIFY 0x01
#define COMMA_TYPE 0x08
#define PREFIX_ZERO 0x20
#define RADIX_HEX 0x80
/**
Produces a Null-terminated Unicode string in an output buffer based on
@@ -586,10 +586,10 @@ UnicodeValueToStringS (
UINTN
EFIAPI
AsciiVSPrint (
OUT CHAR8 *StartOfBuffer,
IN UINTN BufferSize,
IN CONST CHAR8 *FormatString,
IN VA_LIST Marker
OUT CHAR8 *StartOfBuffer,
IN UINTN BufferSize,
IN CONST CHAR8 *FormatString,
IN VA_LIST Marker
);
/**
@@ -630,10 +630,10 @@ AsciiVSPrint (
UINTN
EFIAPI
AsciiBSPrint (
OUT CHAR8 *StartOfBuffer,
IN UINTN BufferSize,
IN CONST CHAR8 *FormatString,
IN BASE_LIST Marker
OUT CHAR8 *StartOfBuffer,
IN UINTN BufferSize,
IN CONST CHAR8 *FormatString,
IN BASE_LIST Marker
);
/**
@@ -826,7 +826,6 @@ AsciiSPrintUnicodeFormat (
...
);
/**
Converts a decimal value to a Null-terminated Ascii string.
@@ -879,11 +878,11 @@ AsciiSPrintUnicodeFormat (
RETURN_STATUS
EFIAPI
AsciiValueToStringS (
IN OUT CHAR8 *Buffer,
IN UINTN BufferSize,
IN UINTN Flags,
IN INT64 Value,
IN UINTN Width
IN OUT CHAR8 *Buffer,
IN UINTN BufferSize,
IN UINTN Flags,
IN INT64 Value,
IN UINTN Width
);
/**
@@ -906,7 +905,7 @@ AsciiValueToStringS (
UINTN
EFIAPI
SPrintLength (
IN CONST CHAR16 *FormatString,
IN CONST CHAR16 *FormatString,
IN VA_LIST Marker
);
@@ -928,8 +927,8 @@ SPrintLength (
UINTN
EFIAPI
SPrintLengthAsciiFormat (
IN CONST CHAR8 *FormatString,
IN VA_LIST Marker
IN CONST CHAR8 *FormatString,
IN VA_LIST Marker
);
#endif

View File

@@ -35,9 +35,9 @@ typedef enum {
BOOLEAN
EFIAPI
FilterBeforeIoRead (
IN FILTER_IO_WIDTH Width,
IN UINTN Address,
IN OUT VOID *Buffer
IN FILTER_IO_WIDTH Width,
IN UINTN Address,
IN OUT VOID *Buffer
);
/**
@@ -56,6 +56,7 @@ FilterAfterIoRead (
IN UINTN Address,
IN VOID *Buffer
);
/**
Filter IO Write operation before wirte IO port.
It is used to filter IO operation.
@@ -79,13 +80,13 @@ FilterBeforeIoWrite (
IN VOID *Buffer
);
/**
Trace IO Write operation after wirte IO port.
It is used to trace IO operation.
/**
Trace IO Write operation after wirte IO port.
It is used to trace IO operation.
@param[in] Width Signifies the width of the I/O operation.
@param[in] Address The base address of the I/O operation.
@param[in] Buffer The source buffer from which to BeforeWrite data.
@param[in] Width Signifies the width of the I/O operation.
@param[in] Address The base address of the I/O operation.
@param[in] Buffer The source buffer from which to BeforeWrite data.
**/
VOID
@@ -188,8 +189,8 @@ FilterAfterMmIoWrite (
BOOLEAN
EFIAPI
FilterBeforeMsrRead (
IN UINT32 Index,
IN OUT UINT64 *Value
IN UINT32 Index,
IN OUT UINT64 *Value
);
/**
@@ -202,8 +203,8 @@ FilterBeforeMsrRead (
VOID
EFIAPI
FilterAfterMsrRead (
IN UINT32 Index,
IN UINT64 *Value
IN UINT32 Index,
IN UINT64 *Value
);
/**
@@ -222,8 +223,8 @@ FilterAfterMsrRead (
BOOLEAN
EFIAPI
FilterBeforeMsrWrite (
IN UINT32 Index,
IN UINT64 *Value
IN UINT32 Index,
IN UINT64 *Value
);
/**
@@ -236,8 +237,8 @@ FilterBeforeMsrWrite (
VOID
EFIAPI
FilterAfterMsrWrite (
IN UINT32 Index,
IN UINT64 *Value
IN UINT32 Index,
IN UINT64 *Value
);
#endif // REGISTER_FILTER_LIB_H_

View File

@@ -16,9 +16,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
// Declare bits for PcdReportStatusCodePropertyMask
//
#define REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED 0x00000001
#define REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED 0x00000002
#define REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED 0x00000004
#define REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED 0x00000001
#define REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED 0x00000002
#define REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED 0x00000004
/**
Converts a status code to an 8-bit POST code value.
@@ -49,7 +49,6 @@ CodeTypeToPostCode (
OUT UINT8 *PostCode
);
/**
Extracts ASSERT() information from a status code structure.
@@ -94,7 +93,6 @@ ReportStatusCodeExtractAssertInfo (
OUT UINT32 *LineNumber
);
/**
Extracts DEBUG() information from a status code structure.
@@ -133,7 +131,6 @@ ReportStatusCodeExtractDebugInfo (
OUT CHAR8 **Format
);
/**
Reports a status code.
@@ -162,7 +159,6 @@ ReportStatusCode (
IN EFI_STATUS_CODE_VALUE Value
);
/**
Reports a status code with a Device Path Protocol as the extended data.
@@ -200,7 +196,6 @@ ReportStatusCodeWithDevicePath (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
);
/**
Reports a status code with an extended data buffer.
@@ -245,7 +240,6 @@ ReportStatusCodeWithExtendedData (
IN UINTN ExtendedDataSize
);
/**
Reports a status code with full parameters.
@@ -300,7 +294,6 @@ ReportStatusCodeEx (
IN UINTN ExtendedDataSize
);
/**
Returns TRUE if status codes of type EFI_PROGRESS_CODE are enabled
@@ -319,7 +312,6 @@ ReportProgressCodeEnabled (
VOID
);
/**
Returns TRUE if status codes of type EFI_ERROR_CODE are enabled
@@ -338,7 +330,6 @@ ReportErrorCodeEnabled (
VOID
);
/**
Returns TRUE if status codes of type EFI_DEBUG_CODE are enabled
@@ -357,7 +348,6 @@ ReportDebugCodeEnabled (
VOID
);
/**
Reports a status code with minimal parameters if the status code type is enabled.
@@ -373,7 +363,7 @@ ReportDebugCodeEnabled (
@retval EFI_UNSUPPORTED Report status code is not supported.
**/
#define REPORT_STATUS_CODE(Type,Value) \
#define REPORT_STATUS_CODE(Type, Value) \
(ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \
ReportStatusCode(Type,Value) : \
(ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \
@@ -382,7 +372,6 @@ ReportDebugCodeEnabled (
ReportStatusCode(Type,Value) : \
EFI_UNSUPPORTED
/**
Reports a status code with a Device Path Protocol as the extended data if the
status code type is enabled.
@@ -404,7 +393,7 @@ ReportDebugCodeEnabled (
is already in progress.
**/
#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type,Value,DevicePathParameter) \
#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type, Value, DevicePathParameter) \
(ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \
ReportStatusCodeWithDevicePath(Type,Value,DevicePathParameter) : \
(ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \
@@ -413,7 +402,6 @@ ReportDebugCodeEnabled (
ReportStatusCodeWithDevicePath(Type,Value,DevicePathParameter) : \
EFI_UNSUPPORTED
/**
Reports a status code with an extended data buffer if the status code type
is enabled.
@@ -437,7 +425,7 @@ ReportDebugCodeEnabled (
is already in progress.
**/
#define REPORT_STATUS_CODE_WITH_EXTENDED_DATA(Type,Value,ExtendedData,ExtendedDataSize) \
#define REPORT_STATUS_CODE_WITH_EXTENDED_DATA(Type, Value, ExtendedData, ExtendedDataSize) \
(ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \
ReportStatusCodeWithExtendedData(Type,Value,ExtendedData,ExtendedDataSize) : \
(ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \
@@ -474,7 +462,7 @@ ReportDebugCodeEnabled (
is already in progress.
**/
#define REPORT_STATUS_CODE_EX(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize) \
#define REPORT_STATUS_CODE_EX(Type, Value, Instance, CallerId, ExtendedDataGuid, ExtendedData, ExtendedDataSize) \
(ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \
ReportStatusCodeEx(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize) : \
(ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \

View File

@@ -29,8 +29,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
RETURN_STATUS
EFIAPI
PublishSystemMemory (
IN PHYSICAL_ADDRESS MemoryBegin,
IN UINT64 MemoryLength
IN PHYSICAL_ADDRESS MemoryBegin,
IN UINT64 MemoryLength
);
#endif

View File

@@ -23,7 +23,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
BOOLEAN
EFIAPI
GetRandomNumber16 (
OUT UINT16 *Rand
OUT UINT16 *Rand
);
/**
@@ -40,7 +40,7 @@ GetRandomNumber16 (
BOOLEAN
EFIAPI
GetRandomNumber32 (
OUT UINT32 *Rand
OUT UINT32 *Rand
);
/**
@@ -57,7 +57,7 @@ GetRandomNumber32 (
BOOLEAN
EFIAPI
GetRandomNumber64 (
OUT UINT64 *Rand
OUT UINT64 *Rand
);
/**
@@ -74,7 +74,7 @@ GetRandomNumber64 (
BOOLEAN
EFIAPI
GetRandomNumber128 (
OUT UINT64 *Rand
OUT UINT64 *Rand
);
#endif // __RNG_LIB_H__
#endif // __RNG_LIB_H__

View File

@@ -30,7 +30,7 @@
@return The encoded PCI address.
**/
#define S3_BOOT_SCRIPT_LIB_PCI_ADDRESS(Bus,Device,Function,Register) \
#define S3_BOOT_SCRIPT_LIB_PCI_ADDRESS(Bus, Device, Function, Register) \
(UINT64) ( \
(((UINTN) Bus) << 24) | \
(((UINTN) Device) << 16) | \
@@ -303,7 +303,7 @@ S3BootScriptSaveDispatch2 (
RETURN_STATUS
EFIAPI
S3BootScriptSaveDispatch (
IN VOID *EntryPoint
IN VOID *EntryPoint
);
/**
@@ -357,6 +357,7 @@ S3BootScriptSaveInformation (
IN UINT32 InformationLength,
IN VOID *Information
);
/**
Adds a record for I/O reads the I/O location and continues when the exit criteria
is satisfied, or after a defined duration.
@@ -379,11 +380,11 @@ S3BootScriptSaveInformation (
RETURN_STATUS
EFIAPI
S3BootScriptSaveIoPoll (
IN S3_BOOT_SCRIPT_LIB_WIDTH Width,
IN UINT64 Address,
IN S3_BOOT_SCRIPT_LIB_WIDTH Width,
IN UINT64 Address,
IN VOID *Data,
IN VOID *DataMask,
IN UINT64 Delay
IN UINT64 Delay
);
/**
@@ -409,12 +410,13 @@ S3BootScriptSaveIoPoll (
RETURN_STATUS
EFIAPI
S3BootScriptSavePciPoll (
IN S3_BOOT_SCRIPT_LIB_WIDTH Width,
IN UINT64 Address,
IN VOID *Data,
IN VOID *DataMask,
IN UINT64 Delay
IN S3_BOOT_SCRIPT_LIB_WIDTH Width,
IN UINT64 Address,
IN VOID *Data,
IN VOID *DataMask,
IN UINT64 Delay
);
/**
Adds a record for PCI configuration space reads and continues when the exit criteria
is satisfied, or after a defined duration.
@@ -444,13 +446,14 @@ S3BootScriptSavePciPoll (
RETURN_STATUS
EFIAPI
S3BootScriptSavePci2Poll (
IN S3_BOOT_SCRIPT_LIB_WIDTH Width,
IN UINT16 Segment,
IN UINT64 Address,
IN VOID *Data,
IN VOID *DataMask,
IN UINT64 Delay
IN S3_BOOT_SCRIPT_LIB_WIDTH Width,
IN UINT16 Segment,
IN UINT64 Address,
IN VOID *Data,
IN VOID *DataMask,
IN UINT64 Delay
);
/**
Save ASCII string information specified by Buffer to boot script with opcode
EFI_BOOT_SCRIPT_INFORMATION_OPCODE.
@@ -493,7 +496,7 @@ S3BootScriptSaveInformationAsciiString (
@return the base address of the new copy of the boot script table.
**/
UINT8*
UINT8 *
EFIAPI
S3BootScriptCloseTable (
VOID
@@ -511,6 +514,7 @@ EFIAPI
S3BootScriptExecute (
VOID
);
/**
Move the last boot script entry to the position
@@ -535,9 +539,10 @@ S3BootScriptExecute (
RETURN_STATUS
EFIAPI
S3BootScriptMoveLastOpcode (
IN BOOLEAN BeforeOrAfter,
IN OUT VOID **Position OPTIONAL
IN BOOLEAN BeforeOrAfter,
IN OUT VOID **Position OPTIONAL
);
/**
Find a label within the boot script table and, if not present, optionally create it.
@@ -565,11 +570,12 @@ S3BootScriptMoveLastOpcode (
RETURN_STATUS
EFIAPI
S3BootScriptLabel (
IN BOOLEAN BeforeOrAfter,
IN BOOLEAN CreateIfNotFound,
IN OUT VOID **Position OPTIONAL,
IN CONST CHAR8 *Label
IN BOOLEAN BeforeOrAfter,
IN BOOLEAN CreateIfNotFound,
IN OUT VOID **Position OPTIONAL,
IN CONST CHAR8 *Label
);
/**
Compare two positions in the boot script table and return their relative position.
@param Position1 The positions in the boot script table to compare
@@ -587,9 +593,9 @@ S3BootScriptLabel (
RETURN_STATUS
EFIAPI
S3BootScriptCompare (
IN UINT8 *Position1,
IN UINT8 *Position2,
OUT UINTN *RelativePosition
IN UINT8 *Position1,
IN UINT8 *Position2,
OUT UINTN *RelativePosition
);
#endif

View File

@@ -1940,9 +1940,9 @@ S3MmioAnd32 (
UINT32
EFIAPI
S3MmioAndThenOr32 (
IN UINTN Address,
IN UINT32 AndData,
IN UINT32 OrData
IN UINTN Address,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
@@ -2214,8 +2214,8 @@ S3MmioOr64 (
UINT64
EFIAPI
S3MmioAnd64 (
IN UINTN Address,
IN UINT64 AndData
IN UINTN Address,
IN UINT64 AndData
);
/**
@@ -2377,10 +2377,10 @@ S3MmioBitFieldOr64 (
UINT64
EFIAPI
S3MmioBitFieldAnd64 (
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT64 AndData
IN UINTN Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT64 AndData
);
/**
@@ -2539,9 +2539,9 @@ S3MmioReadBuffer32 (
UINT64 *
EFIAPI
S3MmioReadBuffer64 (
IN UINTN StartAddress,
IN UINTN Length,
OUT UINT64 *Buffer
IN UINTN StartAddress,
IN UINTN Length,
OUT UINT64 *Buffer
);
/**
@@ -2566,9 +2566,9 @@ S3MmioReadBuffer64 (
UINT8 *
EFIAPI
S3MmioWriteBuffer8 (
IN UINTN StartAddress,
IN UINTN Length,
IN CONST UINT8 *Buffer
IN UINTN StartAddress,
IN UINTN Length,
IN CONST UINT8 *Buffer
);
/**

View File

@@ -25,7 +25,7 @@
@return The encoded PCI address.
**/
#define S3_PCI_LIB_ADDRESS(Bus,Device,Function,Register) \
#define S3_PCI_LIB_ADDRESS(Bus, Device, Function, Register) \
(((Register) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20))
/**

View File

@@ -11,7 +11,6 @@
#ifndef __S3_PCI_SEGMENT_LIB__
#define __S3_PCI_SEGMENT_LIB__
/**
Macro that converts PCI Segment, PCI Bus, PCI Device, PCI Function,
and PCI Register to an address that can be passed to the S3 PCI Segment Library functions.
@@ -29,7 +28,7 @@
@return The address that is compatible with the PCI Segment Library functions.
**/
#define S3_PCI_SEGMENT_LIB_ADDRESS(Segment,Bus,Device,Function,Register) \
#define S3_PCI_SEGMENT_LIB_ADDRESS(Segment, Bus, Device, Function, Register) \
((Segment != 0) ? \
( ((Register) & 0xfff) | \
(((Function) & 0x07) << 12) | \
@@ -61,7 +60,7 @@
UINT8
EFIAPI
S3PciSegmentRead8 (
IN UINT64 Address
IN UINT64 Address
);
/**
@@ -82,8 +81,8 @@ S3PciSegmentRead8 (
UINT8
EFIAPI
S3PciSegmentWrite8 (
IN UINT64 Address,
IN UINT8 Value
IN UINT64 Address,
IN UINT8 Value
);
/**
@@ -107,8 +106,8 @@ S3PciSegmentWrite8 (
UINT8
EFIAPI
S3PciSegmentOr8 (
IN UINT64 Address,
IN UINT8 OrData
IN UINT64 Address,
IN UINT8 OrData
);
/**
@@ -131,8 +130,8 @@ S3PciSegmentOr8 (
UINT8
EFIAPI
S3PciSegmentAnd8 (
IN UINT64 Address,
IN UINT8 AndData
IN UINT64 Address,
IN UINT8 AndData
);
/**
@@ -159,9 +158,9 @@ S3PciSegmentAnd8 (
UINT8
EFIAPI
S3PciSegmentAndThenOr8 (
IN UINT64 Address,
IN UINT8 AndData,
IN UINT8 OrData
IN UINT64 Address,
IN UINT8 AndData,
IN UINT8 OrData
);
/**
@@ -189,9 +188,9 @@ S3PciSegmentAndThenOr8 (
UINT8
EFIAPI
S3PciSegmentBitFieldRead8 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -222,10 +221,10 @@ S3PciSegmentBitFieldRead8 (
UINT8
EFIAPI
S3PciSegmentBitFieldWrite8 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 Value
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 Value
);
/**
@@ -259,10 +258,10 @@ S3PciSegmentBitFieldWrite8 (
UINT8
EFIAPI
S3PciSegmentBitFieldOr8 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 OrData
);
/**
@@ -296,10 +295,10 @@ S3PciSegmentBitFieldOr8 (
UINT8
EFIAPI
S3PciSegmentBitFieldAnd8 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData
);
/**
@@ -336,11 +335,11 @@ S3PciSegmentBitFieldAnd8 (
UINT8
EFIAPI
S3PciSegmentBitFieldAndThenOr8 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData,
IN UINT8 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT8 AndData,
IN UINT8 OrData
);
/**
@@ -361,7 +360,7 @@ S3PciSegmentBitFieldAndThenOr8 (
UINT16
EFIAPI
S3PciSegmentRead16 (
IN UINT64 Address
IN UINT64 Address
);
/**
@@ -383,8 +382,8 @@ S3PciSegmentRead16 (
UINT16
EFIAPI
S3PciSegmentWrite16 (
IN UINT64 Address,
IN UINT16 Value
IN UINT64 Address,
IN UINT16 Value
);
/**
@@ -410,8 +409,8 @@ S3PciSegmentWrite16 (
UINT16
EFIAPI
S3PciSegmentOr16 (
IN UINT64 Address,
IN UINT16 OrData
IN UINT64 Address,
IN UINT16 OrData
);
/**
@@ -436,8 +435,8 @@ S3PciSegmentOr16 (
UINT16
EFIAPI
S3PciSegmentAnd16 (
IN UINT64 Address,
IN UINT16 AndData
IN UINT64 Address,
IN UINT16 AndData
);
/**
@@ -465,9 +464,9 @@ S3PciSegmentAnd16 (
UINT16
EFIAPI
S3PciSegmentAndThenOr16 (
IN UINT64 Address,
IN UINT16 AndData,
IN UINT16 OrData
IN UINT64 Address,
IN UINT16 AndData,
IN UINT16 OrData
);
/**
@@ -496,9 +495,9 @@ S3PciSegmentAndThenOr16 (
UINT16
EFIAPI
S3PciSegmentBitFieldRead16 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -530,10 +529,10 @@ S3PciSegmentBitFieldRead16 (
UINT16
EFIAPI
S3PciSegmentBitFieldWrite16 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 Value
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 Value
);
/**
@@ -568,10 +567,10 @@ S3PciSegmentBitFieldWrite16 (
UINT16
EFIAPI
S3PciSegmentBitFieldOr16 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 OrData
);
/**
@@ -606,10 +605,10 @@ S3PciSegmentBitFieldOr16 (
UINT16
EFIAPI
S3PciSegmentBitFieldAnd16 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData
);
/**
@@ -646,11 +645,11 @@ S3PciSegmentBitFieldAnd16 (
UINT16
EFIAPI
S3PciSegmentBitFieldAndThenOr16 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData,
IN UINT16 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT16 AndData,
IN UINT16 OrData
);
/**
@@ -671,7 +670,7 @@ S3PciSegmentBitFieldAndThenOr16 (
UINT32
EFIAPI
S3PciSegmentRead32 (
IN UINT64 Address
IN UINT64 Address
);
/**
@@ -693,8 +692,8 @@ S3PciSegmentRead32 (
UINT32
EFIAPI
S3PciSegmentWrite32 (
IN UINT64 Address,
IN UINT32 Value
IN UINT64 Address,
IN UINT32 Value
);
/**
@@ -720,8 +719,8 @@ S3PciSegmentWrite32 (
UINT32
EFIAPI
S3PciSegmentOr32 (
IN UINT64 Address,
IN UINT32 OrData
IN UINT64 Address,
IN UINT32 OrData
);
/**
@@ -746,8 +745,8 @@ S3PciSegmentOr32 (
UINT32
EFIAPI
S3PciSegmentAnd32 (
IN UINT64 Address,
IN UINT32 AndData
IN UINT64 Address,
IN UINT32 AndData
);
/**
@@ -775,9 +774,9 @@ S3PciSegmentAnd32 (
UINT32
EFIAPI
S3PciSegmentAndThenOr32 (
IN UINT64 Address,
IN UINT32 AndData,
IN UINT32 OrData
IN UINT64 Address,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
@@ -806,9 +805,9 @@ S3PciSegmentAndThenOr32 (
UINT32
EFIAPI
S3PciSegmentBitFieldRead32 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
@@ -840,10 +839,10 @@ S3PciSegmentBitFieldRead32 (
UINT32
EFIAPI
S3PciSegmentBitFieldWrite32 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 Value
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 Value
);
/**
@@ -878,10 +877,10 @@ S3PciSegmentBitFieldWrite32 (
UINT32
EFIAPI
S3PciSegmentBitFieldOr32 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 OrData
);
/**
@@ -916,10 +915,10 @@ S3PciSegmentBitFieldOr32 (
UINT32
EFIAPI
S3PciSegmentBitFieldAnd32 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData
);
/**
@@ -956,11 +955,11 @@ S3PciSegmentBitFieldAnd32 (
UINT32
EFIAPI
S3PciSegmentBitFieldAndThenOr32 (
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData,
IN UINT32 OrData
IN UINT64 Address,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
@@ -990,9 +989,9 @@ S3PciSegmentBitFieldAndThenOr32 (
UINTN
EFIAPI
S3PciSegmentReadBuffer (
IN UINT64 StartAddress,
IN UINTN Size,
OUT VOID *Buffer
IN UINT64 StartAddress,
IN UINTN Size,
OUT VOID *Buffer
);
/**
@@ -1023,9 +1022,9 @@ S3PciSegmentReadBuffer (
UINTN
EFIAPI
S3PciSegmentWriteBuffer (
IN UINT64 StartAddress,
IN UINTN Size,
IN VOID *Buffer
IN UINT64 StartAddress,
IN UINTN Size,
IN VOID *Buffer
);
#endif

View File

@@ -8,6 +8,7 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef __INT_SAFE_LIB_H__
#define __INT_SAFE_LIB_H__
@@ -40,14 +41,14 @@
#define SafeIntnToChar16 SafeIntnToUint16
#define SafeUintnToChar16 SafeUintnToUint16
#define SafeChar16ToInt8 SafeUint16ToInt8
#define SafeChar16ToUint8 SafeUint16ToUint8
#define SafeChar16ToChar8 SafeUint16ToChar8
#define SafeChar16ToInt16 SafeUint16ToInt16
#define SafeChar16ToInt8 SafeUint16ToInt8
#define SafeChar16ToUint8 SafeUint16ToUint8
#define SafeChar16ToChar8 SafeUint16ToChar8
#define SafeChar16ToInt16 SafeUint16ToInt16
#define SafeChar16Mult SafeUint16Mult
#define SafeChar16Sub SafeUint16Sub
#define SafeChar16Add SafeUint16Add
#define SafeChar16Mult SafeUint16Mult
#define SafeChar16Sub SafeUint16Sub
#define SafeChar16Add SafeUint16Add
//
// Conversion functions
@@ -357,8 +358,8 @@ SafeInt16ToChar8 (
RETURN_STATUS
EFIAPI
SafeInt16ToUint8 (
IN INT16 Operand,
OUT UINT8 *Result
IN INT16 Operand,
OUT UINT8 *Result
);
/**
@@ -546,8 +547,8 @@ SafeUint16ToChar8 (
RETURN_STATUS
EFIAPI
SafeUint16ToUint8 (
IN UINT16 Operand,
OUT UINT8 *Result
IN UINT16 Operand,
OUT UINT8 *Result
);
/**
@@ -654,8 +655,8 @@ SafeInt32ToChar8 (
RETURN_STATUS
EFIAPI
SafeInt32ToUint8 (
IN INT32 Operand,
OUT UINT8 *Result
IN INT32 Operand,
OUT UINT8 *Result
);
/**
@@ -712,7 +713,6 @@ SafeInt32ToUint16 (
OUT UINT16 *Result
);
/**
INT32 -> UINT32 conversion
@@ -871,8 +871,8 @@ SafeUint32ToChar8 (
RETURN_STATUS
EFIAPI
SafeUint32ToUint8 (
IN UINT32 Operand,
OUT UINT8 *Result
IN UINT32 Operand,
OUT UINT8 *Result
);
/**
@@ -1060,8 +1060,8 @@ SafeIntnToChar8 (
RETURN_STATUS
EFIAPI
SafeIntnToUint8 (
IN INTN Operand,
OUT UINT8 *Result
IN INTN Operand,
OUT UINT8 *Result
);
/**
@@ -1303,8 +1303,8 @@ SafeUintnToChar8 (
RETURN_STATUS
EFIAPI
SafeUintnToUint8 (
IN UINTN Operand,
OUT UINT8 *Result
IN UINTN Operand,
OUT UINT8 *Result
);
/**

View File

@@ -50,11 +50,10 @@ SerialPortInitialize (
UINTN
EFIAPI
SerialPortWrite (
IN UINT8 *Buffer,
IN UINTN NumberOfBytes
IN UINT8 *Buffer,
IN UINTN NumberOfBytes
);
/**
Read data from serial device and save the datas in buffer.
@@ -74,8 +73,8 @@ SerialPortWrite (
UINTN
EFIAPI
SerialPortRead (
OUT UINT8 *Buffer,
IN UINTN NumberOfBytes
OUT UINT8 *Buffer,
IN UINTN NumberOfBytes
);
/**
@@ -108,7 +107,7 @@ SerialPortPoll (
RETURN_STATUS
EFIAPI
SerialPortSetControl (
IN UINT32 Control
IN UINT32 Control
);
/**
@@ -124,7 +123,7 @@ SerialPortSetControl (
RETURN_STATUS
EFIAPI
SerialPortGetControl (
OUT UINT32 *Control
OUT UINT32 *Control
);
/**
@@ -163,12 +162,12 @@ SerialPortGetControl (
RETURN_STATUS
EFIAPI
SerialPortSetAttributes (
IN OUT UINT64 *BaudRate,
IN OUT UINT32 *ReceiveFifoDepth,
IN OUT UINT32 *Timeout,
IN OUT EFI_PARITY_TYPE *Parity,
IN OUT UINT8 *DataBits,
IN OUT EFI_STOP_BITS_TYPE *StopBits
IN OUT UINT64 *BaudRate,
IN OUT UINT32 *ReceiveFifoDepth,
IN OUT UINT32 *Timeout,
IN OUT EFI_PARITY_TYPE *Parity,
IN OUT UINT8 *DataBits,
IN OUT EFI_STOP_BITS_TYPE *StopBits
);
#endif

View File

@@ -24,7 +24,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@param Pec TRUE if Packet Error Checking is enabled. Otherwise FALSE.
**/
#define SMBUS_LIB_ADDRESS(SlaveAddress,Command,Length,Pec) \
#define SMBUS_LIB_ADDRESS(SlaveAddress, Command, Length, Pec) \
( ((Pec) ? BIT22: 0) | \
(((SlaveAddress) & 0x7f) << 1) | \
(((Command) & 0xff) << 8) | \
@@ -36,35 +36,35 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC
**/
#define SMBUS_LIB_SLAVE_ADDRESS(SmBusAddress) (((SmBusAddress) >> 1) & 0x7f)
#define SMBUS_LIB_SLAVE_ADDRESS(SmBusAddress) (((SmBusAddress) >> 1) & 0x7f)
/**
Macro that returns the SMBUS Command value from an SmBusAddress Parameter value.
@param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC
**/
#define SMBUS_LIB_COMMAND(SmBusAddress) (((SmBusAddress) >> 8) & 0xff)
#define SMBUS_LIB_COMMAND(SmBusAddress) (((SmBusAddress) >> 8) & 0xff)
/**
Macro that returns the SMBUS Data Length value from an SmBusAddress Parameter value.
@param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC
**/
#define SMBUS_LIB_LENGTH(SmBusAddress) (((SmBusAddress) >> 16) & 0x3f)
#define SMBUS_LIB_LENGTH(SmBusAddress) (((SmBusAddress) >> 16) & 0x3f)
/**
Macro that returns the SMBUS PEC value from an SmBusAddress Parameter value.
@param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC
**/
#define SMBUS_LIB_PEC(SmBusAddress) ((BOOLEAN) (((SmBusAddress) & BIT22) != 0))
#define SMBUS_LIB_PEC(SmBusAddress) ((BOOLEAN) (((SmBusAddress) & BIT22) != 0))
/**
Macro that returns the set of reserved bits from an SmBusAddress Parameter value.
@param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC
**/
#define SMBUS_LIB_RESERVED(SmBusAddress) ((SmBusAddress) & ~(BIT23 - 2))
#define SMBUS_LIB_RESERVED(SmBusAddress) ((SmBusAddress) & ~(BIT23 - 2))
/**
Executes an SMBUS quick read command.
@@ -93,8 +93,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
VOID
EFIAPI
SmBusQuickRead (
IN UINTN SmBusAddress,
OUT RETURN_STATUS *Status OPTIONAL
IN UINTN SmBusAddress,
OUT RETURN_STATUS *Status OPTIONAL
);
/**
@@ -124,8 +124,8 @@ SmBusQuickRead (
VOID
EFIAPI
SmBusQuickWrite (
IN UINTN SmBusAddress,
OUT RETURN_STATUS *Status OPTIONAL
IN UINTN SmBusAddress,
OUT RETURN_STATUS *Status OPTIONAL
);
/**
@@ -487,5 +487,4 @@ SmBusBlockProcessCall (
OUT RETURN_STATUS *Status OPTIONAL
);
#endif

View File

@@ -45,11 +45,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
EFI_STATUS
EFIAPI
SmiHandlerProfileRegisterHandler (
IN EFI_GUID *HandlerGuid,
IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
IN PHYSICAL_ADDRESS CallerAddress,
IN VOID *Context OPTIONAL,
IN UINTN ContextSize OPTIONAL
IN EFI_GUID *HandlerGuid,
IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
IN PHYSICAL_ADDRESS CallerAddress,
IN VOID *Context OPTIONAL,
IN UINTN ContextSize OPTIONAL
);
/**
@@ -72,10 +72,10 @@ SmiHandlerProfileRegisterHandler (
EFI_STATUS
EFIAPI
SmiHandlerProfileUnregisterHandler (
IN EFI_GUID *HandlerGuid,
IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
IN VOID *Context OPTIONAL,
IN UINTN ContextSize OPTIONAL
IN EFI_GUID *HandlerGuid,
IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
IN VOID *Context OPTIONAL,
IN UINTN ContextSize OPTIONAL
);
#endif

View File

@@ -33,4 +33,3 @@ SmmIsMmioValid (
);
#endif

View File

@@ -11,7 +11,6 @@
#ifndef __SMM_LIB_H__
#define __SMM_LIB_H__
/**
Triggers an SMI at boot time.
@@ -24,7 +23,6 @@ TriggerBootServiceSoftwareSmi (
VOID
);
/**
Triggers an SMI at run time.
@@ -37,7 +35,6 @@ TriggerRuntimeSoftwareSmi (
VOID
);
/**
Test if a boot time software SMI happened.
@@ -54,7 +51,6 @@ IsBootServiceSoftwareSmi (
VOID
);
/**
Test if a run time software SMI happened.
@@ -80,4 +76,5 @@ EFIAPI
ClearSmi (
VOID
);
#endif

View File

@@ -96,7 +96,7 @@ PeriodicSmiYield (
**/
typedef
VOID
(EFIAPI *PERIODIC_SMI_LIBRARY_HANDLER) (
(EFIAPI *PERIODIC_SMI_LIBRARY_HANDLER)(
IN CONST VOID *Context OPTIONAL,
IN UINT64 ElapsedTime
);

View File

@@ -15,7 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// Cache pointer to the SMM Services Table
///
extern EFI_SMM_SYSTEM_TABLE2 *gSmst;
extern EFI_SMM_SYSTEM_TABLE2 *gSmst;
/**
This function allows the caller to determine if the driver is executing in

View File

@@ -16,12 +16,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
/// Declare the PI Specification Revision that this driver requires to execute
/// correctly.
///
extern CONST UINT32 _gMmRevision;
extern CONST UINT32 _gMmRevision;
///
/// Declare the number of unload handler in the image.
///
extern CONST UINT8 _gDriverUnloadImageCount;
extern CONST UINT8 _gDriverUnloadImageCount;
/**
The entry point of PE/COFF Image for a Standalone MM Driver.
@@ -48,11 +48,10 @@ extern CONST UINT8 _gDriverUnloadImageCount;
EFI_STATUS
EFIAPI
_ModuleEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_MM_SYSTEM_TABLE *MmSystemTable
IN EFI_HANDLE ImageHandle,
IN EFI_MM_SYSTEM_TABLE *MmSystemTable
);
/**
Auto generated function that calls the library constructors for all of the
module's dependent libraries.
@@ -74,11 +73,10 @@ _ModuleEntryPoint (
VOID
EFIAPI
ProcessLibraryConstructorList (
IN EFI_HANDLE ImageHandle,
IN EFI_MM_SYSTEM_TABLE *MmSystemTable
IN EFI_HANDLE ImageHandle,
IN EFI_MM_SYSTEM_TABLE *MmSystemTable
);
/**
Auto generated function that calls the library descructors for all of the
module's dependent libraries.
@@ -100,11 +98,10 @@ ProcessLibraryConstructorList (
VOID
EFIAPI
ProcessLibraryDestructorList (
IN EFI_HANDLE ImageHandle,
IN EFI_MM_SYSTEM_TABLE *MmSystemTable
IN EFI_HANDLE ImageHandle,
IN EFI_MM_SYSTEM_TABLE *MmSystemTable
);
/**
Auto generated function that calls a set of module entry points.
@@ -123,8 +120,8 @@ ProcessLibraryDestructorList (
EFI_STATUS
EFIAPI
ProcessModuleEntryPointList (
IN EFI_HANDLE ImageHandle,
IN EFI_MM_SYSTEM_TABLE *MmSystemTable
IN EFI_HANDLE ImageHandle,
IN EFI_MM_SYSTEM_TABLE *MmSystemTable
);
/**

View File

@@ -12,8 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// Definitions for SPIN_LOCK
///
typedef volatile UINTN SPIN_LOCK;
typedef volatile UINTN SPIN_LOCK;
/**
Retrieves the architecture-specific spin lock alignment requirements for
@@ -37,7 +36,6 @@ GetSpinLockProperties (
VOID
);
/**
Initializes a spin lock to the released state and returns the spin lock.
@@ -57,10 +55,9 @@ GetSpinLockProperties (
SPIN_LOCK *
EFIAPI
InitializeSpinLock (
OUT SPIN_LOCK *SpinLock
OUT SPIN_LOCK *SpinLock
);
/**
Waits until a spin lock can be placed in the acquired state.
@@ -84,10 +81,9 @@ InitializeSpinLock (
SPIN_LOCK *
EFIAPI
AcquireSpinLock (
IN OUT SPIN_LOCK *SpinLock
IN OUT SPIN_LOCK *SpinLock
);
/**
Attempts to place a spin lock in the acquired state.
@@ -108,10 +104,9 @@ AcquireSpinLock (
BOOLEAN
EFIAPI
AcquireSpinLockOrFail (
IN OUT SPIN_LOCK *SpinLock
IN OUT SPIN_LOCK *SpinLock
);
/**
Releases a spin lock.
@@ -129,10 +124,9 @@ AcquireSpinLockOrFail (
SPIN_LOCK *
EFIAPI
ReleaseSpinLock (
IN OUT SPIN_LOCK *SpinLock
IN OUT SPIN_LOCK *SpinLock
);
/**
Performs an atomic increment of a 32-bit unsigned integer.
@@ -150,10 +144,9 @@ ReleaseSpinLock (
UINT32
EFIAPI
InterlockedIncrement (
IN volatile UINT32 *Value
IN volatile UINT32 *Value
);
/**
Performs an atomic decrement of a 32-bit unsigned integer.
@@ -171,10 +164,9 @@ InterlockedIncrement (
UINT32
EFIAPI
InterlockedDecrement (
IN volatile UINT32 *Value
IN volatile UINT32 *Value
);
/**
Performs an atomic compare exchange operation on a 16-bit unsigned integer.
@@ -196,9 +188,9 @@ InterlockedDecrement (
UINT16
EFIAPI
InterlockedCompareExchange16 (
IN OUT volatile UINT16 *Value,
IN UINT16 CompareValue,
IN UINT16 ExchangeValue
IN OUT volatile UINT16 *Value,
IN UINT16 CompareValue,
IN UINT16 ExchangeValue
);
/**
@@ -223,12 +215,11 @@ InterlockedCompareExchange16 (
UINT32
EFIAPI
InterlockedCompareExchange32 (
IN OUT volatile UINT32 *Value,
IN UINT32 CompareValue,
IN UINT32 ExchangeValue
IN OUT volatile UINT32 *Value,
IN UINT32 CompareValue,
IN UINT32 ExchangeValue
);
/**
Performs an atomic compare exchange operation on a 64-bit unsigned integer.
@@ -250,12 +241,11 @@ InterlockedCompareExchange32 (
UINT64
EFIAPI
InterlockedCompareExchange64 (
IN OUT volatile UINT64 *Value,
IN UINT64 CompareValue,
IN UINT64 ExchangeValue
IN OUT volatile UINT64 *Value,
IN UINT64 CompareValue,
IN UINT64 ExchangeValue
);
/**
Performs an atomic compare exchange operation on a pointer value.
@@ -277,11 +267,9 @@ InterlockedCompareExchange64 (
VOID *
EFIAPI
InterlockedCompareExchangePointer (
IN OUT VOID * volatile *Value,
IN VOID *CompareValue,
IN VOID *ExchangeValue
IN OUT VOID *volatile *Value,
IN VOID *CompareValue,
IN VOID *ExchangeValue
);
#endif

View File

@@ -22,7 +22,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
UINTN
EFIAPI
MicroSecondDelay (
IN UINTN MicroSeconds
IN UINTN MicroSeconds
);
/**
@@ -38,7 +38,7 @@ MicroSecondDelay (
UINTN
EFIAPI
NanoSecondDelay (
IN UINTN NanoSeconds
IN UINTN NanoSeconds
);
/**
@@ -84,8 +84,8 @@ GetPerformanceCounter (
UINT64
EFIAPI
GetPerformanceCounterProperties (
OUT UINT64 *StartValue OPTIONAL,
OUT UINT64 *EndValue OPTIONAL
OUT UINT64 *StartValue OPTIONAL,
OUT UINT64 *EndValue OPTIONAL
);
/**
@@ -102,7 +102,7 @@ GetPerformanceCounterProperties (
UINT64
EFIAPI
GetTimeInNanoSecond (
IN UINT64 Ticks
IN UINT64 Ticks
);
#endif

View File

@@ -12,8 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// Declare the EFI/UEFI Specification Revision to which this driver is implemented
///
extern CONST UINT32 _gUefiDriverRevision;
extern CONST UINT32 _gUefiDriverRevision;
/**
Entry point to UEFI Application.
@@ -39,7 +38,6 @@ _ModuleEntryPoint (
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
@@ -58,7 +56,6 @@ EfiMain (
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
Invokes the library destructors for all dependent libraries and terminates
the UEFI Application.
@@ -75,7 +72,6 @@ Exit (
IN EFI_STATUS Status
);
/**
Autogenerated function that calls the library constructors for all of the module's
dependent libraries.
@@ -100,7 +96,6 @@ ProcessLibraryConstructorList (
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
Autogenerated function that calls the library descructors for all of the module's
dependent libraries.

View File

@@ -13,12 +13,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
///
/// Cache the Image Handle
///
extern EFI_HANDLE gImageHandle;
extern EFI_HANDLE gImageHandle;
///
/// Cache pointer to the EFI System Table
///
extern EFI_SYSTEM_TABLE *gST;
extern EFI_SYSTEM_TABLE *gST;
///
/// Cache pointer to the EFI Boot Services Table

View File

@@ -11,20 +11,19 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define __MODULE_ENTRY_POINT_H__
///
///Declare the PI Specification Revision that this driver requires to execute correctly.
/// Declare the PI Specification Revision that this driver requires to execute correctly.
///
extern CONST UINT32 _gDxeRevision;
extern CONST UINT32 _gDxeRevision;
///
/// Declare the EFI/UEFI Specification Revision to which this driver is implemented
///
extern CONST UINT32 _gUefiDriverRevision;
extern CONST UINT32 _gUefiDriverRevision;
///
/// Declare the number of unload handler in the image.
///
extern CONST UINT8 _gDriverUnloadImageCount;
extern CONST UINT8 _gDriverUnloadImageCount;
/**
The entry point of PE/COFF Image for a DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver.
@@ -56,7 +55,6 @@ _ModuleEntryPoint (
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
@@ -77,7 +75,6 @@ EfiMain (
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
Invokes the library destructors for all dependent libraries and terminates the
DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver.
@@ -94,7 +91,6 @@ ExitDriver (
IN EFI_STATUS Status
);
/**
Autogenerated function that calls the library constructors for all of the module's
dependent libraries.
@@ -119,7 +115,6 @@ ProcessLibraryConstructorList (
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
Autogenerated function that calls the library descructors for all of the module's
dependent libraries.
@@ -143,7 +138,6 @@ ProcessLibraryDestructorList (
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
Autogenerated function that calls a set of module entry points.
@@ -165,7 +159,6 @@ ProcessModuleEntryPointList (
IN EFI_SYSTEM_TABLE *SystemTable
);
/**
Autogenerated function that calls a set of module unload handlers.

View File

@@ -39,8 +39,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
/// Unicode String Table
///
typedef struct {
CHAR8 *Language;
CHAR16 *UnicodeString;
CHAR8 *Language;
CHAR16 *UnicodeString;
} EFI_UNICODE_STRING_TABLE;
///
@@ -56,9 +56,9 @@ typedef enum {
/// EFI Lock
///
typedef struct {
EFI_TPL Tpl;
EFI_TPL OwnerTpl;
EFI_LOCK_STATE Lock;
EFI_TPL Tpl;
EFI_TPL OwnerTpl;
EFI_LOCK_STATE Lock;
} EFI_LOCK;
/**
@@ -71,7 +71,7 @@ typedef struct {
by Microseconds.
**/
#define EFI_TIMER_PERIOD_MICROSECONDS(Microseconds) MultU64x32((UINT64)(Microseconds), 10)
#define EFI_TIMER_PERIOD_MICROSECONDS(Microseconds) MultU64x32((UINT64)(Microseconds), 10)
/**
Macro that returns the number of 100 ns units for a specified number of milliseconds.
@@ -83,7 +83,7 @@ typedef struct {
by Milliseconds.
**/
#define EFI_TIMER_PERIOD_MILLISECONDS(Milliseconds) MultU64x32((UINT64)(Milliseconds), 10000)
#define EFI_TIMER_PERIOD_MILLISECONDS(Milliseconds) MultU64x32((UINT64)(Milliseconds), 10000)
/**
Macro that returns the number of 100 ns units for a specified number of seconds.
@@ -95,7 +95,7 @@ typedef struct {
by Seconds.
**/
#define EFI_TIMER_PERIOD_SECONDS(Seconds) MultU64x32((UINT64)(Seconds), 10000000)
#define EFI_TIMER_PERIOD_SECONDS(Seconds) MultU64x32((UINT64)(Seconds), 10000000)
/**
Macro that returns the a pointer to the next EFI_MEMORY_DESCRIPTOR in an array
@@ -165,7 +165,7 @@ EfiGetSystemConfigurationTable (
**/
EFI_EVENT
EFIAPI
EfiCreateProtocolNotifyEvent(
EfiCreateProtocolNotifyEvent (
IN EFI_GUID *ProtocolGuid,
IN EFI_TPL NotifyTpl,
IN EFI_EVENT_NOTIFY NotifyFunction,
@@ -237,7 +237,7 @@ EfiNamedEventSignal (
EFI_STATUS
EFIAPI
EfiEventGroupSignal (
IN CONST EFI_GUID *EventGroup
IN CONST EFI_GUID *EventGroup
);
/**
@@ -252,8 +252,8 @@ EfiEventGroupSignal (
VOID
EFIAPI
EfiEventEmptyFunction (
IN EFI_EVENT Event,
IN VOID *Context
IN EFI_EVENT Event,
IN VOID *Context
);
/**
@@ -294,7 +294,7 @@ EFI_LOCK *
EFIAPI
EfiInitializeLock (
IN OUT EFI_LOCK *Lock,
IN EFI_TPL Priority
IN EFI_TPL Priority
);
/**
@@ -313,7 +313,6 @@ EfiInitializeLock (
#define EFI_INITIALIZE_LOCK_VARIABLE(Priority) \
{Priority, TPL_APPLICATION, EfiLockReleased }
/**
Macro that calls DebugAssert() if an EFI_LOCK structure is not in the locked state.
@@ -328,8 +327,8 @@ EfiInitializeLock (
@param LockParameter A pointer to the lock to acquire.
**/
#if !defined(MDEPKG_NDEBUG)
#define ASSERT_LOCKED(LockParameter) \
#if !defined (MDEPKG_NDEBUG)
#define ASSERT_LOCKED(LockParameter) \
do { \
if (DebugAssertEnabled ()) { \
ASSERT (LockParameter != NULL); \
@@ -339,10 +338,9 @@ EfiInitializeLock (
} \
} while (FALSE)
#else
#define ASSERT_LOCKED(LockParameter)
#define ASSERT_LOCKED(LockParameter)
#endif
/**
Acquires ownership of a lock.
@@ -429,9 +427,9 @@ EfiReleaseLock (
EFI_STATUS
EFIAPI
EfiTestManagedDevice (
IN CONST EFI_HANDLE ControllerHandle,
IN CONST EFI_HANDLE DriverBindingHandle,
IN CONST EFI_GUID *ProtocolGuid
IN CONST EFI_HANDLE ControllerHandle,
IN CONST EFI_HANDLE DriverBindingHandle,
IN CONST EFI_GUID *ProtocolGuid
);
/**
@@ -456,9 +454,9 @@ EfiTestManagedDevice (
EFI_STATUS
EFIAPI
EfiTestChildHandle (
IN CONST EFI_HANDLE ControllerHandle,
IN CONST EFI_HANDLE ChildHandle,
IN CONST EFI_GUID *ProtocolGuid
IN CONST EFI_HANDLE ControllerHandle,
IN CONST EFI_HANDLE ChildHandle,
IN CONST EFI_GUID *ProtocolGuid
);
/**
@@ -475,8 +473,8 @@ EfiTestChildHandle (
EFI_STATUS
EFIAPI
IsLanguageSupported (
IN CONST CHAR8 *SupportedLanguages,
IN CONST CHAR8 *TargetLanguage
IN CONST CHAR8 *SupportedLanguages,
IN CONST CHAR8 *TargetLanguage
);
/**
@@ -680,7 +678,6 @@ FreeUnicodeStringTable (
IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable
);
/**
Returns the status whether get the variable success. The function retrieves
variable through the UEFI Runtime Service GetVariable(). The
@@ -732,9 +729,9 @@ GetVariable2 (
EFI_STATUS
EFIAPI
GetEfiGlobalVariable2 (
IN CONST CHAR16 *Name,
OUT VOID **Value,
OUT UINTN *Size OPTIONAL
IN CONST CHAR16 *Name,
OUT VOID **Value,
OUT UINTN *Size OPTIONAL
);
/** Return the attributes of the variable.
@@ -762,12 +759,12 @@ GetEfiGlobalVariable2 (
**/
EFI_STATUS
EFIAPI
GetVariable3(
IN CONST CHAR16 *Name,
IN CONST EFI_GUID *Guid,
OUT VOID **Value,
OUT UINTN *Size OPTIONAL,
OUT UINT32 *Attr OPTIONAL
GetVariable3 (
IN CONST CHAR16 *Name,
IN CONST EFI_GUID *Guid,
OUT VOID **Value,
OUT UINTN *Size OPTIONAL,
OUT UINT32 *Attr OPTIONAL
);
/**
@@ -889,6 +886,7 @@ UnicodeStringDisplayLength (
//
// Functions that abstract early Framework contamination of UEFI.
//
/**
Create, Signal, and Close the Ready to Boot event using EfiSignalEventReadyToBoot().
@@ -1174,7 +1172,6 @@ AsciiErrorPrint (
...
);
/**
Prints a formatted Unicode string to a graphics console device specified by
ConsoleOutputHandle defined in the EFI_SYSTEM_TABLE at the given (X,Y) coordinates.
@@ -1218,11 +1215,11 @@ AsciiErrorPrint (
UINTN
EFIAPI
PrintXY (
IN UINTN PointX,
IN UINTN PointY,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL,
IN CONST CHAR16 *Format,
IN UINTN PointX,
IN UINTN PointY,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL,
IN CONST CHAR16 *Format,
...
);
@@ -1268,15 +1265,14 @@ PrintXY (
UINTN
EFIAPI
AsciiPrintXY (
IN UINTN PointX,
IN UINTN PointY,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL,
IN CONST CHAR8 *Format,
IN UINTN PointX,
IN UINTN PointY,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL,
IN CONST CHAR8 *Format,
...
);
/**
Installs and completes the initialization of a Driver Binding Protocol instance.
@@ -1308,7 +1304,6 @@ EfiLibInstallDriverBinding (
IN EFI_HANDLE DriverBindingHandle
);
/**
Uninstalls a Driver Binding Protocol instance.
@@ -1327,7 +1322,6 @@ EfiLibUninstallDriverBinding (
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding
);
/**
Installs and completes the initialization of a Driver Binding Protocol instance and
optionally installs the Component Name, Driver Configuration and Driver Diagnostics Protocols.
@@ -1366,7 +1360,6 @@ EfiLibInstallAllDriverProtocols (
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL
);
/**
Uninstalls a Driver Binding Protocol instance and optionally uninstalls the
Component Name, Driver Configuration and Driver Diagnostics Protocols.
@@ -1392,7 +1385,6 @@ EfiLibUninstallAllDriverProtocols (
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL
);
/**
Installs Driver Binding Protocol with optional Component Name and Component Name 2 Protocols.
@@ -1419,15 +1411,14 @@ EfiLibUninstallAllDriverProtocols (
EFI_STATUS
EFIAPI
EfiLibInstallDriverBindingComponentName2 (
IN CONST EFI_HANDLE ImageHandle,
IN CONST EFI_SYSTEM_TABLE *SystemTable,
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
IN EFI_HANDLE DriverBindingHandle,
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL
IN CONST EFI_HANDLE ImageHandle,
IN CONST EFI_SYSTEM_TABLE *SystemTable,
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
IN EFI_HANDLE DriverBindingHandle,
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL
);
/**
Uninstalls Driver Binding Protocol with optional Component Name and Component Name 2 Protocols.
@@ -1445,12 +1436,11 @@ EfiLibInstallDriverBindingComponentName2 (
EFI_STATUS
EFIAPI
EfiLibUninstallDriverBindingComponentName2 (
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL
);
/**
Installs Driver Binding Protocol with optional Component Name, Component Name 2, Driver
Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols.
@@ -1483,19 +1473,18 @@ EfiLibUninstallDriverBindingComponentName2 (
EFI_STATUS
EFIAPI
EfiLibInstallAllDriverProtocols2 (
IN CONST EFI_HANDLE ImageHandle,
IN CONST EFI_SYSTEM_TABLE *SystemTable,
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
IN EFI_HANDLE DriverBindingHandle,
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL,
IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL,
IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL,
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL,
IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL
IN CONST EFI_HANDLE ImageHandle,
IN CONST EFI_SYSTEM_TABLE *SystemTable,
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
IN EFI_HANDLE DriverBindingHandle,
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL,
IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL,
IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL,
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL,
IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL
);
/**
Uninstalls Driver Binding Protocol with optional Component Name, Component Name 2, Driver
Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols.
@@ -1519,16 +1508,15 @@ EfiLibInstallAllDriverProtocols2 (
EFI_STATUS
EFIAPI
EfiLibUninstallAllDriverProtocols2 (
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL,
IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL,
IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL,
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL,
IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding,
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL,
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL,
IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL,
IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL,
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL,
IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL
);
/**
Appends a formatted Unicode string to a Null-terminated Unicode string
@@ -1550,10 +1538,10 @@ EfiLibUninstallAllDriverProtocols2 (
@return Null-terminated Unicode string is that is the formatted
string appended to String.
**/
CHAR16*
CHAR16 *
EFIAPI
CatVSPrint (
IN CHAR16 *String OPTIONAL,
IN CHAR16 *String OPTIONAL,
IN CONST CHAR16 *FormatString,
IN VA_LIST Marker
);
@@ -1584,7 +1572,7 @@ CatVSPrint (
CHAR16 *
EFIAPI
CatSPrint (
IN CHAR16 *String OPTIONAL,
IN CHAR16 *String OPTIONAL,
IN CONST CHAR16 *FormatString,
...
);
@@ -1731,8 +1719,8 @@ EfiOpenFileByDevicePath (
EFI_ACPI_COMMON_HEADER *
EFIAPI
EfiLocateNextAcpiTable (
IN UINT32 Signature,
IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL
IN UINT32 Signature,
IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL
);
/**
@@ -1755,7 +1743,7 @@ EfiLocateNextAcpiTable (
EFI_ACPI_COMMON_HEADER *
EFIAPI
EfiLocateFirstAcpiTable (
IN UINT32 Signature
IN UINT32 Signature
);
#endif

View File

@@ -69,8 +69,8 @@ EfiGoneVirtual (
EFI_STATUS
EFIAPI
EfiGetTime (
OUT EFI_TIME *Time,
OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL
OUT EFI_TIME *Time,
OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL
);
/**
@@ -98,7 +98,7 @@ EfiGetTime (
EFI_STATUS
EFIAPI
EfiSetTime (
IN EFI_TIME *Time
IN EFI_TIME *Time
);
/**
@@ -125,9 +125,9 @@ EfiSetTime (
EFI_STATUS
EFIAPI
EfiGetWakeupTime (
OUT BOOLEAN *Enabled,
OUT BOOLEAN *Pending,
OUT EFI_TIME *Time
OUT BOOLEAN *Enabled,
OUT BOOLEAN *Pending,
OUT EFI_TIME *Time
);
/**
@@ -155,8 +155,8 @@ EfiGetWakeupTime (
EFI_STATUS
EFIAPI
EfiSetWakeupTime (
IN BOOLEAN Enable,
IN EFI_TIME *Time OPTIONAL
IN BOOLEAN Enable,
IN EFI_TIME *Time OPTIONAL
);
/**
@@ -192,11 +192,11 @@ EfiSetWakeupTime (
EFI_STATUS
EFIAPI
EfiGetVariable (
IN CHAR16 *VariableName,
IN EFI_GUID *VendorGuid,
OUT UINT32 *Attributes OPTIONAL,
IN OUT UINTN *DataSize,
OUT VOID *Data
IN CHAR16 *VariableName,
IN EFI_GUID *VendorGuid,
OUT UINT32 *Attributes OPTIONAL,
IN OUT UINTN *DataSize,
OUT VOID *Data
);
/**
@@ -232,9 +232,9 @@ EfiGetVariable (
EFI_STATUS
EFIAPI
EfiGetNextVariableName (
IN OUT UINTN *VariableNameSize,
IN OUT CHAR16 *VariableName,
IN OUT EFI_GUID *VendorGuid
IN OUT UINTN *VariableNameSize,
IN OUT CHAR16 *VariableName,
IN OUT EFI_GUID *VendorGuid
);
/**
@@ -269,11 +269,11 @@ EfiGetNextVariableName (
EFI_STATUS
EFIAPI
EfiSetVariable (
IN CHAR16 *VariableName,
IN EFI_GUID *VendorGuid,
IN UINT32 Attributes,
IN UINTN DataSize,
IN VOID *Data
IN CHAR16 *VariableName,
IN EFI_GUID *VendorGuid,
IN UINT32 Attributes,
IN UINTN DataSize,
IN VOID *Data
);
/**
@@ -295,7 +295,7 @@ EfiSetVariable (
EFI_STATUS
EFIAPI
EfiGetNextHighMonotonicCount (
OUT UINT32 *HighCount
OUT UINT32 *HighCount
);
/**
@@ -329,10 +329,10 @@ EfiGetNextHighMonotonicCount (
VOID
EFIAPI
EfiResetSystem (
IN EFI_RESET_TYPE ResetType,
IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
IN EFI_RESET_TYPE ResetType,
IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
);
/**
@@ -356,8 +356,8 @@ EfiResetSystem (
EFI_STATUS
EFIAPI
EfiConvertPointer (
IN UINTN DebugDisposition,
IN OUT VOID **Address
IN UINTN DebugDisposition,
IN OUT VOID **Address
);
/**
@@ -385,8 +385,8 @@ EfiConvertPointer (
EFI_STATUS
EFIAPI
EfiConvertFunctionPointer (
IN UINTN DebugDisposition,
IN OUT VOID **Address
IN UINTN DebugDisposition,
IN OUT VOID **Address
);
/**
@@ -418,13 +418,12 @@ EfiConvertFunctionPointer (
EFI_STATUS
EFIAPI
EfiSetVirtualAddressMap (
IN UINTN MemoryMapSize,
IN UINTN DescriptorSize,
IN UINT32 DescriptorVersion,
IN CONST EFI_MEMORY_DESCRIPTOR *VirtualMap
IN UINTN MemoryMapSize,
IN UINTN DescriptorSize,
IN UINT32 DescriptorVersion,
IN CONST EFI_MEMORY_DESCRIPTOR *VirtualMap
);
/**
Convert the standard Lib double linked list to a virtual mapping.
@@ -442,8 +441,8 @@ EfiSetVirtualAddressMap (
EFI_STATUS
EFIAPI
EfiConvertList (
IN UINTN DebugDisposition,
IN OUT LIST_ENTRY *ListHead
IN UINTN DebugDisposition,
IN OUT LIST_ENTRY *ListHead
);
/**
@@ -484,12 +483,11 @@ EfiConvertList (
EFI_STATUS
EFIAPI
EfiUpdateCapsule (
IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,
IN UINTN CapsuleCount,
IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL
IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,
IN UINTN CapsuleCount,
IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL
);
/**
This service is a wrapper for the UEFI Runtime Service QueryCapsuleCapabilities().
@@ -527,13 +525,12 @@ EfiUpdateCapsule (
EFI_STATUS
EFIAPI
EfiQueryCapsuleCapabilities (
IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,
IN UINTN CapsuleCount,
OUT UINT64 *MaximumCapsuleSize,
OUT EFI_RESET_TYPE *ResetType
IN EFI_CAPSULE_HEADER **CapsuleHeaderArray,
IN UINTN CapsuleCount,
OUT UINT64 *MaximumCapsuleSize,
OUT EFI_RESET_TYPE *ResetType
);
/**
This service is a wrapper for the UEFI Runtime Service QueryVariableInfo().
@@ -578,4 +575,3 @@ EfiQueryVariableInfo (
);
#endif

View File

@@ -89,11 +89,10 @@ ScsiTestUnitReadyCommand (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus
);
/**
Execute Inquiry SCSI command on a specific SCSI target.
@@ -188,14 +187,13 @@ ScsiInquiryCommand (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *InquiryDataBuffer OPTIONAL,
IN OUT UINT32 *InquiryDataLength,
IN BOOLEAN EnableVitalProductData
);
/**
Execute Inquiry SCSI command on a specific SCSI target.
@@ -292,15 +290,14 @@ ScsiInquiryCommandEx (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *InquiryDataBuffer OPTIONAL,
IN OUT UINT32 *InquiryDataLength,
IN BOOLEAN EnableVitalProductData,
IN UINT8 PageCode
);
/**
Execute Mode Sense(10) SCSI command on a specific SCSI target.
@@ -393,21 +390,19 @@ ScsiInquiryCommandEx (
EFI_STATUS
EFIAPI
ScsiModeSense10Command (
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN UINT8 DBDField OPTIONAL,
IN UINT8 PageControl,
IN UINT8 PageCode
IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN UINT8 DBDField OPTIONAL,
IN UINT8 PageControl,
IN UINT8 PageCode
);
/**
Execute Request Sense SCSI command on a specific SCSI target.
@@ -447,11 +442,10 @@ ScsiRequestSenseCommand (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus
);
/**
Execute Read Capacity SCSI command on a specific SCSI target.
@@ -503,14 +497,13 @@ ScsiReadCapacityCommand (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN BOOLEAN Pmi
);
/**
Execute Read Capacity SCSI 16 command on a specific SCSI target.
@@ -562,14 +555,13 @@ ScsiReadCapacity16Command (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN BOOLEAN Pmi
);
/**
Execute Read(10) SCSI command on a specific SCSI target.
@@ -622,15 +614,14 @@ ScsiRead10Command (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN UINT32 StartLba,
IN UINT32 SectorSize
);
/**
Execute Write(10) SCSI command on a specific SCSI target.
@@ -683,8 +674,8 @@ ScsiWrite10Command (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN UINT32 StartLba,
@@ -743,15 +734,14 @@ ScsiRead16Command (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN UINT64 StartLba,
IN UINT32 SectorSize
);
/**
Execute Write(16) SCSI command on a specific SCSI target.
@@ -804,15 +794,14 @@ ScsiWrite16Command (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN UINT64 StartLba,
IN UINT32 SectorSize
);
/**
Execute Security Protocol In SCSI command on a specific SCSI target.
@@ -868,17 +857,16 @@ ScsiSecurityProtocolInCommand (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN UINT8 SecurityProtocol,
IN UINT16 SecurityProtocolSpecific,
IN BOOLEAN Inc512,
IN UINTN DataLength,
IN OUT VOID *DataBuffer OPTIONAL,
OUT UINTN *TransferLength
OUT UINTN *TransferLength
);
/**
Execute Security Protocol Out SCSI command on a specific SCSI target.
@@ -931,8 +919,8 @@ ScsiSecurityProtocolOutCommand (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN UINT8 SecurityProtocol,
IN UINT16 SecurityProtocolSpecific,
IN BOOLEAN Inc512,
@@ -940,7 +928,6 @@ ScsiSecurityProtocolOutCommand (
IN OUT VOID *DataBuffer OPTIONAL
);
/**
Execute blocking/non-blocking Read(10) SCSI command on a specific SCSI
target.
@@ -1021,8 +1008,8 @@ ScsiRead10CommandEx (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN UINT32 StartLba,
@@ -1030,7 +1017,6 @@ ScsiRead10CommandEx (
IN EFI_EVENT Event OPTIONAL
);
/**
Execute blocking/non-blocking Write(10) SCSI command on a specific SCSI
target.
@@ -1111,8 +1097,8 @@ ScsiWrite10CommandEx (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN UINT32 StartLba,
@@ -1120,7 +1106,6 @@ ScsiWrite10CommandEx (
IN EFI_EVENT Event OPTIONAL
);
/**
Execute blocking/non-blocking Read(16) SCSI command on a specific SCSI
target.
@@ -1201,8 +1186,8 @@ ScsiRead16CommandEx (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN UINT64 StartLba,
@@ -1210,7 +1195,6 @@ ScsiRead16CommandEx (
IN EFI_EVENT Event OPTIONAL
);
/**
Execute blocking/non-blocking Write(16) SCSI command on a specific SCSI
target.
@@ -1291,8 +1275,8 @@ ScsiWrite16CommandEx (
IN UINT64 Timeout,
IN OUT VOID *SenseData OPTIONAL,
IN OUT UINT8 *SenseDataLength,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
OUT UINT8 *HostAdapterStatus,
OUT UINT8 *TargetStatus,
IN OUT VOID *DataBuffer OPTIONAL,
IN OUT UINT32 *DataLength,
IN UINT64 StartLba,

View File

@@ -7,7 +7,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef __USB_DXE_LIB_H__
#define __USB_DXE_LIB_H__
@@ -35,12 +34,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
EFI_STATUS
EFIAPI
UsbGetHidDescriptor (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor
);
/**
Get the report descriptor of the specified USB HID interface.
@@ -65,10 +63,10 @@ UsbGetHidDescriptor (
EFI_STATUS
EFIAPI
UsbGetReportDescriptor (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT16 DescriptorLength,
OUT UINT8 *DescriptorBuffer
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT16 DescriptorLength,
OUT UINT8 *DescriptorBuffer
);
/**
@@ -91,9 +89,9 @@ UsbGetReportDescriptor (
EFI_STATUS
EFIAPI
UsbGetProtocolRequest (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
OUT UINT8 *Protocol
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
OUT UINT8 *Protocol
);
/**
@@ -115,9 +113,9 @@ UsbGetProtocolRequest (
EFI_STATUS
EFIAPI
UsbSetProtocolRequest (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT8 Protocol
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT8 Protocol
);
/**
@@ -140,10 +138,10 @@ UsbSetProtocolRequest (
EFI_STATUS
EFIAPI
UsbSetIdleRequest (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT8 ReportId,
IN UINT8 Duration
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT8 ReportId,
IN UINT8 Duration
);
/**
@@ -167,10 +165,10 @@ UsbSetIdleRequest (
EFI_STATUS
EFIAPI
UsbGetIdleRequest (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT8 ReportId,
OUT UINT8 *Duration
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT8 ReportId,
OUT UINT8 *Duration
);
/**
@@ -197,12 +195,12 @@ UsbGetIdleRequest (
EFI_STATUS
EFIAPI
UsbSetReportRequest (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT8 ReportId,
IN UINT8 ReportType,
IN UINT16 ReportLen,
IN UINT8 *Report
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT8 ReportId,
IN UINT8 ReportType,
IN UINT16 ReportLen,
IN UINT8 *Report
);
/**
@@ -232,12 +230,12 @@ UsbSetReportRequest (
EFI_STATUS
EFIAPI
UsbGetReportRequest (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT8 ReportId,
IN UINT8 ReportType,
IN UINT16 ReportLen,
OUT UINT8 *Report
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Interface,
IN UINT8 ReportId,
IN UINT8 ReportType,
IN UINT16 ReportLen,
OUT UINT8 *Report
);
/**
@@ -269,12 +267,12 @@ UsbGetReportRequest (
EFI_STATUS
EFIAPI
UsbGetDescriptor (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT16 Value,
IN UINT16 Index,
IN UINT16 DescriptorLength,
OUT VOID *Descriptor,
OUT UINT32 *Status
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT16 Value,
IN UINT16 Index,
IN UINT16 DescriptorLength,
OUT VOID *Descriptor,
OUT UINT32 *Status
);
/**
@@ -303,12 +301,12 @@ UsbGetDescriptor (
EFI_STATUS
EFIAPI
UsbSetDescriptor (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT16 Value,
IN UINT16 Index,
IN UINT16 DescriptorLength,
IN VOID *Descriptor,
OUT UINT32 *Status
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT16 Value,
IN UINT16 Index,
IN UINT16 DescriptorLength,
IN VOID *Descriptor,
OUT UINT32 *Status
);
/**
@@ -335,10 +333,10 @@ UsbSetDescriptor (
EFI_STATUS
EFIAPI
UsbGetInterface (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT16 Interface,
OUT UINT16 *AlternateSetting,
OUT UINT32 *Status
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT16 Interface,
OUT UINT16 *AlternateSetting,
OUT UINT32 *Status
);
/**
@@ -364,10 +362,10 @@ UsbGetInterface (
EFI_STATUS
EFIAPI
UsbSetInterface (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT16 Interface,
IN UINT16 AlternateSetting,
OUT UINT32 *Status
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT16 Interface,
IN UINT16 AlternateSetting,
OUT UINT32 *Status
);
/**
@@ -393,9 +391,9 @@ UsbSetInterface (
EFI_STATUS
EFIAPI
UsbGetConfiguration (
IN EFI_USB_IO_PROTOCOL *UsbIo,
OUT UINT16 *ConfigurationValue,
OUT UINT32 *Status
IN EFI_USB_IO_PROTOCOL *UsbIo,
OUT UINT16 *ConfigurationValue,
OUT UINT32 *Status
);
/**
@@ -420,9 +418,9 @@ UsbGetConfiguration (
EFI_STATUS
EFIAPI
UsbSetConfiguration (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT16 ConfigurationValue,
OUT UINT32 *Status
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT16 ConfigurationValue,
OUT UINT32 *Status
);
/**
@@ -451,11 +449,11 @@ UsbSetConfiguration (
EFI_STATUS
EFIAPI
UsbSetFeature (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN USB_TYPES_DEFINITION Recipient,
IN UINT16 Value,
IN UINT16 Target,
OUT UINT32 *Status
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN USB_TYPES_DEFINITION Recipient,
IN UINT16 Value,
IN UINT16 Target,
OUT UINT32 *Status
);
/**
@@ -484,11 +482,11 @@ UsbSetFeature (
EFI_STATUS
EFIAPI
UsbClearFeature (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN USB_TYPES_DEFINITION Recipient,
IN UINT16 Value,
IN UINT16 Target,
OUT UINT32 *Status
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN USB_TYPES_DEFINITION Recipient,
IN UINT16 Value,
IN UINT16 Target,
OUT UINT32 *Status
);
/**
@@ -518,11 +516,11 @@ UsbClearFeature (
EFI_STATUS
EFIAPI
UsbGetStatus (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN USB_TYPES_DEFINITION Recipient,
IN UINT16 Target,
OUT UINT16 *DeviceStatus,
OUT UINT32 *Status
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN USB_TYPES_DEFINITION Recipient,
IN UINT16 Target,
OUT UINT16 *DeviceStatus,
OUT UINT32 *Status
);
/**
@@ -549,9 +547,9 @@ UsbGetStatus (
EFI_STATUS
EFIAPI
UsbClearEndpointHalt (
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Endpoint,
OUT UINT32 *Status
IN EFI_USB_IO_PROTOCOL *UsbIo,
IN UINT8 Endpoint,
OUT UINT32 *Status
);
#endif

View File

@@ -13,7 +13,7 @@
///
/// Unit Test Status
///
typedef UINT32 UNIT_TEST_STATUS;
typedef UINT32 UNIT_TEST_STATUS;
#define UNIT_TEST_PASSED (0)
#define UNIT_TEST_ERROR_PREREQUISITE_NOT_MET (1)
#define UNIT_TEST_ERROR_TEST_FAILED (2)
@@ -34,24 +34,24 @@ typedef UINT32 UNIT_TEST_STATUS;
/// Unit Test Framework Handle
///
struct UNIT_TEST_FRAMEWORK_OBJECT;
typedef struct UNIT_TEST_FRAMEWORK_OBJECT *UNIT_TEST_FRAMEWORK_HANDLE;
typedef struct UNIT_TEST_FRAMEWORK_OBJECT *UNIT_TEST_FRAMEWORK_HANDLE;
///
/// Unit Test Suite Handle
///
struct UNIT_TEST_SUITE_OBJECT;
typedef struct UNIT_TEST_SUITE_OBJECT *UNIT_TEST_SUITE_HANDLE;
typedef struct UNIT_TEST_SUITE_OBJECT *UNIT_TEST_SUITE_HANDLE;
///
/// Unit Test Handle
///
struct UNIT_TEST_OBJECT;
typedef struct UNIT_TEST_OBJECT *UNIT_TEST_HANDLE;
typedef struct UNIT_TEST_OBJECT *UNIT_TEST_HANDLE;
///
/// Unit Test Context
///
typedef VOID* UNIT_TEST_CONTEXT;
typedef VOID *UNIT_TEST_CONTEXT;
/**
The prototype for a single UnitTest case function.
@@ -336,8 +336,8 @@ FreeUnitTestFramework (
EFI_STATUS
EFIAPI
SaveFrameworkState (
IN UNIT_TEST_CONTEXT ContextToSave OPTIONAL,
IN UINTN ContextToSaveSize
IN UNIT_TEST_CONTEXT ContextToSave OPTIONAL,
IN UINTN ContextToSaveSize
);
/**
@@ -459,13 +459,13 @@ SaveFrameworkState (
#if defined (EDKII_UNIT_TEST_FRAMEWORK_ENABLED)
#include <Library/BaseLib.h>
///
/// Pointer to jump buffer used with SetJump()/LongJump() to test if a
/// function under test generates an expected ASSERT() condition.
///
extern BASE_LIBRARY_JUMP_BUFFER *gUnitTestExpectAssertFailureJumpBuffer;
///
/// Pointer to jump buffer used with SetJump()/LongJump() to test if a
/// function under test generates an expected ASSERT() condition.
///
extern BASE_LIBRARY_JUMP_BUFFER *gUnitTestExpectAssertFailureJumpBuffer;
#define UT_EXPECT_ASSERT_FAILURE(FunctionCall, Status) \
#define UT_EXPECT_ASSERT_FAILURE(FunctionCall, Status) \
do { \
UNIT_TEST_STATUS UnitTestJumpStatus; \
BASE_LIBRARY_JUMP_BUFFER UnitTestJumpBuffer; \
@@ -488,7 +488,7 @@ SaveFrameworkState (
} \
} while (FALSE)
#else
#define UT_EXPECT_ASSERT_FAILURE(FunctionCall, Status) FunctionCall;
#define UT_EXPECT_ASSERT_FAILURE(FunctionCall, Status) FunctionCall;
#endif
/**