]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/BaseMemoryLibVstm/MemLibGuid.c
ArmPkg/TimerDxe: Register the virt and hyp timer interrupts at init time.
[mirror_edk2.git] / ArmPkg / Library / BaseMemoryLibVstm / MemLibGuid.c
index 737341023a0e3fe7b35fe361ba819a0573d7e0c4..dc9e2c319ba94933ab47a94ad7f6bbe343a36bd9 100755 (executable)
@@ -2,7 +2,7 @@
   Implementation of GUID functions.\r
 \r
   The following BaseMemoryLib instances contain the same copy of this file:\r
-  \r
+\r
     BaseMemoryLib\r
     BaseMemoryLibMmx\r
     BaseMemoryLibSse2\r
@@ -12,8 +12,8 @@
     PeiMemoryLib\r
     UefiMemoryLib\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+  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
@@ -30,7 +30,7 @@
 \r
   This function copies the contents of the 128-bit GUID specified by SourceGuid to\r
   DestinationGuid, and returns DestinationGuid.\r
-  \r
+\r
   If DestinationGuid is NULL, then ASSERT().\r
   If SourceGuid is NULL, then ASSERT().\r
 \r
@@ -63,7 +63,7 @@ CopyGuid (
 \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
-  \r
+\r
   If Guid1 is NULL, then ASSERT().\r
   If Guid2 is NULL, then ASSERT().\r
 \r
@@ -81,17 +81,7 @@ CompareGuid (
   IN CONST GUID  *Guid2\r
   )\r
 {\r
-  UINT64  LowPartOfGuid1;\r
-  UINT64  LowPartOfGuid2;\r
-  UINT64  HighPartOfGuid1;\r
-  UINT64  HighPartOfGuid2;\r
-\r
-  LowPartOfGuid1  = ReadUnaligned64 ((CONST UINT64*) Guid1);\r
-  LowPartOfGuid2  = ReadUnaligned64 ((CONST UINT64*) Guid2);\r
-  HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1);\r
-  HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1);\r
-\r
-  return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2);\r
+  return (CompareMem(Guid1, Guid2, sizeof(GUID) == 0)) ? TRUE : FALSE;\r
 }\r
 \r
 /**\r
@@ -103,7 +93,7 @@ CompareGuid (
   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
-  \r
+\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 not aligned on a 128-bit boundary, then ASSERT().\r