These functions should be used in place of coding your own loops to do equivalent common functions. \r
This allows optimized library implementations to help increase performance. \r
\r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available under \r
the terms and conditions of the BSD License that accompanies this distribution. \r
The full text of the license may be found at\r
IN CONST GUID *Guid\r
);\r
\r
+/**\r
+ Checks if the given GUID is a zero GUID.\r
+\r
+ This function checks whether the given GUID is a zero GUID. If the GUID is\r
+ identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned.\r
+\r
+ If Guid is NULL, then ASSERT().\r
+\r
+ @param Guid The pointer to a 128 bit GUID.\r
+\r
+ @retval TRUE Guid is a zero GUID.\r
+ @retval FALSE Guid is not a zero GUID.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroGuid (\r
+ IN CONST GUID *Guid\r
+ );\r
+\r
#endif\r
PeiMemoryLib\r
UefiMemoryLib\r
\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, 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
}\r
return NULL;\r
}\r
+\r
+/**\r
+ Checks if the given GUID is a zero GUID.\r
+\r
+ This function checks whether the given GUID is a zero GUID. If the GUID is\r
+ identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned.\r
+\r
+ If Guid is NULL, then ASSERT().\r
+\r
+ @param Guid The pointer to a 128 bit GUID.\r
+\r
+ @retval TRUE Guid is a zero GUID.\r
+ @retval FALSE Guid is not a zero GUID.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroGuid (\r
+ IN CONST GUID *Guid\r
+ )\r
+{\r
+ UINT64 LowPartOfGuid;\r
+ UINT64 HighPartOfGuid;\r
+\r
+ LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid);\r
+ HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1);\r
+\r
+ return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0);\r
+}\r
PeiMemoryLib\r
UefiMemoryLib\r
\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, 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
}\r
return NULL;\r
}\r
+\r
+/**\r
+ Checks if the given GUID is a zero GUID.\r
+\r
+ This function checks whether the given GUID is a zero GUID. If the GUID is\r
+ identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned.\r
+\r
+ If Guid is NULL, then ASSERT().\r
+\r
+ @param Guid The pointer to a 128 bit GUID.\r
+\r
+ @retval TRUE Guid is a zero GUID.\r
+ @retval FALSE Guid is not a zero GUID.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroGuid (\r
+ IN CONST GUID *Guid\r
+ )\r
+{\r
+ UINT64 LowPartOfGuid;\r
+ UINT64 HighPartOfGuid;\r
+\r
+ LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid);\r
+ HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1);\r
+\r
+ return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0);\r
+}\r
PeiMemoryLib\r
UefiMemoryLib\r
\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, 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
}\r
return NULL;\r
}\r
+\r
+/**\r
+ Checks if the given GUID is a zero GUID.\r
+\r
+ This function checks whether the given GUID is a zero GUID. If the GUID is\r
+ identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned.\r
+\r
+ If Guid is NULL, then ASSERT().\r
+\r
+ @param Guid The pointer to a 128 bit GUID.\r
+\r
+ @retval TRUE Guid is a zero GUID.\r
+ @retval FALSE Guid is not a zero GUID.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroGuid (\r
+ IN CONST GUID *Guid\r
+ )\r
+{\r
+ UINT64 LowPartOfGuid;\r
+ UINT64 HighPartOfGuid;\r
+\r
+ LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid);\r
+ HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1);\r
+\r
+ return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0);\r
+}\r
PeiMemoryLib\r
UefiMemoryLib\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, 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
}\r
return NULL;\r
}\r
+\r
+/**\r
+ Checks if the given GUID is a zero GUID.\r
+\r
+ This function checks whether the given GUID is a zero GUID. If the GUID is\r
+ identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned.\r
+\r
+ If Guid is NULL, then ASSERT().\r
+\r
+ @param Guid The pointer to a 128 bit GUID.\r
+\r
+ @retval TRUE Guid is a zero GUID.\r
+ @retval FALSE Guid is not a zero GUID.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroGuid (\r
+ IN CONST GUID *Guid\r
+ )\r
+{\r
+ UINT64 LowPartOfGuid;\r
+ UINT64 HighPartOfGuid;\r
+\r
+ LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid);\r
+ HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1);\r
+\r
+ return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0);\r
+}\r
PeiMemoryLib\r
UefiMemoryLib\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, 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
}\r
return NULL;\r
}\r
+\r
+/**\r
+ Checks if the given GUID is a zero GUID.\r
+\r
+ This function checks whether the given GUID is a zero GUID. If the GUID is\r
+ identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned.\r
+\r
+ If Guid is NULL, then ASSERT().\r
+\r
+ @param Guid The pointer to a 128 bit GUID.\r
+\r
+ @retval TRUE Guid is a zero GUID.\r
+ @retval FALSE Guid is not a zero GUID.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroGuid (\r
+ IN CONST GUID *Guid\r
+ )\r
+{\r
+ UINT64 LowPartOfGuid;\r
+ UINT64 HighPartOfGuid;\r
+\r
+ LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid);\r
+ HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1);\r
+\r
+ return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0);\r
+}\r
PeiMemoryLib\r
UefiMemoryLib\r
\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, 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
}\r
return NULL;\r
}\r
+\r
+/**\r
+ Checks if the given GUID is a zero GUID.\r
+\r
+ This function checks whether the given GUID is a zero GUID. If the GUID is\r
+ identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned.\r
+\r
+ If Guid is NULL, then ASSERT().\r
+\r
+ @param Guid The pointer to a 128 bit GUID.\r
+\r
+ @retval TRUE Guid is a zero GUID.\r
+ @retval FALSE Guid is not a zero GUID.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroGuid (\r
+ IN CONST GUID *Guid\r
+ )\r
+{\r
+ UINT64 LowPartOfGuid;\r
+ UINT64 HighPartOfGuid;\r
+\r
+ LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid);\r
+ HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1);\r
+\r
+ return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0);\r
+}\r
PeiMemoryLib\r
UefiMemoryLib\r
\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, 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
}\r
return NULL;\r
}\r
+\r
+/**\r
+ Checks if the given GUID is a zero GUID.\r
+\r
+ This function checks whether the given GUID is a zero GUID. If the GUID is\r
+ identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned.\r
+\r
+ If Guid is NULL, then ASSERT().\r
+\r
+ @param Guid The pointer to a 128 bit GUID.\r
+\r
+ @retval TRUE Guid is a zero GUID.\r
+ @retval FALSE Guid is not a zero GUID.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroGuid (\r
+ IN CONST GUID *Guid\r
+ )\r
+{\r
+ UINT64 LowPartOfGuid;\r
+ UINT64 HighPartOfGuid;\r
+\r
+ LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid);\r
+ HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1);\r
+\r
+ return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0);\r
+}\r
PeiMemoryLib\r
UefiMemoryLib\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, 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
}\r
return NULL;\r
}\r
+\r
+/**\r
+ Checks if the given GUID is a zero GUID.\r
+\r
+ This function checks whether the given GUID is a zero GUID. If the GUID is\r
+ identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned.\r
+\r
+ If Guid is NULL, then ASSERT().\r
+\r
+ @param Guid The pointer to a 128 bit GUID.\r
+\r
+ @retval TRUE Guid is a zero GUID.\r
+ @retval FALSE Guid is not a zero GUID.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroGuid (\r
+ IN CONST GUID *Guid\r
+ )\r
+{\r
+ UINT64 LowPartOfGuid;\r
+ UINT64 HighPartOfGuid;\r
+\r
+ LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid);\r
+ HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1);\r
+\r
+ return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0);\r
+}\r