]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/SetMem64Wrapper.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseMemoryLib / SetMem64Wrapper.c
CommitLineData
3eb9473e 1/*++\r
2\r
2c7e5c2f
HT
3Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 SetMem64Wrapper.c\r
16 \r
17Abstract: \r
18\r
19 SetMem64() implementation.\r
20\r
21--*/\r
22\r
23#include "BaseMemoryLibInternal.h"\r
24\r
25/**\r
26 Fills a target buffer with a 64-bit value, and returns the target buffer.\r
27\r
28 This function fills Length bytes of Buffer with the 64-bit value specified by\r
29 Value, and returns Buffer. Value is repeated every 64-bits in for Length\r
30 bytes of Buffer.\r
31\r
32 If Length > 0 and Buffer is NULL, then ASSERT().\r
33 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
34 If Buffer is not aligned on a 64-bit boundary, then ASSERT().\r
35 If Length is not aligned on a 64-bit boundary, then ASSERT().\r
36\r
37 @param Buffer Pointer to the target buffer to fill.\r
38 @param Length Number of bytes in Buffer to fill.\r
39 @param Value Value with which to fill Length bytes of Buffer.\r
40\r
41 @return Buffer.\r
42\r
43**/\r
44VOID *\r
45EFIAPI\r
46SetMem64 (\r
47 OUT VOID *Buffer,\r
48 IN UINTN Length,\r
49 IN UINT64 Value\r
50 )\r
51{\r
52 if (Length == 0) {\r
53 return Buffer;\r
54 }\r
55\r
56 ASSERT (Buffer != NULL);\r
57 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));\r
58 ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);\r
59 ASSERT ((Length & (sizeof (Value) - 1)) == 0);\r
60\r
61 return InternalMemSetMem64 (Buffer, Length / sizeof (Value), Value);\r
62}\r