summaryrefslogtreecommitdiff
path: root/MdePkg/Library
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-14 09:01:34 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-14 09:01:34 +0000
commitf80b0830db453419ac5ad2b3f12a8b7c2bbdc29a (patch)
tree2937d148454e21adf29de0090e13b2fe9838711b /MdePkg/Library
parent6aab82140b20fab408f79dd428555b5d03370f72 (diff)
downloadedk2-platforms-f80b0830db453419ac5ad2b3f12a8b7c2bbdc29a.tar.xz
Code scrub:
MdePkg/Library/BaseCacheMaintenanceLib MdePkg/Library/BaseDebugLibNull MdePkg/Library/BaseIoLibIntrinsic MdePkg/Library/BaseLib MdePkg/Library/BasePeCoffLib MdePkg/Library/CpuLib MdePkg/Library/DxeMemoryLib MdePkg/Library/DxePiLib MdePkg/Library/PeiIoLib MdePkg/Library/PeiMemoryLib MdePkg/Library/UefiBootServicesTableLib MdePkg/Library/UefiLib MdePkg/Library/UefiRuntimeLib git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5464 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/BasePeCoffLib/Ebc/PeCoffLoaderEx.c2
-rw-r--r--MdePkg/Library/BasePeCoffLib/Ia32/PeCoffLoaderEx.c2
-rw-r--r--MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c6
-rw-r--r--MdePkg/Library/BasePeCoffLib/x64/PeCoffLoaderEx.c2
-rw-r--r--MdePkg/Library/CpuLib/Ia32/CpuPause.c12
-rw-r--r--MdePkg/Library/CpuLib/Ia32/CpuSleep.c10
-rw-r--r--MdePkg/Library/DxeMemoryLib/MemLib.c24
-rw-r--r--MdePkg/Library/DxePiLib/DxePiLib.c119
-rw-r--r--MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c8
-rw-r--r--MdePkg/Library/PeiIoLibCpuIo/IoLib.c24
-rw-r--r--MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c8
-rw-r--r--MdePkg/Library/PeiMemoryLib/MemLib.c24
-rw-r--r--MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c1
-rw-r--r--MdePkg/Library/UefiLib/Console.c2
-rw-r--r--MdePkg/Library/UefiLib/UefiLibPrint.c45
-rw-r--r--MdePkg/Library/UefiRuntimeLib/RuntimeLib.c2
-rw-r--r--MdePkg/Library/UefiRuntimeLib/RuntimeService.c2
17 files changed, 248 insertions, 45 deletions
diff --git a/MdePkg/Library/BasePeCoffLib/Ebc/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/Ebc/PeCoffLoaderEx.c
index 3faaab85e5..b9ac46b0d6 100644
--- a/MdePkg/Library/BasePeCoffLib/Ebc/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/Ebc/PeCoffLoaderEx.c
@@ -75,7 +75,7 @@ PeCoffLoaderImageFormatSupported (
@param FixupData Pointer to a buffer to log the fixups.
@param Adjust The offset to adjust the fixup.
- @return Status code.
+ @return Always return UNSUPPORTED.
**/
RETURN_STATUS
diff --git a/MdePkg/Library/BasePeCoffLib/Ia32/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/Ia32/PeCoffLoaderEx.c
index 20ff513d81..ee118bfef8 100644
--- a/MdePkg/Library/BasePeCoffLib/Ia32/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/Ia32/PeCoffLoaderEx.c
@@ -75,7 +75,7 @@ PeCoffLoaderImageFormatSupported (
@param FixupData Pointer to a buffer to log the fixups.
@param Adjust The offset to adjust the fixup.
- @return Status code.
+ @return Always return UNSUPPORTED.
**/
RETURN_STATUS
diff --git a/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c
index dc94da9aed..2f0b9b850c 100644
--- a/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c
@@ -71,7 +71,8 @@
@param FixupData Pointer to a buffer to log the fixups.
@param Adjust The offset to adjust the fixup.
- @return Status code.
+ @retval RETURN_SUCCESS Succeed to fix the relocation entry.
+ @retval RETURN_UNSUPPOTED Unrecoganized relocation entry.
**/
RETURN_STATUS
@@ -227,6 +228,7 @@ PeCoffLoaderRelocateImageEx (
@param Machine Machine type from the PE Header.
@return TRUE if this PE/COFF loader can load the image
+ @return FALSE unrecoganized machine type of image.
**/
BOOLEAN
@@ -254,6 +256,8 @@ PeCoffLoaderImageFormatSupported (
@retval RETURN_SUCCESS Data is read from FileOffset from the Handle into
the buffer.
+ @retval RETURN_UNSUPPORTED Un-recoganized relocation entry
+ type.
**/
RETURN_STATUS
PeHotRelocateImageEx (
diff --git a/MdePkg/Library/BasePeCoffLib/x64/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/x64/PeCoffLoaderEx.c
index 3126ca8c2b..937d103d78 100644
--- a/MdePkg/Library/BasePeCoffLib/x64/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/x64/PeCoffLoaderEx.c
@@ -75,7 +75,7 @@ PeCoffLoaderImageFormatSupported (
@param FixupData Pointer to a buffer to log the fixups.
@param Adjust The offset to adjust the fixup.
- @return Status code.
+ @return EFI_UNSUPPORTED.
**/
RETURN_STATUS
diff --git a/MdePkg/Library/CpuLib/Ia32/CpuPause.c b/MdePkg/Library/CpuLib/Ia32/CpuPause.c
index ee7c96736b..c62503ae10 100644
--- a/MdePkg/Library/CpuLib/Ia32/CpuPause.c
+++ b/MdePkg/Library/CpuLib/Ia32/CpuPause.c
@@ -12,11 +12,17 @@
**/
-//
-// Include common header file for this module.
-//
+/**
+ Places the CPU in a pause state until an interrupt is
+ received.
+ Places the CPU in a pause state until an interrupt is
+ received. If interrupts are disabled prior to calling this
+ function, then the CPU will be placed in a pause state
+ indefinitely.
+
+**/
VOID
EFIAPI
CpuPause (
diff --git a/MdePkg/Library/CpuLib/Ia32/CpuSleep.c b/MdePkg/Library/CpuLib/Ia32/CpuSleep.c
index 690f9b3598..a39ad22064 100644
--- a/MdePkg/Library/CpuLib/Ia32/CpuSleep.c
+++ b/MdePkg/Library/CpuLib/Ia32/CpuSleep.c
@@ -12,11 +12,15 @@
**/
-//
-// Include common header file for this module.
-//
+/**
+ Places the CPU in a sleep state until an interrupt is received.
+ Places the CPU in a sleep state until an interrupt is received. If interrupts
+ are disabled prior to calling this function, then the CPU will be placed in a
+ sleep state indefinitely.
+
+**/
VOID
EFIAPI
CpuSleep (
diff --git a/MdePkg/Library/DxeMemoryLib/MemLib.c b/MdePkg/Library/DxeMemoryLib/MemLib.c
index b7ad18b373..6bbd9be77e 100644
--- a/MdePkg/Library/DxeMemoryLib/MemLib.c
+++ b/MdePkg/Library/DxeMemoryLib/MemLib.c
@@ -14,6 +14,18 @@
#include "MemLibInternals.h"
+/**
+ Copies a source buffer to a destination buffer, and returns the destination buffer.
+
+ This function wraps the gBS->CopyMem().
+
+ @param DestinationBuffer Pointer to the destination buffer of the memory copy.
+ @param SourceBuffer Pointer to the source buffer of the memory copy.
+ @param Length Number of bytes to copy from SourceBuffer to DestinationBuffer.
+
+ @return DestinationBuffer.
+
+**/
VOID *
EFIAPI
InternalMemCopyMem (
@@ -26,6 +38,18 @@ InternalMemCopyMem (
return Destination;
}
+/**
+ Fills a target buffer with a byte value, and returns the target buffer.
+
+ This function wraps the gBS->SetMem().
+
+ @param Buffer Memory to set.
+ @param Length Number of bytes to set.
+ @param Value Value of the set operation.
+
+ @return Buffer.
+
+**/
VOID *
EFIAPI
InternalMemSetMem (
diff --git a/MdePkg/Library/DxePiLib/DxePiLib.c b/MdePkg/Library/DxePiLib/DxePiLib.c
index d35937a1b5..4138498790 100644
--- a/MdePkg/Library/DxePiLib/DxePiLib.c
+++ b/MdePkg/Library/DxePiLib/DxePiLib.c
@@ -98,9 +98,7 @@ InternalImageHandleToFvHandle (
@retval EFI_DEVICE_ERROR A hardware error occurs during reading from the Firmware Volume.
@retval EFI_ACCESS_DENIED The firmware volume containing the searched Firmware File is configured to disallow reads.
- **/
-
-
+**/
EFI_STATUS
GetSectionFromFv (
IN EFI_HANDLE FvHandle,
@@ -163,6 +161,43 @@ GetSectionFromFv (
+/**
+ Allocate and fill a buffer from the Firmware Section identified by a Firmware File GUID name and a Firmware
+ Section type and instance number from any Firmware Volumes in the system.
+
+ The function will read the first Firmware Section sepcifed by NameGuid, SectionType and Instance by searching
+ for all Firmware Volumes in the system.
+
+ The search order for Firmware Volumes in the system is determistic but abitrary if no new Firmware Volume is installed
+ into the system. The search order for the section specified by SectionType within a Firmware File is defined by
+ EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection (). Please check Section 2.4 of Volume 3: Platform Initialization
+ Shared Architectural Elements for detailes.
+
+ If SectionType is EFI_SECTION_TE, EFI_SECTION_TE will be used as Firmware Section type to read Firmware Section
+ data from the Firmware File. If no such section exists, EFI_SECTION_PE32 will be used as Firmware Section type to
+ read Firmware Section data from the Firmware File. If no such section specified is found to match ,
+ EFI_NOT_FOUND is returned.
+
+ The data and size is returned by Buffer and Size. The caller is responsible to free the Buffer allocated
+ by this function. This function can only be called at TPL_NOTIFY and below.
+
+ If NameGuid is NULL, then ASSERT();
+ If Buffer is NULL, then ASSERT();
+ If Size is NULL, then ASSERT().
+
+ @param NameGuid The GUID name of a Firmware File.
+ @param SectionType The Firmware Section type.
+ @param Instance The instance number of Firmware Section to read from starting from 0.
+ @param Buffer On output, Buffer contains the the data read from the section in the Firmware File found.
+ @param Size On output, the size of Buffer.
+
+ @retval EFI_SUCCESS The image is found and data and size is returned.
+ @retval EFI_NOT_FOUND The image specified by NameGuid and SectionType can't be found.
+ @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the output data buffer or complete the operations.
+ @retval EFI_DEVICE_ERROR A hardware error occurs during reading from the Firmware Volume.
+ @retval EFI_ACCESS_DENIED The firmware volume containing the searched Firmware File is configured to disallow reads.
+
+**/
EFI_STATUS
EFIAPI
PiLibGetSectionFromAnyFv (
@@ -250,6 +285,45 @@ Done:
}
+/**
+ Allocate and fill a buffer from a Firmware Section identified by a Firmware File GUID name, a Firmware
+ Section type and instance number from the same Firmware Volume with the caller's FFS.
+
+ This functions first locates the EFI_FIRMWARE_VOLUME2_PROTOCOL protocol instance for same Firmrware Volume
+ which also contains the FFS of the caller in order to carry out the Firmware Volume read operation.
+ The function then reads the Firmware Section found sepcifed by NameGuid, SectionType and Instance.
+
+ The search order for the section specified by SectionType within a Firmware File is defined by
+ EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection (). Please check Section 2.4 of Volume 3: Platform Initialization
+ Shared Architectural Elements for detailes.
+
+ If SectionType is EFI_SECTION_TE, EFI_SECTION_TE will be used as Firmware Section type to read Firmware Section
+ data from the Firmware File. If no such section exists, EFI_SECTION_PE32 will be used as Firmware Section type to
+ read Firmware Section data from the Firmware File. If no such section specified is found to match ,
+ EFI_NOT_FOUND is returned.
+
+ The data and size is returned by Buffer and Size. The caller is responsible to free the Buffer allocated
+ by this function. This function can be only called at TPL_NOTIFY and below.
+
+ If FvHandle is NULL, then ASSERT ();
+ If NameGuid is NULL, then ASSERT();
+ If Buffer is NULL, then ASSERT();
+ If Size is NULL, then ASSERT().
+
+ @param NameGuid The GUID name of a Firmware File.
+ @param SectionType The Firmware Section type.
+ @param Instance The instance number of Firmware Section to read from starting from 0.
+ @param Buffer On output, Buffer contains the the data read from the section in the Firmware File found.
+ @param Size On output, the size of Buffer.
+
+ @retval EFI_SUCCESS The image is found and data and size is returned.
+ @retval EFI_UNSUPPORTED FvHandle does not support EFI_FIRMWARE_VOLUME2_PROTOCOL.
+ @retval EFI_NOT_FOUND The image specified by NameGuid and SectionType can't be found.
+ @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the output data buffer or complete the operations.
+ @retval EFI_DEVICE_ERROR A hardware error occurs during reading from the Firmware Volume.
+ @retval EFI_ACCESS_DENIED The firmware volume containing the searched Firmware File is configured to disallow reads.
+
+**/
EFI_STATUS
EFIAPI
@@ -272,6 +346,45 @@ PiLibGetSectionFromCurrentFv (
}
+/**
+ Allocate and fill a buffer from the first Firmware Section in the same Firmware File as the caller of this function.
+
+ The function will read the first Firmware Section found sepcifed by NameGuid and SectionType from the
+ Firmware Volume specified by FvHandle. On this FvHandle, an EFI_FIRMWARE_VOLUME2_PROTOCOL protocol instance
+ should be located succesfully in order to carry out the Firmware Volume operations.
+
+ The search order for the section type specified by SectionType in the Firmware File is using a depth-first
+ and left-to-right algorithm through all sections. The first section found to match SectionType will be returned.
+
+ If SectionType is EFI_SECTION_PE32, EFI_SECTION_PE32 will be used as Firmware Section type
+ to read Firmware Section data from the Firmware File. If no such section exists, the function will try
+ to read a Firmware File named with NameGuid. If no such file exists, EFI_NOT_FOUND is returned.
+
+ If SectionType is EFI_SECTION_TE, EFI_SECTION_TE will be used as Firmware Section type to read Firmware Section
+ data from the Firmware File. If no such section exists, EFI_SECTION_PE32 will be used as Firmware Section type to
+ read Firmware Section data from the Firmware File. If no such section exists, the function will try to read a Firmware
+ File named with NameGuid. If no such file exists, EFI_NOT_FOUND is returned.
+
+ The data and size is returned by Buffer and Size. The caller is responsible to free the Buffer allocated
+ by this function. This function can only be called at TPL_NOTIFY and below.
+
+ If FvHandle is NULL and WithinImage is TRUE, then ASSERT ();
+ If NameGuid is NULL, then ASSERT();
+ If Buffer is NULL, then ASSERT();
+ If Size is NULL, then ASSERT().
+
+ @param NameGuid The GUID name of a Firmware File.
+ @param SectionType The Firmware Section type.
+ @param Buffer On output, Buffer contains the the data read from the section in the Firmware File found.
+ @param Size On output, the size of Buffer.
+
+ @retval EFI_SUCCESS The image is found and data and size is returned.
+ @retval EFI_NOT_FOUND The image specified by NameGuid and SectionType can't be found.
+ @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the output data buffer or complete the operations.
+ @retval EFI_DEVICE_ERROR A hardware error occurs during reading from the Firmware Volume.
+ @retval EFI_ACCESS_DENIED The firmware volume containing the searched Firmware File is configured to disallow reads.
+
+**/
EFI_STATUS
EFIAPI
diff --git a/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c b/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c
index bbcc06751e..75dc1f8aa4 100644
--- a/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c
+++ b/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c
@@ -133,7 +133,7 @@ IoAndThenOr8 (
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..7.
- @return The value read.
+ @return The value read from Port.
**/
UINT8
@@ -413,7 +413,7 @@ IoAndThenOr16 (
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..15.
- @return The value read.
+ @return The value read from Port.
**/
UINT16
@@ -693,7 +693,7 @@ IoAndThenOr32 (
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..31.
- @return The value read.
+ @return The value read from Port.
**/
UINT32
@@ -1536,7 +1536,7 @@ MmioAndThenOr16 (
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..15.
- @return The value read.
+ @return The value read from Address.
**/
UINT16
diff --git a/MdePkg/Library/PeiIoLibCpuIo/IoLib.c b/MdePkg/Library/PeiIoLibCpuIo/IoLib.c
index bc8319eb29..e3622e6329 100644
--- a/MdePkg/Library/PeiIoLibCpuIo/IoLib.c
+++ b/MdePkg/Library/PeiIoLibCpuIo/IoLib.c
@@ -31,7 +31,7 @@
@param Port The I/O port to read.
- @return The value read.
+ @return The value read from Port.
**/
UINT8
@@ -94,7 +94,7 @@ IoWrite8 (
@param Port The I/O port to read.
- @return The value read.
+ @return The value read from Port.
**/
UINT16
@@ -163,7 +163,7 @@ IoWrite16 (
@param Port The I/O port to read.
- @return The value read.
+ @return The value read from Port.
**/
UINT32
@@ -232,7 +232,7 @@ IoWrite32 (
@param Port The I/O port to read.
- @return The value read.
+ @return The value read from Port.
**/
UINT64
@@ -301,7 +301,7 @@ IoWrite64 (
@param Address The MMIO register to read.
- @return The value read.
+ @return The value read from Port.
**/
UINT8
@@ -331,7 +331,8 @@ MmioRead8 (
@param Address The MMIO register to write.
@param Value The value to write to the MMIO register.
-
+
+ @return The Value written back to Mmio register.
**/
UINT8
EFIAPI
@@ -362,7 +363,7 @@ MmioWrite8 (
@param Address The MMIO register to read.
- @return The value read.
+ @return The value read from Address.
**/
UINT16
@@ -396,6 +397,8 @@ MmioRead16 (
@param Address The MMIO register to write.
@param Value The value to write to the MMIO register.
+
+ @return The Value written back to Mmio register
**/
UINT16
@@ -430,7 +433,7 @@ MmioWrite16 (
@param Address The MMIO register to read.
- @return The value read.
+ @return The value read from Address.
**/
UINT32
@@ -464,6 +467,8 @@ MmioRead32 (
@param Address The MMIO register to write.
@param Value The value to write to the MMIO register.
+
+ @return The Value written back to Mmio register
**/
UINT32
@@ -498,7 +503,7 @@ MmioWrite32 (
@param Address The MMIO register to read.
- @return The value read.
+ @return The value read from Address.
**/
UINT64
@@ -533,6 +538,7 @@ MmioRead64 (
@param Address The MMIO register to write.
@param Value The value to write to the MMIO register.
+ @return The Value written back to Mmio register
**/
UINT64
EFIAPI
diff --git a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
index 80a01aac7b..9f22b0e4ef 100644
--- a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
@@ -1077,6 +1077,14 @@ FreeAlignedPool (
}
+/**
+ Frees buffer that were previously allocated with one of the
+ memory allocation functions in the Memory Allocation Library.
+
+ @param Buffer Pointer to the buffer of pages
+ to free.
+
+**/
VOID
EFIAPI
SafeFreePool (
diff --git a/MdePkg/Library/PeiMemoryLib/MemLib.c b/MdePkg/Library/PeiMemoryLib/MemLib.c
index ddb8b445bc..207f580d45 100644
--- a/MdePkg/Library/PeiMemoryLib/MemLib.c
+++ b/MdePkg/Library/PeiMemoryLib/MemLib.c
@@ -14,6 +14,18 @@
#include "MemLibInternals.h"
+/**
+ Copies a source buffer to a destination buffer, and returns the destination buffer.
+
+ This function wraps the gPS->CopyMem ().
+
+ @param DestinationBuffer Pointer to the destination buffer of the memory copy.
+ @param SourceBuffer Pointer to the source buffer of the memory copy.
+ @param Length Number of bytes to copy from SourceBuffer to DestinationBuffer.
+
+ @return DestinationBuffer.
+
+**/
VOID *
EFIAPI
InternalMemCopyMem (
@@ -30,6 +42,18 @@ InternalMemCopyMem (
return Destination;
}
+/**
+ Fills a target buffer with a byte value, and returns the target buffer.
+
+ This function wraps the gPS->SetMem ().
+
+ @param Buffer Memory to set.
+ @param Length Number of bytes to set.
+ @param Value Value of the set operation.
+
+ @return Buffer.
+
+**/
VOID *
EFIAPI
InternalMemSetMem (
diff --git a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c
index 5901ac5fe0..100549c027 100644
--- a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c
+++ b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c
@@ -15,7 +15,6 @@
#include <PiDxe.h>
-
#include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugLib.h>
#include "UefiBootServicesTableLibInternal.h"
diff --git a/MdePkg/Library/UefiLib/Console.c b/MdePkg/Library/UefiLib/Console.c
index fe15f106ed..b8d9bc12a4 100644
--- a/MdePkg/Library/UefiLib/Console.c
+++ b/MdePkg/Library/UefiLib/Console.c
@@ -24,7 +24,7 @@ typedef struct {
UINT32 Width;
} UNICODE_WIDTH_ENTRY;
-UNICODE_WIDTH_ENTRY mUnicodeWidthTable[] = {
+GLOBAL_REMOVE_IF_UNREFERENCED CONST UNICODE_WIDTH_ENTRY mUnicodeWidthTable[] = {
//
// General script area
//
diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c b/MdePkg/Library/UefiLib/UefiLibPrint.c
index b8a076083d..df9e4d341d 100644
--- a/MdePkg/Library/UefiLib/UefiLibPrint.c
+++ b/MdePkg/Library/UefiLib/UefiLibPrint.c
@@ -26,14 +26,15 @@
specified by Console and returns the number of Unicode characters that printed
to it. If the length of the formatted Unicode string is greater than PcdUefiLibMaxPrintBufferSize,
then only the first PcdUefiLibMaxPrintBufferSize characters are sent to Console.
+ If Format is NULL, then ASSERT().
+ If Format is not aligned on a 16-bit boundary, then ASSERT().
@param Format Null-terminated Unicode format string.
@param Console The output console.
@param Marker VA_LIST marker for the variable argument list.
-
- If Format is NULL, then ASSERT().
- If Format is not aligned on a 16-bit boundary, then ASSERT().
-
+
+ @return The number of Unicode characters in the produced
+ output buffer not including the Null-terminator.
**/
STATIC
@@ -79,11 +80,14 @@ InternalPrint (
characters that printed to ConOut. If the length of the formatted Unicode
string is greater than PcdUefiLibMaxPrintBufferSize, then only the first
PcdUefiLibMaxPrintBufferSize characters are sent to ConOut.
+ If Format is NULL, then ASSERT().
+ If Format is not aligned on a 16-bit boundary, then ASSERT().
@param Format Null-terminated Unicode format string.
@param ... VARARG list consumed to process Format.
- If Format is NULL, then ASSERT().
- If Format is not aligned on a 16-bit boundary, then ASSERT().
+
+ @return The number of Unicode characters in the produced
+ output buffer not including the Null-terminator.
**/
UINTN
@@ -114,12 +118,14 @@ Print (
characters that printed to StdErr. If the length of the formatted Unicode
string is greater than PcdUefiLibMaxPrintBufferSize, then only the first
PcdUefiLibMaxPrintBufferSize characters are sent to StdErr.
+ If Format is NULL, then ASSERT().
+ If Format is not aligned on a 16-bit boundary, then ASSERT().
@param Format Null-terminated Unicode format string.
@param ... VARARG list consumed to process Format.
- If Format is NULL, then ASSERT().
- If Format is not aligned on a 16-bit boundary, then ASSERT().
+ @return The number of Unicode characters in the produced
+ output buffer not including the Null-terminator.
**/
UINTN
@@ -150,15 +156,20 @@ ErrorPrint (
specified by Console and returns the number of ASCII characters that printed
to it. If the length of the formatted ASCII string is greater than PcdUefiLibMaxPrintBufferSize,
then only the first PcdUefiLibMaxPrintBufferSize characters are sent to Console.
+ If Format is NULL, then ASSERT().
+
+ If Format is NULL, then ASSERT().
+ If Format is not aligned on a 16-bit boundary, then ASSERT().
+
@param Format Null-terminated ASCII format string.
@param Console The output console.
@param Marker VA_LIST marker for the variable argument list.
- If Format is NULL, then ASSERT().
+ @return The number of Unicode characters in the produced
+ output buffer not including the Null-terminator.
**/
-
STATIC
UINTN
AsciiInternalPrint (
@@ -201,11 +212,14 @@ AsciiInternalPrint (
characters that printed to ConOut. If the length of the formatted ASCII
string is greater than PcdUefiLibMaxPrintBufferSize, then only the first
PcdUefiLibMaxPrintBufferSize characters are sent to ConOut.
+ If Format is NULL, then ASSERT().
+ If Format is not aligned on a 16-bit boundary, then ASSERT().
@param Format Null-terminated ASCII format string.
@param ... VARARG list consumed to process Format.
- If Format is NULL, then ASSERT().
- If Format is not aligned on a 16-bit boundary, then ASSERT().
+
+ @return The number of Ascii characters in the produced
+ output buffer not including the Null-terminator.
**/
UINTN
@@ -236,11 +250,14 @@ AsciiPrint (
characters that printed to StdErr. If the length of the formatted ASCII
string is greater than PcdUefiLibMaxPrintBufferSize, then only the first
PcdUefiLibMaxPrintBufferSize characters are sent to StdErr.
+ If Format is NULL, then ASSERT().
+ If Format is not aligned on a 16-bit boundary, then ASSERT().
@param Format Null-terminated ASCII format string.
@param ... VARARG list consumed to process Format.
- If Format is NULL, then ASSERT().
- If Format is not aligned on a 16-bit boundary, then ASSERT().
+
+ @return The number of Ascii characters in the produced output
+ buffer not including the Null-terminator.
**/
UINTN
diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
index 39be3cb0cf..ec7eacc769 100644
--- a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
+++ b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
@@ -30,7 +30,6 @@ EFI_RUNTIME_SERVICES *mRT;
@param[in] Event The Event that is being processed
@param[in] Context Event Context
**/
-STATIC
VOID
EFIAPI
RuntimeLibExitBootServicesEvent (
@@ -54,7 +53,6 @@ RuntimeLibExitBootServicesEvent (
@param[in] Event The Event that is being processed
@param[in] Context Event Context
**/
-STATIC
VOID
EFIAPI
RuntimeLibVirtualNotifyEvent (
diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeService.c b/MdePkg/Library/UefiRuntimeLib/RuntimeService.c
index 34e4738102..a14b99e7b2 100644
--- a/MdePkg/Library/UefiRuntimeLib/RuntimeService.c
+++ b/MdePkg/Library/UefiRuntimeLib/RuntimeService.c
@@ -335,7 +335,7 @@ EfiSetVirtualAddressMap (
IN CONST EFI_MEMORY_DESCRIPTOR *VirtualMap
)
{
- return gRT->SetVirtualAddressMap (
+ return mRT->SetVirtualAddressMap (
MemoryMapSize,
DescriptorSize,
DescriptorVersion,