Last change
on this file was 80721, checked in by vboxsync, 6 years ago |
Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | /** @file
|
---|
2 | ZeroMem() implementation.
|
---|
3 |
|
---|
4 | The following BaseMemoryLib instances contain the same copy of this file:
|
---|
5 |
|
---|
6 | BaseMemoryLib
|
---|
7 | BaseMemoryLibMmx
|
---|
8 | BaseMemoryLibSse2
|
---|
9 | BaseMemoryLibRepStr
|
---|
10 | BaseMemoryLibOptDxe
|
---|
11 | BaseMemoryLibOptPei
|
---|
12 | PeiMemoryLib
|
---|
13 | UefiMemoryLib
|
---|
14 |
|
---|
15 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
---|
16 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
17 |
|
---|
18 | **/
|
---|
19 |
|
---|
20 | #include "MemLibInternals.h"
|
---|
21 |
|
---|
22 | /**
|
---|
23 | Fills a target buffer with zeros, and returns the target buffer.
|
---|
24 |
|
---|
25 | This function fills Length bytes of Buffer with zeros, and returns Buffer.
|
---|
26 |
|
---|
27 | If Length > 0 and Buffer is NULL, then ASSERT().
|
---|
28 | If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
---|
29 |
|
---|
30 | @param Buffer The pointer to the target buffer to fill with zeros.
|
---|
31 | @param Length The number of bytes in Buffer to fill with zeros.
|
---|
32 |
|
---|
33 | @return Buffer.
|
---|
34 |
|
---|
35 | **/
|
---|
36 | VOID *
|
---|
37 | EFIAPI
|
---|
38 | ZeroMem (
|
---|
39 | OUT VOID *Buffer,
|
---|
40 | IN UINTN Length
|
---|
41 | )
|
---|
42 | {
|
---|
43 | if (Length == 0) {
|
---|
44 | return Buffer;
|
---|
45 | }
|
---|
46 |
|
---|
47 | ASSERT (Buffer != NULL);
|
---|
48 | ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));
|
---|
49 | return InternalMemZeroMem (Buffer, Length);
|
---|
50 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.