VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLib/SetMem64Wrapper.c

最後變更 在這個檔案是 80721,由 vboxsync 提交於 5 年 前

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.5 KB
 
1/** @file
2 SetMem64() implementation.
3
4 The following BaseMemoryLib instances contain the same copy of this file:
5 BaseMemoryLib
6 BaseMemoryLibMmx
7 BaseMemoryLibSse2
8 BaseMemoryLibRepStr
9 BaseMemoryLibOptDxe
10 BaseMemoryLibOptPei
11 PeiMemoryLib
12 UefiMemoryLib
13
14 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
15 SPDX-License-Identifier: BSD-2-Clause-Patent
16
17**/
18
19#include "MemLibInternals.h"
20
21/**
22 Fills a target buffer with a 64-bit value, and returns the target buffer.
23
24 This function fills Length bytes of Buffer with the 64-bit value specified by
25 Value, and returns Buffer. Value is repeated every 64-bits in for Length
26 bytes of Buffer.
27
28 If Length > 0 and Buffer is NULL, then ASSERT().
29 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
30 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
31 If Length is not aligned on a 64-bit boundary, then ASSERT().
32
33 @param Buffer The pointer to the target buffer to fill.
34 @param Length The number of bytes in Buffer to fill.
35 @param Value The value with which to fill Length bytes of Buffer.
36
37 @return Buffer.
38
39**/
40VOID *
41EFIAPI
42SetMem64 (
43 OUT VOID *Buffer,
44 IN UINTN Length,
45 IN UINT64 Value
46 )
47{
48 if (Length == 0) {
49 return Buffer;
50 }
51
52 ASSERT (Buffer != NULL);
53 ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
54 ASSERT ((((UINTN)Buffer) & (sizeof (Value) - 1)) == 0);
55 ASSERT ((Length & (sizeof (Value) - 1)) == 0);
56
57 return InternalMemSetMem64 (Buffer, Length / sizeof (Value), Value);
58}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette