]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c
CodeReview for MdePkg/BaseMemoryXXX libraries. Refine file description, function...
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibMmx / ZeroMemWrapper.c
CommitLineData
c5ecf6c1 1/** @file\r
2 ZeroMem() implementation.\r
3\r
2bfb6009 4 The following BaseMemoryLib instances contain the same copy of this file:\r
c5ecf6c1 5 BaseMemoryLib\r
6 BaseMemoryLibMmx\r
7 BaseMemoryLibSse2\r
8 BaseMemoryLibRepStr\r
2bfb6009
LG
9 BaseMemoryLibOptDxe\r
10 BaseMemoryLibOptPei\r
c5ecf6c1 11 PeiMemoryLib\r
12 DxeMemoryLib\r
13\r
d531bfee 14 Copyright (c) 2006, Intel Corporation<BR>\r
15 All rights reserved. This program and the accompanying materials\r
16 are licensed and made available under the terms and conditions of the BSD License\r
17 which accompanies this distribution. The full text of the license may be found at\r
18 http://opensource.org/licenses/bsd-license.php\r
19\r
20 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
21 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
22\r
c5ecf6c1 23**/\r
24\r
25#include "MemLibInternals.h"\r
26\r
27/**\r
28 Fills a target buffer with zeros, and returns the target buffer.\r
29\r
30 This function fills Length bytes of Buffer with zeros, and returns Buffer.\r
31 If Length > 0 and Buffer is NULL, then ASSERT().\r
cc4e0485 32 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
c5ecf6c1 33\r
34 @param Buffer Pointer to the target buffer to fill with zeros.\r
35 @param Length Number of bytes in Buffer to fill with zeros.\r
36\r
37 @return Buffer.\r
38\r
39**/\r
40VOID *\r
41EFIAPI\r
42ZeroMem (\r
43 OUT VOID *Buffer,\r
44 IN UINTN Length\r
45 )\r
46{\r
2bfb6009 47 ASSERT (!(Buffer == NULL && Length > 0));\r
c5ecf6c1 48 ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1));\r
49 return InternalMemZeroMem (Buffer, Length);\r
50}\r