Commit | Line | Data |
---|---|---|
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 | 7 | Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9d510e61 | 8 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
cdad7675 SZ |
9 | \r |
10 | **/\r | |
11 | \r | |
12 | #ifndef _PI_SMM_CORE_MEMORY_PROFILE_SERVICES_H_\r | |
13 | #define _PI_SMM_CORE_MEMORY_PROFILE_SERVICES_H_\r | |
14 | \r | |
15 | /**\r | |
16 | Update SMRAM profile information.\r | |
17 | \r | |
18 | @param CallerAddress Address of caller who call Allocate or Free.\r | |
19 | @param Action This Allocate or Free action.\r | |
20 | @param MemoryType Memory type.\r | |
21 | EfiMaxMemoryType means the MemoryType is unknown.\r | |
22 | @param Size Buffer size.\r | |
23 | @param Buffer Buffer address.\r | |
24 | @param 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 | |
37 | EFI_STATUS\r | |
38 | EFIAPI\r | |
39 | SmmCoreUpdateProfile (\r | |
40 | IN PHYSICAL_ADDRESS CallerAddress,\r | |
41 | IN MEMORY_PROFILE_ACTION Action,\r | |
42 | IN EFI_MEMORY_TYPE MemoryType, // Valid for AllocatePages/AllocatePool\r | |
43 | IN UINTN Size, // Valid for AllocatePages/FreePages/AllocatePool\r | |
44 | IN VOID *Buffer,\r | |
45 | IN CHAR8 *ActionString OPTIONAL\r | |
46 | );\r | |
47 | \r | |
48 | #endif\r |