]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileLib.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Library / DxeCoreMemoryAllocationLib / DxeCoreMemoryProfileLib.c
CommitLineData
e2735692
SZ
1/** @file\r
2 Support routines for memory profile for DxeCore.\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
e2735692
SZ
6\r
7**/\r
8\r
e2735692
SZ
9#include <PiDxe.h>\r
10\r
11#include <Guid/MemoryProfile.h>\r
12\r
13#include "DxeCoreMemoryProfileServices.h"\r
14\r
15/**\r
16 Record memory profile of multilevel caller.\r
17\r
18 @param[in] CallerAddress Address of caller.\r
19 @param[in] Action Memory profile action.\r
20 @param[in] MemoryType Memory type.\r
21 EfiMaxMemoryType means the MemoryType is unknown.\r
22 @param[in] Buffer Buffer address.\r
23 @param[in] Size Buffer size.\r
24 @param[in] ActionString String for memory profile action.\r
25 Only needed for user defined allocate action.\r
26\r
27 @return EFI_SUCCESS Memory profile is updated.\r
28 @return EFI_UNSUPPORTED Memory profile is unsupported,\r
29 or memory profile for the image is not required,\r
30 or memory profile for the memory type is not required.\r
31 @return EFI_ACCESS_DENIED It is during memory profile data getting.\r
32 @return EFI_ABORTED Memory profile recording is not enabled.\r
33 @return EFI_OUT_OF_RESOURCES No enough resource to update memory profile for allocate action.\r
34 @return EFI_NOT_FOUND No matched allocate info found for free action.\r
35\r
36**/\r
37EFI_STATUS\r
38EFIAPI\r
39MemoryProfileLibRecord (\r
1436aea4
MK
40 IN PHYSICAL_ADDRESS CallerAddress,\r
41 IN MEMORY_PROFILE_ACTION Action,\r
42 IN EFI_MEMORY_TYPE MemoryType,\r
43 IN VOID *Buffer,\r
44 IN UINTN Size,\r
45 IN CHAR8 *ActionString OPTIONAL\r
e2735692
SZ
46 )\r
47{\r
48 return CoreUpdateProfile (CallerAddress, Action, MemoryType, Size, Buffer, ActionString);\r
49}\r