]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/BaseMemoryLib.h
MdePkg BaseMemoryLib: Add C implementation of API IsZeroBuffer()
[mirror_edk2.git] / MdePkg / Include / Library / BaseMemoryLib.h
index ed7fa00d499b63c49a674344ff2fb005f68009c2..0e565c15427ada29f788cb8c88b3826e55a98783 100644 (file)
@@ -463,4 +463,27 @@ IsZeroGuid (
   IN CONST GUID  *Guid\r
   );\r
 \r
+/**\r
+  Checks if the contents of a buffer are all zeros.\r
+\r
+  This function checks whether the contents of a buffer are all zeros. If the\r
+  contents are all zeros, return TRUE. Otherwise, return FALSE.\r
+\r
+  If Length > 0 and Buffer is NULL, then ASSERT().\r
+  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
+\r
+  @param  Buffer      The pointer to the buffer to be checked.\r
+  @param  Length      The size of the buffer (in bytes) to be checked.\r
+\r
+  @retval TRUE        Contents of the buffer are all zeros.\r
+  @retval FALSE       Contents of the buffer are not all zeros.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsZeroBuffer (\r
+  IN CONST VOID  *Buffer,\r
+  IN UINTN       Length\r
+  );\r
+\r
 #endif\r