]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Library/MemoryProfileLib.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Include / Library / MemoryProfileLib.h
CommitLineData
76570576
SZ
1/** @file\r
2 Provides services to record memory profile of multilevel caller.\r
3\r
d1102dba 4 Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
76570576
SZ
6\r
7**/\r
8\r
9#ifndef _MEMORY_PROFILE_LIB_H_\r
10#define _MEMORY_PROFILE_LIB_H_\r
11\r
12#include <Guid/MemoryProfile.h>\r
13\r
14/**\r
15 Record memory profile of multilevel caller.\r
16\r
17 @param[in] CallerAddress Address of caller.\r
18 @param[in] Action Memory profile action.\r
19 @param[in] MemoryType Memory type.\r
20 EfiMaxMemoryType means the MemoryType is unknown.\r
21 @param[in] Buffer Buffer address.\r
22 @param[in] Size Buffer size.\r
23 @param[in] ActionString String for memory profile action.\r
24 Only needed for user defined allocate action.\r
25\r
26 @return EFI_SUCCESS Memory profile is updated.\r
27 @return EFI_UNSUPPORTED Memory profile is unsupported,\r
28 or memory profile for the image is not required,\r
29 or memory profile for the memory type is not required.\r
30 @return EFI_ACCESS_DENIED It is during memory profile data getting.\r
31 @return EFI_ABORTED Memory profile recording is not enabled.\r
32 @return EFI_OUT_OF_RESOURCES No enough resource to update memory profile for allocate action.\r
33 @return EFI_NOT_FOUND No matched allocate info found for free action.\r
34\r
35**/\r
36EFI_STATUS\r
37EFIAPI\r
38MemoryProfileLibRecord (\r
39 IN PHYSICAL_ADDRESS CallerAddress,\r
40 IN MEMORY_PROFILE_ACTION Action,\r
41 IN EFI_MEMORY_TYPE MemoryType,\r
42 IN VOID *Buffer,\r
43 IN UINTN Size,\r
44 IN CHAR8 *ActionString OPTIONAL\r
45 );\r
46\r
47#endif\r