2 Contains function prototypes for Memory Profile Services in the SMM Core.
4 This header file borrows the PiSmmCore Memory Profile services as the primitive
7 Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #ifndef _PI_SMM_CORE_MEMORY_PROFILE_SERVICES_H_
13 #define _PI_SMM_CORE_MEMORY_PROFILE_SERVICES_H_
16 Update SMRAM profile information.
18 @param CallerAddress Address of caller who call Allocate or Free.
19 @param Action This Allocate or Free action.
20 @param MemoryType Memory type.
21 EfiMaxMemoryType means the MemoryType is unknown.
22 @param Size Buffer size.
23 @param Buffer Buffer address.
24 @param ActionString String for memory profile action.
25 Only needed for user defined allocate action.
27 @return EFI_SUCCESS Memory profile is updated.
28 @return EFI_UNSUPPORTED Memory profile is unsupported,
29 or memory profile for the image is not required,
30 or memory profile for the memory type is not required.
31 @return EFI_ACCESS_DENIED It is during memory profile data getting.
32 @return EFI_ABORTED Memory profile recording is not enabled.
33 @return EFI_OUT_OF_RESOURCES No enough resource to update memory profile for allocate action.
34 @return EFI_NOT_FOUND No matched allocate info found for free action.
39 SmmCoreUpdateProfile (
40 IN PHYSICAL_ADDRESS CallerAddress
,
41 IN MEMORY_PROFILE_ACTION Action
,
42 IN EFI_MEMORY_TYPE MemoryType
, // Valid for AllocatePages/AllocatePool
43 IN UINTN Size
, // Valid for AllocatePages/FreePages/AllocatePool
45 IN CHAR8
*ActionString OPTIONAL