diff options
Diffstat (limited to 'MdePkg/Library/BaseMemoryLib')
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c | 12 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/MemLibGeneric.c | 18 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/MemLibInternals.h (renamed from MdePkg/Library/BaseMemoryLib/MemLibWrappers.h) | 6 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/SetMem16Wrapper.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/SetMemWrapper.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/ZeroMemWrapper.c | 2 |
13 files changed, 23 insertions, 33 deletions
diff --git a/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c index 4b2e1ac4b4..c8199d8dc3 100644 --- a/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c @@ -23,7 +23,7 @@ **/
-#include "MemLibWrappers.h"
+#include "MemLibInternals.h"
/**
Compares two memory buffers of a given length.
diff --git a/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c index 155877fdde..5ca62f5047 100644 --- a/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c @@ -23,7 +23,7 @@ **/
-#include "MemLibWrappers.h"
+#include "MemLibInternals.h"
/**
Copy Length bytes from Source to Destination.
@@ -51,8 +51,14 @@ CopyMem ( IN UINTN Length
)
{
- ASSERT (Length <= MAX_ADDRESS - (UINTN)Destination + 1);
- ASSERT (Length <= MAX_ADDRESS - (UINTN)Source + 1);
+ 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;
}
diff --git a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c index ef9f358a79..bda1f4992f 100644 --- a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c +++ b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c @@ -20,23 +20,7 @@ **/
-/**
- Set Buffer to Value for Size bytes.
-
- @param Buffer Memory to set.
- @param Size Number of bytes to set
- @param Value Value of the set operation.
-
- @return Buffer
-
-**/
-VOID *
-EFIAPI
-InternalMemSetMem (
- OUT VOID *Buffer,
- IN UINTN Length,
- IN UINT8 Value
- );
+#include "MemLibInternals.h"
/**
Fills a target buffer with a 16-bit value, and returns the target buffer.
diff --git a/MdePkg/Library/BaseMemoryLib/MemLibWrappers.h b/MdePkg/Library/BaseMemoryLib/MemLibInternals.h index 927d593f9f..ca7311a407 100644 --- a/MdePkg/Library/BaseMemoryLib/MemLibWrappers.h +++ b/MdePkg/Library/BaseMemoryLib/MemLibInternals.h @@ -10,7 +10,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
- Module Name: MemLibWrappers.h
+ Module Name: MemLibInternals.h
The following BaseMemoryLib instances share the same version of this file:
@@ -23,8 +23,8 @@ **/
-#ifndef __MEM_LIB_WRAPPERS__
-#define __MEM_LIB_WRAPPERS__
+#ifndef __MEM_LIB_INTERNALS__
+#define __MEM_LIB_INTERNALS__
/**
Copy Length bytes from Source to Destination.
diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c index d1e445f7cd..a17705db1d 100644 --- a/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c +++ b/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c @@ -23,7 +23,7 @@ **/
-#include "MemLibWrappers.h"
+#include "MemLibInternals.h"
/**
Scans a target buffer for a 16-bit value, and returns a pointer to the
diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c index d860d60c4a..67eb84d8ef 100644 --- a/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c +++ b/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c @@ -23,7 +23,7 @@ **/
-#include "MemLibWrappers.h"
+#include "MemLibInternals.h"
/**
Scans a target buffer for a 32-bit value, and returns a pointer to the
diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c index 67981d13c0..c5f0762ebe 100644 --- a/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c +++ b/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c @@ -23,7 +23,7 @@ **/
-#include "MemLibWrappers.h"
+#include "MemLibInternals.h"
/**
Scans a target buffer for a 64-bit value, and returns a pointer to the
diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c index e7471a5a87..9b817b1b0e 100644 --- a/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c +++ b/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c @@ -23,7 +23,7 @@ **/
-#include "MemLibWrappers.h"
+#include "MemLibInternals.h"
/**
Scans a target buffer for an 8-bit value, and returns a pointer to the
diff --git a/MdePkg/Library/BaseMemoryLib/SetMem16Wrapper.c b/MdePkg/Library/BaseMemoryLib/SetMem16Wrapper.c index 1c72644d82..827e6ecf67 100644 --- a/MdePkg/Library/BaseMemoryLib/SetMem16Wrapper.c +++ b/MdePkg/Library/BaseMemoryLib/SetMem16Wrapper.c @@ -23,7 +23,7 @@ **/
-#include "MemLibWrappers.h"
+#include "MemLibInternals.h"
/**
Fills a target buffer with a 16-bit value, and returns the target buffer.
diff --git a/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c b/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c index 7217b6ef9b..4b9d2413eb 100644 --- a/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c +++ b/MdePkg/Library/BaseMemoryLib/SetMem32Wrapper.c @@ -23,7 +23,7 @@ **/
-#include "MemLibWrappers.h"
+#include "MemLibInternals.h"
/**
Fills a target buffer with a 32-bit value, and returns the target buffer.
diff --git a/MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c b/MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c index 846d1c2c33..dbf3b62782 100644 --- a/MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c +++ b/MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c @@ -23,7 +23,7 @@ **/
-#include "MemLibWrappers.h"
+#include "MemLibInternals.h"
/**
Fills a target buffer with a 64-bit value, and returns the target buffer.
diff --git a/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c b/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c index 255b84d836..294a27a753 100644 --- a/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c @@ -23,7 +23,7 @@ **/
-#include "MemLibWrappers.h"
+#include "MemLibInternals.h"
/**
Set Buffer to Value for Size bytes.
diff --git a/MdePkg/Library/BaseMemoryLib/ZeroMemWrapper.c b/MdePkg/Library/BaseMemoryLib/ZeroMemWrapper.c index 316b21b856..d7d7919ba2 100644 --- a/MdePkg/Library/BaseMemoryLib/ZeroMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLib/ZeroMemWrapper.c @@ -23,7 +23,7 @@ **/
-#include "MemLibWrappers.h"
+#include "MemLibInternals.h"
/**
Set Buffer to 0 for Size bytes.
|