4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Implementation of GUID functions.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The following BaseMemoryLib instances contain the same copy of this file:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BaseMemoryLib
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BaseMemoryLibMmx
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BaseMemoryLibSse2
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BaseMemoryLibRepStr
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BaseMemoryLibOptDxe
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BaseMemoryLibOptPei
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PeiMemoryLib
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync UefiMemoryLib
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This program and the accompanying materials
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync are licensed and made available under the terms and conditions of the BSD License
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync which accompanies this distribution. The full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Copies a source GUID to a destination GUID.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function copies the contents of the 128-bit GUID specified by SourceGuid to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DestinationGuid, and returns DestinationGuid.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If DestinationGuid is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If SourceGuid is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param DestinationGuid The pointer to the destination GUID.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param SourceGuid The pointer to the source GUID.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return DestinationGuid.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Compares two GUIDs.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If there are any bit differences in the two GUIDs, then FALSE is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Guid1 is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Guid2 is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Guid1 A pointer to a 128 bit GUID.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Guid2 A pointer to a 128 bit GUID.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval TRUE Guid1 and Guid2 are identical.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval FALSE Guid1 and Guid2 are not identical.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Scans a target buffer for a GUID, and returns a pointer to the matching GUID
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync in the target buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This function searches the target buffer specified by Buffer and Length from
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the lowest address to the highest address at 128-bit increments for the 128-bit
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GUID value that matches Guid. If a match is found, then a pointer to the matching
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GUID in the target buffer is returned. If no match is found, then NULL is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length is 0, then NULL is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length > 0 and Buffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Buffer is not aligned on a 32-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length is not aligned on a 128-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Buffer The pointer to the target buffer to scan.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Length The number of bytes in Buffer to scan.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Guid The value to search for in the target buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return A pointer to the matching Guid in the target buffer or NULL otherwise.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0);