]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/PeiMemoryLib/IsZeroBufferWrapper.c
2 Implementation of IsZeroBuffer function.
4 The following BaseMemoryLib instances contain the same copy of this file:
15 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
16 SPDX-License-Identifier: BSD-2-Clause-Patent
20 #include "MemLibInternals.h"
23 Checks if the contents of a buffer are all zeros.
25 This function checks whether the contents of a buffer are all zeros. If the
26 contents are all zeros, return TRUE. Otherwise, return FALSE.
28 If Length > 0 and Buffer is NULL, then ASSERT().
29 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
31 @param Buffer The pointer to the buffer to be checked.
32 @param Length The size of the buffer (in bytes) to be checked.
34 @retval TRUE Contents of the buffer are all zeros.
35 @retval FALSE Contents of the buffer are not all zeros.
41 IN CONST VOID
*Buffer
,
45 ASSERT (!(Buffer
== NULL
&& Length
> 0));
46 ASSERT ((Length
- 1) <= (MAX_ADDRESS
- (UINTN
)Buffer
));
47 return InternalMemIsZeroBuffer (Buffer
, Length
);