]>
git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Library/BaseMemoryLibVstm/SetMemWrapper.c
2 SetMem() and SetMemN() implementation.
4 The following BaseMemoryLib instances contain the same copy of this file:
15 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
16 This program and the accompanying materials
17 are licensed and made available under the terms and conditions of the BSD License
18 which accompanies this distribution. The full text of the license may be found at
19 http://opensource.org/licenses/bsd-license.php
21 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
22 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
26 #include "MemLibInternals.h"
29 Fills a target buffer with a byte value, and returns the target buffer.
31 This function fills Length bytes of Buffer with Value, and returns Buffer.
33 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
35 @param Buffer Memory to set.
36 @param Length Number of bytes to set.
37 @param Value Value with which to fill Length bytes of Buffer.
54 ASSERT ((Length
- 1) <= (MAX_ADDRESS
- (UINTN
)Buffer
));
56 return InternalMemSetMem (Buffer
, Length
, Value
);
60 Fills a target buffer with a value that is size UINTN, and returns the target buffer.
62 This function fills Length bytes of Buffer with the UINTN sized value specified by
63 Value, and returns Buffer. Value is repeated every sizeof(UINTN) bytes for Length
66 If Length > 0 and Buffer is NULL, then ASSERT().
67 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
68 If Buffer is not aligned on a UINTN boundary, then ASSERT().
69 If Length is not aligned on a UINTN boundary, then ASSERT().
71 @param Buffer Pointer to the target buffer to fill.
72 @param Length Number of bytes in Buffer to fill.
73 @param Value Value with which to fill Length bytes of Buffer.
86 if (sizeof (UINTN
) == sizeof (UINT64
)) {
87 return SetMem64 (Buffer
, Length
, (UINT64
)Value
);
89 return SetMem32 (Buffer
, Length
, (UINT32
)Value
);