]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileServices.h
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Library / PiSmmCoreMemoryAllocationLib / PiSmmCoreMemoryProfileServices.h
CommitLineData
cdad7675
SZ
1/** @file\r
2 Contains function prototypes for Memory Profile Services in the SMM Core.\r
3\r
4 This header file borrows the PiSmmCore Memory Profile services as the primitive\r
5 for memory profile.\r
6\r
d1102dba
LG
7 Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
8 This program and the accompanying materials\r
9 are licensed and made available under the terms and conditions of the BSD License\r
10 which accompanies this distribution. The full text of the license may be found at\r
11 http://opensource.org/licenses/bsd-license.php\r
12\r
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
cdad7675
SZ
15\r
16**/\r
17\r
18#ifndef _PI_SMM_CORE_MEMORY_PROFILE_SERVICES_H_\r
19#define _PI_SMM_CORE_MEMORY_PROFILE_SERVICES_H_\r
20\r
21/**\r
22 Update SMRAM profile information.\r
23\r
24 @param CallerAddress Address of caller who call Allocate or Free.\r
25 @param Action This Allocate or Free action.\r
26 @param MemoryType Memory type.\r
27 EfiMaxMemoryType means the MemoryType is unknown.\r
28 @param Size Buffer size.\r
29 @param Buffer Buffer address.\r
30 @param ActionString String for memory profile action.\r
31 Only needed for user defined allocate action.\r
32\r
33 @return EFI_SUCCESS Memory profile is updated.\r
34 @return EFI_UNSUPPORTED Memory profile is unsupported,\r
35 or memory profile for the image is not required,\r
36 or memory profile for the memory type is not required.\r
37 @return EFI_ACCESS_DENIED It is during memory profile data getting.\r
38 @return EFI_ABORTED Memory profile recording is not enabled.\r
39 @return EFI_OUT_OF_RESOURCES No enough resource to update memory profile for allocate action.\r
40 @return EFI_NOT_FOUND No matched allocate info found for free action.\r
41\r
42**/\r
43EFI_STATUS\r
44EFIAPI\r
45SmmCoreUpdateProfile (\r
46 IN PHYSICAL_ADDRESS CallerAddress,\r
47 IN MEMORY_PROFILE_ACTION Action,\r
48 IN EFI_MEMORY_TYPE MemoryType, // Valid for AllocatePages/AllocatePool\r
49 IN UINTN Size, // Valid for AllocatePages/FreePages/AllocatePool\r
50 IN VOID *Buffer,\r
51 IN CHAR8 *ActionString OPTIONAL\r
52 );\r
53\r
54#endif\r