+++ /dev/null
-/** @file\r
- CompareMem() implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: CompareMemWrapper.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Compares the contents of two buffers.\r
-\r
- This function compares Length bytes of SourceBuffer to Length bytes of DestinationBuffer.\r
- If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the\r
- value returned is the first mismatched byte in SourceBuffer subtracted from the first\r
- mismatched byte in DestinationBuffer.\r
- If Length > 0 and DestinationBuffer is NULL and Length > 0, then ASSERT().\r
- If Length > 0 and SourceBuffer is NULL and Length > 0, then ASSERT().\r
- If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT(). \r
- If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT(). \r
-\r
-\r
- @param DestinationBuffer Pointer to the destination buffer to compare.\r
- @param SourceBuffer Pointer to the source buffer to compare.\r
- @param Length Number of bytes to compare.\r
-\r
- @return 0 All Length bytes of the two buffers are identical.\r
- @retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first\r
- mismatched byte in DestinationBuffer.\r
-\r
-**/\r
-INTN\r
-EFIAPI\r
-CompareMem (\r
- IN CONST VOID *DestinationBuffer,\r
- IN CONST VOID *SourceBuffer,\r
- IN UINTN Length\r
- )\r
-{\r
- if (Length == 0) {\r
- return 0;\r
- }\r
- ASSERT (DestinationBuffer != NULL);\r
- ASSERT (SourceBuffer != NULL);\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer));\r
-\r
- return InternalMemCompareMem (DestinationBuffer, SourceBuffer, Length);\r
-}\r
+++ /dev/null
-/** @file\r
- CopyMem() implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: CopyMemWrapper.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Copies a source buffer to a destination buffer, and returns the destination buffer.\r
-\r
- This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns\r
- DestinationBuffer. The implementation must be reentrant, and it must handle the case\r
- where SourceBuffer overlaps DestinationBuffer.\r
- If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT(). \r
- If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT(). \r
-\r
- @param DestinationBuffer Pointer to the destination buffer of the memory copy.\r
- @param SourceBuffer Pointer to the source buffer of the memory copy.\r
- @param Length Number of bytes to copy from SourceBuffer to DestinationBuffer.\r
-\r
- @return DestinationBuffer.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-CopyMem (\r
- OUT VOID *DestinationBuffer,\r
- IN CONST VOID *SourceBuffer,\r
- IN UINTN Length\r
- )\r
-{\r
- if (Length == 0) {\r
- return DestinationBuffer;\r
- }\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer));\r
-\r
- if (DestinationBuffer == SourceBuffer) {\r
- return DestinationBuffer;\r
- }\r
- return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);\r
-}\r
+++ /dev/null
-/** @file\r
- Base Memory Library.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: MemLib.c\r
-\r
-**/\r
-\r
-VOID *\r
-EFIAPI\r
-InternalMemCopyMem (\r
- OUT VOID *Destination,\r
- IN CONST VOID *Source,\r
- IN UINTN Length\r
- )\r
-{\r
- gBS->CopyMem (Destination, (VOID*)Source, Length);\r
- return Destination;\r
-}\r
-\r
-VOID *\r
-EFIAPI\r
-InternalMemSetMem (\r
- OUT VOID *Buffer,\r
- IN UINTN Size,\r
- IN UINT8 Value\r
- )\r
-{\r
- gBS->SetMem (Buffer, Size, Value);\r
- return Buffer;\r
-}\r
+++ /dev/null
-/** @file\r
- Architecture Independent Base Memory Library Implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: MemLibGeneric.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Fills a target buffer with a 16-bit value, and returns the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to fill.\r
- @param Length Number of bytes in Buffer to fill.\r
- @param Value Value with which to fill Length bytes of Buffer.\r
-\r
- @return Buffer\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-InternalMemSetMem16 (\r
- OUT VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT16 Value\r
- )\r
-{\r
- do {\r
- ((UINT16*)Buffer)[--Length] = Value;\r
- } while (Length != 0);\r
- return Buffer;\r
-}\r
-\r
-/**\r
- Fills a target buffer with a 32-bit value, and returns the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to fill.\r
- @param Length Number of bytes in Buffer to fill.\r
- @param Value Value with which to fill Length bytes of Buffer.\r
-\r
- @return Buffer\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-InternalMemSetMem32 (\r
- OUT VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT32 Value\r
- )\r
-{\r
- do {\r
- ((UINT32*)Buffer)[--Length] = Value;\r
- } while (Length != 0);\r
- return Buffer;\r
-}\r
-\r
-/**\r
- Fills a target buffer with a 64-bit value, and returns the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to fill.\r
- @param Length Number of bytes in Buffer to fill.\r
- @param Value Value with which to fill Length bytes of Buffer.\r
-\r
- @return Buffer\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-InternalMemSetMem64 (\r
- OUT VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT64 Value\r
- )\r
-{\r
- do {\r
- ((UINT64*)Buffer)[--Length] = Value;\r
- } while (Length != 0);\r
- return Buffer;\r
-}\r
-\r
-/**\r
- Set Buffer to 0 for Size bytes.\r
-\r
- @param Buffer Memory to set.\r
- @param Size Number of bytes to set\r
-\r
- @return Buffer\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-InternalMemZeroMem (\r
- OUT VOID *Buffer,\r
- IN UINTN Length\r
- )\r
-{\r
- return InternalMemSetMem (Buffer, Length, 0);\r
-}\r
-\r
-/**\r
- Compares two memory buffers of a given length.\r
-\r
- @param DestinationBuffer First memory buffer\r
- @param SourceBuffer Second memory buffer\r
- @param Length Length of DestinationBuffer and SourceBuffer memory\r
- regions to compare. Must be non-zero.\r
-\r
- @retval 0 if MemOne == MemTwo\r
-\r
-**/\r
-INTN\r
-EFIAPI\r
-InternalMemCompareMem (\r
- IN CONST VOID *DestinationBuffer,\r
- IN CONST VOID *SourceBuffer,\r
- IN UINTN Length\r
- )\r
-{\r
- while ((--Length != 0) &&\r
- (*(INT8*)DestinationBuffer == *(INT8*)SourceBuffer)) {\r
- DestinationBuffer = (INT8*)DestinationBuffer + 1;\r
- SourceBuffer = (INT8*)SourceBuffer + 1;\r
- }\r
- return (INTN)*(UINT8*)DestinationBuffer - (INTN)*(UINT8*)SourceBuffer;\r
-}\r
-\r
-/**\r
- Scans a target buffer for an 8-bit value, and returns a pointer to the\r
- matching 8-bit value in the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return Pointer to the first occurrence or NULL if not found.\r
-\r
-**/\r
-CONST VOID *\r
-EFIAPI\r
-InternalMemScanMem8 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT8 Value\r
- )\r
-{\r
- CONST UINT8 *Pointer;\r
-\r
- Pointer = (CONST UINT8*)Buffer;\r
- do {\r
- if (*(Pointer++) == Value) {\r
- return Pointer;\r
- }\r
- } while (--Length != 0);\r
- return NULL;\r
-}\r
-\r
-/**\r
- Scans a target buffer for a 16-bit value, and returns a pointer to the\r
- matching 16-bit value in the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return Pointer to the first occurrence or NULL if not found.\r
-\r
-**/\r
-CONST VOID *\r
-EFIAPI\r
-InternalMemScanMem16 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT16 Value\r
- )\r
-{\r
- CONST UINT16 *Pointer;\r
-\r
- Pointer = (CONST UINT16*)Buffer;\r
- do {\r
- if (*(Pointer++) == Value) {\r
- return Pointer;\r
- }\r
- } while (--Length != 0);\r
- return NULL;\r
-}\r
-\r
-/**\r
- Scans a target buffer for a 32-bit value, and returns a pointer to the\r
- matching 32-bit value in the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return Pointer to the first occurrence or NULL if not found.\r
-\r
-**/\r
-CONST VOID *\r
-EFIAPI\r
-InternalMemScanMem32 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT32 Value\r
- )\r
-{\r
- CONST UINT32 *Pointer;\r
-\r
- Pointer = (CONST UINT32*)Buffer;\r
- do {\r
- if (*(Pointer++) == Value) {\r
- return Pointer;\r
- }\r
- } while (--Length != 0);\r
- return NULL;\r
-}\r
-\r
-/**\r
- Scans a target buffer for a 64-bit value, and returns a pointer to the\r
- matching 64-bit value in the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return Pointer to the first occurrence or NULL if not found.\r
-\r
-**/\r
-CONST VOID *\r
-EFIAPI\r
-InternalMemScanMem64 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT64 Value\r
- )\r
-{\r
- CONST UINT64 *Pointer;\r
-\r
- Pointer = (CONST UINT64*)Buffer;\r
- do {\r
- if (*(Pointer++) == Value) {\r
- return Pointer;\r
- }\r
- } while (--Length != 0);\r
- return NULL;\r
-}\r
+++ /dev/null
-/** @file\r
- Implementation of GUID functions.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: MemLibGuid.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-/**\r
- Copies a source GUID to a destination GUID.\r
-\r
- This function copies the contents of the 128-bit GUID specified by SourceGuid to\r
- DestinationGuid, and returns DestinationGuid.\r
- If DestinationGuid is NULL, then ASSERT().\r
- If SourceGuid is NULL, then ASSERT().\r
-\r
- @param DestinationGuid Pointer to the destination GUID.\r
- @param SourceGuid Pointer to the source GUID.\r
-\r
- @return DestinationGuid.\r
-\r
-**/\r
-GUID *\r
-EFIAPI\r
-CopyGuid (\r
- OUT GUID *DestinationGuid,\r
- IN CONST GUID *SourceGuid\r
- )\r
-{\r
- WriteUnaligned64 (\r
- (UINT64*)DestinationGuid,\r
- ReadUnaligned64 ((CONST UINT64*)SourceGuid)\r
- );\r
- WriteUnaligned64 (\r
- (UINT64*)DestinationGuid + 1,\r
- ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1)\r
- );\r
- return DestinationGuid;\r
-}\r
-\r
-/**\r
- Compares two GUIDs.\r
-\r
- This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE is returned.\r
- If there are any bit differences in the two GUIDs, then FALSE is returned.\r
- If Guid1 is NULL, then ASSERT().\r
- If Guid2 is NULL, then ASSERT().\r
-\r
- @param Guid1 A pointer to a 128 bit GUID.\r
- @param Guid2 A pointer to a 128 bit GUID.\r
-\r
- @retval TRUE Guid1 and Guid2 are identical.\r
- @retval FALSE Guid1 and Guid2 are not identical.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-CompareGuid (\r
- IN CONST GUID *Guid1,\r
- IN CONST GUID *Guid2\r
- )\r
-{\r
- return (BOOLEAN)(\r
- ReadUnaligned64 ((CONST UINT64*)Guid1)\r
- == ReadUnaligned64 ((CONST UINT64*)Guid2) &&\r
- ReadUnaligned64 ((CONST UINT64*)Guid1 + 1)\r
- == ReadUnaligned64 ((CONST UINT64*)Guid2 + 1)\r
- );\r
-}\r
-\r
-/**\r
- Scans a target buffer for a GUID, and returns a pointer to the matching GUID\r
- in the target buffer.\r
-\r
- This function searches target the buffer specified by Buffer and Length from\r
- the lowest address to the highest address at 128-bit increments for the 128-bit\r
- GUID value that matches Guid. If a match is found, then a pointer to the matching\r
- GUID in the target buffer is returned. If no match is found, then NULL is returned.\r
- If Length is 0, then NULL is returned.\r
- If Length > 0 and Buffer is NULL, then ASSERT().\r
- If Buffer is not aligned on a 64-bit boundary, then ASSERT().\r
- If Length is greater than (MAX_ADDRESS \96 Buffer + 1), then ASSERT(). \r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan.\r
- @param Guid Value to search for in the target buffer.\r
-\r
- @return A pointer to the matching Guid in the target buffer or NULL otherwise.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-ScanGuid (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN CONST GUID *Guid\r
- )\r
-{\r
- CONST GUID *GuidPtr;\r
-\r
- ASSERT (Buffer != NULL);\r
- //\r
- // Make sure Buffer is aligned on a 64-bit boundary.\r
- //\r
- ASSERT (((UINTN) Buffer & 7) == 0);\r
-\r
- ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));\r
-\r
- GuidPtr = (GUID*)Buffer;\r
- Buffer = GuidPtr + Length / sizeof (*GuidPtr);\r
- while (GuidPtr < (CONST GUID*)Buffer) {\r
- if (CompareGuid (GuidPtr, Guid)) {\r
- return (VOID*)GuidPtr;\r
- }\r
- GuidPtr++;\r
- }\r
- return NULL;\r
-}\r
+++ /dev/null
-/** @file\r
- Declaration of internal functions for Base Memory Library.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: MemLibInternals.h\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#ifndef __MEM_LIB_INTERNALS__\r
-#define __MEM_LIB_INTERNALS__\r
-\r
-/**\r
- Copy Length bytes from Source to Destination.\r
-\r
- @param Destination Target of copy\r
- @param Source Place to copy from\r
- @param Length Number of bytes to copy\r
-\r
- @return Destination\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-InternalMemCopyMem (\r
- OUT VOID *DestinationBuffer,\r
- IN CONST VOID *SourceBuffer,\r
- IN UINTN Length\r
- );\r
-\r
-/**\r
- Set Buffer to Value for Size bytes.\r
-\r
- @param Buffer Memory to set.\r
- @param Size Number of bytes to set\r
- @param Value Value of the set operation.\r
-\r
- @return Buffer\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-InternalMemSetMem (\r
- OUT VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT8 Value\r
- );\r
-\r
-/**\r
- Fills a target buffer with a 16-bit value, and returns the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to fill.\r
- @param Length Number of bytes in Buffer to fill.\r
- @param Value Value with which to fill Length bytes of Buffer.\r
-\r
- @return Buffer\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-InternalMemSetMem16 (\r
- OUT VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT16 Value\r
- );\r
-\r
-/**\r
- Fills a target buffer with a 32-bit value, and returns the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to fill.\r
- @param Length Number of bytes in Buffer to fill.\r
- @param Value Value with which to fill Length bytes of Buffer.\r
-\r
- @return Buffer\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-InternalMemSetMem32 (\r
- OUT VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT32 Value\r
- );\r
-\r
-/**\r
- Fills a target buffer with a 64-bit value, and returns the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to fill.\r
- @param Length Number of bytes in Buffer to fill.\r
- @param Value Value with which to fill Length bytes of Buffer.\r
-\r
- @return Buffer\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-InternalMemSetMem64 (\r
- OUT VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT64 Value\r
- );\r
-\r
-/**\r
- Set Buffer to 0 for Size bytes.\r
-\r
- @param Buffer Memory to set.\r
- @param Size Number of bytes to set\r
-\r
- @return Buffer\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-InternalMemZeroMem (\r
- OUT VOID *Buffer,\r
- IN UINTN Length\r
- );\r
-\r
-/**\r
- Compares two memory buffers of a given length.\r
-\r
- @param DestinationBuffer First memory buffer\r
- @param SourceBuffer Second memory buffer\r
- @param Length Length of DestinationBuffer and SourceBuffer memory\r
- regions to compare. Must be non-zero.\r
-\r
- @retval 0 if MemOne == MemTwo\r
-\r
-**/\r
-INTN\r
-EFIAPI\r
-InternalMemCompareMem (\r
- IN CONST VOID *DestinationBuffer,\r
- IN CONST VOID *SourceBuffer,\r
- IN UINTN Length\r
- );\r
-\r
-/**\r
- Scans a target buffer for an 8-bit value, and returns a pointer to the\r
- matching 8-bit value in the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return Pointer to the first occurrence or NULL if not found.\r
-\r
-**/\r
-CONST VOID *\r
-EFIAPI\r
-InternalMemScanMem8 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT8 Value\r
- );\r
-\r
-/**\r
- Scans a target buffer for a 16-bit value, and returns a pointer to the\r
- matching 16-bit value in the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return Pointer to the first occurrence or NULL if not found.\r
-\r
-**/\r
-CONST VOID *\r
-EFIAPI\r
-InternalMemScanMem16 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT16 Value\r
- );\r
-\r
-/**\r
- Scans a target buffer for a 32-bit value, and returns a pointer to the\r
- matching 32-bit value in the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return Pointer to the first occurrence or NULL if not found.\r
-\r
-**/\r
-CONST VOID *\r
-EFIAPI\r
-InternalMemScanMem32 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT32 Value\r
- );\r
-\r
-/**\r
- Scans a target buffer for a 64-bit value, and returns a pointer to the\r
- matching 64-bit value in the target buffer.\r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan. Must be non-zero.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return Pointer to the first occurrence or NULL if not found.\r
-\r
-**/\r
-CONST VOID *\r
-EFIAPI\r
-InternalMemScanMem64 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT64 Value\r
- );\r
-\r
-#endif\r
+++ /dev/null
-/** @file\r
- ScanMem16() implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: ScanMem16Wrapper.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Scans a target buffer for a 16-bit value, and returns a pointer to the matching 16-bit value\r
- in the target buffer.\r
-\r
- This function searches target the buffer specified by Buffer and Length from the lowest\r
- address to the highest address for a 16-bit value that matches Value. If a match is found,\r
- then a pointer to the matching byte in the target buffer is returned. If no match is found,\r
- then NULL is returned. If Length is 0, then NULL is returned.\r
- If Length > 0 and Buffer is NULL, then ASSERT().\r
- If Buffer is not aligned on a 16-bit boundary, then ASSERT().\r
- If Length is greater than (MAX_ADDRESS \96 Buffer + 1), then ASSERT(). \r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return A pointer to the matching byte in the target buffer or NULL otherwise.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-ScanMem16 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT16 Value\r
- )\r
-{\r
- UINTN Stride;\r
- \r
- Stride = Length / sizeof (Value);\r
- if (Stride == 0) {\r
- return NULL;\r
- }\r
-\r
- ASSERT (Buffer != NULL);\r
- ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0);\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
-\r
- return (VOID*)InternalMemScanMem16 (Buffer, Stride, Value);\r
-}\r
+++ /dev/null
-/** @file\r
- ScanMem32() implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: ScanMem32Wrapper.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Scans a target buffer for a 32-bit value, and returns a pointer to the matching 32-bit value\r
- in the target buffer.\r
-\r
- This function searches target the buffer specified by Buffer and Length from the lowest\r
- address to the highest address for a 32-bit value that matches Value. If a match is found,\r
- then a pointer to the matching byte in the target buffer is returned. If no match is found,\r
- then NULL is returned. If Length is 0, then NULL is returned.\r
- If Length > 0 and Buffer is NULL, then ASSERT().\r
- If Buffer is not aligned on a 32-bit boundary, then ASSERT().\r
- If Length is greater than (MAX_ADDRESS \96 Buffer + 1), then ASSERT(). \r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return A pointer to the matching byte in the target buffer or NULL otherwise.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-ScanMem32 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT32 Value\r
- )\r
-{\r
- UINTN Stride;\r
- \r
- Stride = Length / sizeof (Value);\r
- if (Stride == 0) {\r
- return NULL;\r
- }\r
-\r
- ASSERT (Buffer != NULL);\r
- ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0);\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
-\r
- return (VOID*)InternalMemScanMem32 (Buffer, Stride, Value);\r
-}\r
+++ /dev/null
-/** @file\r
- ScanMem64() implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: ScanMem64Wrapper.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Scans a target buffer for a 64-bit value, and returns a pointer to the matching 64-bit value\r
- in the target buffer.\r
-\r
- This function searches target the buffer specified by Buffer and Length from the lowest\r
- address to the highest address for a 64-bit value that matches Value. If a match is found,\r
- then a pointer to the matching byte in the target buffer is returned. If no match is found,\r
- then NULL is returned. If Length is 0, then NULL is returned.\r
- If Length > 0 and Buffer is NULL, then ASSERT().\r
- If Buffer is not aligned on a 64-bit boundary, then ASSERT().\r
- If Length is greater than (MAX_ADDRESS \96 Buffer + 1), then ASSERT(). \r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return A pointer to the matching byte in the target buffer or NULL otherwise.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-ScanMem64 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT64 Value\r
- )\r
-{\r
- UINTN Stride;\r
- \r
- Stride = Length / sizeof (Value);\r
- if (Stride == 0) {\r
- return NULL;\r
- }\r
-\r
- ASSERT (Buffer != NULL);\r
- ASSERT (((UINTN)Buffer & (sizeof (Value) - 1)) == 0);\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
-\r
- return (VOID*)InternalMemScanMem64 (Buffer, Stride, Value);\r
-}\r
+++ /dev/null
-/** @file\r
- ScanMem8() implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: ScanMem8Wrapper.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Scans a target buffer for an 8-bit value, and returns a pointer to the matching 8-bit value\r
- in the target buffer.\r
-\r
- This function searches target the buffer specified by Buffer and Length from the lowest\r
- address to the highest address for an 8-bit value that matches Value. If a match is found,\r
- then a pointer to the matching byte in the target buffer is returned. If no match is found,\r
- then NULL is returned. If Length is 0, then NULL is returned.\r
- If Length > 0 and Buffer is NULL, then ASSERT().\r
- If Length is greater than (MAX_ADDRESS \96 Buffer + 1), then ASSERT(). \r
-\r
- @param Buffer Pointer to the target buffer to scan.\r
- @param Length Number of bytes in Buffer to scan.\r
- @param Value Value to search for in the target buffer.\r
-\r
- @return A pointer to the matching byte in the target buffer or NULL otherwise.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-ScanMem8 (\r
- IN CONST VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT8 Value\r
- )\r
-{\r
- if (Length == 0) {\r
- return NULL;\r
- }\r
- ASSERT (Buffer != NULL);\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
- \r
- return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);\r
-}\r
+++ /dev/null
-/** @file\r
- SetMem16() implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: SetMem16Wrapper.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Fills a target buffer with a 16-bit value, and returns the target buffer.\r
-\r
- This function fills Length bytes of Buffer with the 16-bit value specified by\r
- Value, and returns Buffer. Value is repeated every 16-bits in for Length\r
- bytes of Buffer.\r
-\r
- If Length > 0 and Buffer is NULL, then ASSERT().\r
- If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
- If Buffer is not aligned on a 16-bit boundary, then ASSERT().\r
- If Length is not aligned on a 16-bit boundary, then ASSERT().\r
-\r
- @param Buffer Pointer to the target buffer to fill.\r
- @param Length Number of bytes in Buffer to fill.\r
- @param Value Value with which to fill Length bytes of Buffer.\r
-\r
- @return Buffer.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-SetMem16 (\r
- OUT VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT16 Value\r
- )\r
-{\r
- if (Length == 0) {\r
- return Buffer;\r
- }\r
-\r
- ASSERT (Buffer != NULL);\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
- ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);\r
- ASSERT ((Length & (sizeof (Value) - 1)) == 0);\r
-\r
- return InternalMemSetMem16 (Buffer, Length / sizeof (Value), Value);\r
-}\r
+++ /dev/null
-/** @file\r
- SetMem32() implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: SetMem32Wrapper.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Fills a target buffer with a 32-bit value, and returns the target buffer.\r
-\r
- This function fills Length bytes of Buffer with the 32-bit value specified by\r
- Value, and returns Buffer. Value is repeated every 32-bits in for Length\r
- bytes of Buffer.\r
-\r
- If Length > 0 and Buffer is NULL, then ASSERT().\r
- If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
- If Buffer is not aligned on a 32-bit boundary, then ASSERT().\r
- If Length is not aligned on a 32-bit boundary, then ASSERT().\r
-\r
- @param Buffer Pointer to the target buffer to fill.\r
- @param Length Number of bytes in Buffer to fill.\r
- @param Value Value with which to fill Length bytes of Buffer.\r
-\r
- @return Buffer.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-SetMem32 (\r
- OUT VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT32 Value\r
- )\r
-{\r
- if (Length == 0) {\r
- return Buffer;\r
- }\r
-\r
- ASSERT (Buffer != NULL);\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
- ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);\r
- ASSERT ((Length & (sizeof (Value) - 1)) == 0);\r
-\r
- return InternalMemSetMem32 (Buffer, Length / sizeof (Value), Value);\r
-}\r
+++ /dev/null
-/** @file\r
- SetMem64() implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: SetMem64Wrapper.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Fills a target buffer with a 64-bit value, and returns the target buffer.\r
-\r
- This function fills Length bytes of Buffer with the 64-bit value specified by\r
- Value, and returns Buffer. Value is repeated every 64-bits in for Length\r
- bytes of Buffer.\r
-\r
- If Length > 0 and Buffer is NULL, then ASSERT().\r
- If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
- If Buffer is not aligned on a 64-bit boundary, then ASSERT().\r
- If Length is not aligned on a 64-bit boundary, then ASSERT().\r
-\r
- @param Buffer Pointer to the target buffer to fill.\r
- @param Length Number of bytes in Buffer to fill.\r
- @param Value Value with which to fill Length bytes of Buffer.\r
-\r
- @return Buffer.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-SetMem64 (\r
- OUT VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT64 Value\r
- )\r
-{\r
- if (Length == 0) {\r
- return Buffer;\r
- }\r
-\r
- ASSERT (Buffer != NULL);\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
- ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);\r
- ASSERT ((Length & (sizeof (Value) - 1)) == 0);\r
-\r
- return InternalMemSetMem64 (Buffer, Length / sizeof (Value), Value);\r
-}\r
+++ /dev/null
-/** @file\r
- SetMem() implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: SetMemWrapper.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Fills a target buffer with a byte value, and returns the target buffer.\r
-\r
- This function fills Length bytes of Buffer with Value, and returns Buffer.\r
- If Length is greater than (MAX_ADDRESS \96 Buffer + 1), then ASSERT(). \r
-\r
- @param Buffer Memory to set.\r
- @param Length Number of bytes to set\r
- @param Value Value of the set operation.\r
-\r
- @return Buffer.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-SetMem (\r
- OUT VOID *Buffer,\r
- IN UINTN Length,\r
- IN UINT8 Value\r
- )\r
-{\r
- if (Length == 0) {\r
- return Buffer;\r
- }\r
-\r
- ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
-\r
- return InternalMemSetMem (Buffer, Length, Value);\r
-}\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
--->\r
-<LibraryModuleBuildDescription xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">\r
- <MbdLibHeader>\r
- <BaseName>UefiMemoryLib</BaseName>\r
- <Guid>f1bbe03d-2f28-4dee-bec7-d98d7a30c36a</Guid>\r
- <Version>EDK_RELEASE_VERSION 0x00090000</Version>\r
- <Description>FIX ME!</Description>\r
- <Copyright>Copyright (c) 2004-2006, Intel Corporation</Copyright>\r
- <License>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
- </License>\r
- <Created>2006-04-12 13:39</Created>\r
- </MbdLibHeader>\r
-</LibraryModuleBuildDescription>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0">\r
- <MsaHeader>\r
- <ModuleName>UefiMemoryLib</ModuleName>\r
- <ModuleType>UEFI_DRIVER</ModuleType>\r
- <GuidValue>f1bbe03d-2f28-4dee-bec7-d98d7a30c36a</GuidValue>\r
- <Version>1.0</Version>\r
- <Abstract>Memory-only library functions with no library constructor/destructor</Abstract>\r
- <Description>FIX ME!</Description>\r
- <Copyright>Copyright (c) 2004-2006, Intel Corporation</Copyright>\r
- <License>All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.</License>\r
- <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>\r
- </MsaHeader>\r
- <ModuleDefinitions>\r
- <SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>\r
- <BinaryModule>false</BinaryModule>\r
- <OutputFileBasename>UefiMemoryLib</OutputFileBasename>\r
- </ModuleDefinitions>\r
- <LibraryClassDefinitions>\r
- <LibraryClass Usage="ALWAYS_PRODUCED">\r
- <Keyword>BaseMemoryLib</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>DebugLib</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>UefiBootServicesTableLib</Keyword>\r
- </LibraryClass>\r
- <LibraryClass Usage="ALWAYS_CONSUMED">\r
- <Keyword>BaseLib</Keyword>\r
- </LibraryClass>\r
- </LibraryClassDefinitions>\r
- <SourceFiles>\r
- <Filename>MemLib.c</Filename>\r
- <Filename>MemLibGuid.c</Filename>\r
- <Filename>MemLibGeneric.c</Filename>\r
- <Filename>CopyMemWrapper.c</Filename>\r
- <Filename>SetMemWrapper.c</Filename>\r
- <Filename>SetMem16Wrapper.c</Filename>\r
- <Filename>SetMem32Wrapper.c</Filename>\r
- <Filename>SetMem64Wrapper.c</Filename>\r
- <Filename>CompareMemWrapper.c</Filename>\r
- <Filename>ZeroMemWrapper.c</Filename>\r
- <Filename>ScanMem8Wrapper.c</Filename>\r
- <Filename>ScanMem16Wrapper.c</Filename>\r
- <Filename>ScanMem32Wrapper.c</Filename>\r
- <Filename>ScanMem64Wrapper.c</Filename>\r
- </SourceFiles>\r
- <PackageDependencies>\r
- <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r
- </PackageDependencies>\r
- <Externs>\r
- <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>\r
- <Specification>EDK_RELEASE_VERSION 0x00090000</Specification>\r
- </Externs>\r
-</ModuleSurfaceArea>
\ No newline at end of file
+++ /dev/null
-/** @file\r
- ZeroMem() implementation.\r
-\r
- Copyright (c) 2006, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
- Module Name: ZeroMemWrapper.c\r
-\r
- The following BaseMemoryLib instances share the same version of this file:\r
-\r
- BaseMemoryLib\r
- BaseMemoryLibMmx\r
- BaseMemoryLibSse2\r
- BaseMemoryLibRepStr\r
- PeiMemoryLib\r
- UefiMemoryLib\r
-\r
-**/\r
-\r
-#include "MemLibInternals.h"\r
-\r
-/**\r
- Fills a target buffer with zeros, and returns the target buffer.\r
-\r
- This function fills Length bytes of Buffer with zeros, and returns Buffer.\r
- If Length > 0 and Buffer is NULL, then ASSERT().\r
- If Length is greater than (MAX_ADDRESS \96 Buffer + 1), then ASSERT(). \r
-\r
- @param Buffer Pointer to the target buffer to fill with zeros.\r
- @param Length Number of bytes in Buffer to fill with zeros.\r
-\r
- @return Buffer.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-ZeroMem (\r
- OUT VOID *Buffer,\r
- IN UINTN Length\r
- )\r
-{\r
- ASSERT (!(Buffer == NULL && Length > 0));\r
- ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));\r
- return InternalMemSetMem (Buffer, Length, 0);\r
-}\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?><!-- Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.-->\r
-<project basedir="." default="UefiMemoryLib"><!--Apply external ANT tasks-->\r
- <taskdef resource="GenBuild.tasks"/>\r
- <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
- <property environment="env"/>\r
- <property name="WORKSPACE_DIR" value="${env.WORKSPACE}"/>\r
- <import file="${WORKSPACE_DIR}/Tools/Conf/BuildMacro.xml"/><!--MODULE_RELATIVE PATH is relative to PACKAGE_DIR-->\r
- <property name="MODULE_RELATIVE_PATH" value="Library/UefiMemoryLib"/>\r
- <property name="MODULE_DIR" value="${PACKAGE_DIR}/${MODULE_RELATIVE_PATH}"/>\r
- <property name="COMMON_FILE" value="${WORKSPACE_DIR}/Tools/Conf/Common.xml"/>\r
- <target name="UefiMemoryLib">\r
- <GenBuild baseName="UefiMemoryLib" mbdFilename="${MODULE_DIR}/UefiMemoryLib.mbd" msaFilename="${MODULE_DIR}/UefiMemoryLib.msa"/>\r
- </target>\r
- <target depends="UefiMemoryLib_clean" name="clean"/>\r
- <target depends="UefiMemoryLib_cleanall" name="cleanall"/>\r
- <target name="UefiMemoryLib_clean">\r
- <OutputDirSetup baseName="UefiMemoryLib" mbdFilename="${MODULE_DIR}/UefiMemoryLib.mbd" msaFilename="${MODULE_DIR}/UefiMemoryLib.msa"/>\r
- <if>\r
- <available file="${DEST_DIR_OUTPUT}/UefiMemoryLib_build.xml"/>\r
- <then>\r
- <ant antfile="${DEST_DIR_OUTPUT}/UefiMemoryLib_build.xml" target="clean"/>\r
- </then>\r
- </if>\r
- <delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>\r
- </target>\r
- <target name="UefiMemoryLib_cleanall">\r
- <OutputDirSetup baseName="UefiMemoryLib" mbdFilename="${MODULE_DIR}/UefiMemoryLib.mbd" msaFilename="${MODULE_DIR}/UefiMemoryLib.msa"/>\r
- <if>\r
- <available file="${DEST_DIR_OUTPUT}/UefiMemoryLib_build.xml"/>\r
- <then>\r
- <ant antfile="${DEST_DIR_OUTPUT}/UefiMemoryLib_build.xml" target="cleanall"/>\r
- </then>\r
- </if>\r
- <delete dir="${DEST_DIR_OUTPUT}"/>\r
- <delete dir="${DEST_DIR_DEBUG}"/>\r
- <delete>\r
- <fileset dir="${BIN_DIR}" includes="**UefiMemoryLib*"/>\r
- </delete>\r
- </target>\r
-</project>
\ No newline at end of file