• BaseMemoryLib:

Modify some Aassert()s conditions to sync with MWG 0.56d
	Modify some defects in function header.
•	PostCodeLib:
Implement PeiDxePostCodeLibReportStatusCode.
•	Misc
Rename BaseDebugLibReportStatusCode to PeiDxeDebugLibReportStatusCode
	Remove tabs in all .c and .h files in MdePkg.
	Rename PeiServicesReinstallPpi() to PeiServicesReInstallPpi()
	Adjust some minor coding style in PeCoffLoaderGetEntryPointerLib()


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@626 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8
2006-06-26 10:18:28 +00:00
parent 23f52b03b4
commit 24e25d11c0
193 changed files with 2222 additions and 1554 deletions

View File

@ -26,41 +26,37 @@
#include "MemLibInternals.h"
/**
Copy Length bytes from Source to Destination.
Copies a source buffer to a destination buffer, and returns the destination buffer.
This function copies Length bytes from SourceBuffer to DestinationBuffer, and
returns DestinationBuffer. The implementation must be reentrant, and it must
handle the case where SourceBuffer overlaps DestinationBuffer.
This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns
DestinationBuffer. The implementation must be reentrant, and it must handle the case
where SourceBuffer overlaps DestinationBuffer.
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then
ASSERT().
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
@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.
@param Destination Target of copy
@param Source Place to copy from
@param Length Number of bytes to copy
@return Destination
@return DestinationBuffer.
**/
VOID *
EFIAPI
CopyMem (
OUT VOID *Destination,
IN CONST VOID *Source,
IN UINTN Length
OUT VOID *DestinationBuffer,
IN CONST VOID *SourceBuffer,
IN UINTN Length
)
{
ASSERT (
Destination == NULL ||
Length <= MAX_ADDRESS - (UINTN)Destination + 1
);
ASSERT (
Source == NULL ||
Length <= MAX_ADDRESS - (UINTN)Source + 1
);
if (Destination == Source || Length == 0) {
return Destination;
if (Length == 0) {
return DestinationBuffer;
}
return InternalMemCopyMem (Destination, Source, Length);
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer));
if (DestinationBuffer == SourceBuffer) {
return DestinationBuffer;
}
return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);
}