]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLibInternal.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Library / SmmCorePerformanceLib / SmmCorePerformanceLibInternal.h
1 /** @file
2 Master header files for SmmCorePerformanceLib instance.
3
4 This header file holds the prototypes of the SMM Performance and PerformanceEx Protocol published by this
5 library instance at its constructor.
6
7 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10 **/
11
12 #ifndef _SMM_CORE_PERFORMANCE_LIB_INTERNAL_H_
13 #define _SMM_CORE_PERFORMANCE_LIB_INTERNAL_H_
14
15
16 #include <Guid/Performance.h>
17 #include <Guid/PerformanceMeasurement.h>
18 #include <Guid/ExtendedFirmwarePerformance.h>
19 #include <Guid/FirmwarePerformance.h>
20 #include <Guid/ZeroGuid.h>
21 #include <Guid/EventGroup.h>
22
23 #include <Library/SmmServicesTableLib.h>
24 #include <Library/DebugLib.h>
25 #include <Library/PerformanceLib.h>
26 #include <Library/BaseLib.h>
27 #include <Library/BaseMemoryLib.h>
28 #include <Library/TimerLib.h>
29 #include <Library/PcdLib.h>
30 #include <Library/UefiLib.h>
31 #include <Library/UefiBootServicesTableLib.h>
32 #include <Library/MemoryAllocationLib.h>
33 #include <Library/SynchronizationLib.h>
34 #include <Library/SmmMemLib.h>
35 #include <Library/ReportStatusCodeLib.h>
36 #include <Library/DxeServicesLib.h>
37 #include <Library/PeCoffGetEntryPointLib.h>
38
39 #include <Protocol/SmmBase2.h>
40 #include <Protocol/LoadedImage.h>
41 #include <Protocol/DevicePathToText.h>
42
43 //
44 // Interface declarations for SMM PerformanceMeasurement Protocol.
45 //
46 /**
47 Create performance record with event description and a timestamp.
48
49 @param CallerIdentifier - Image handle or pointer to caller ID GUID.
50 @param Guid - Pointer to a GUID.
51 @param String - Pointer to a string describing the measurement.
52 @param TimeStamp - 64-bit time stamp.
53 @param Address - Pointer to a location in memory relevant to the measurement.
54 @param Identifier - Performance identifier describing the type of measurement.
55 @param Attribute - The attribute of the measurement. According to attribute can create a start
56 record for PERF_START/PERF_START_EX, or a end record for PERF_END/PERF_END_EX,
57 or a general record for other Perf macros.
58
59 @retval EFI_SUCCESS - Successfully created performance record.
60 @retval EFI_OUT_OF_RESOURCES - Ran out of space to store the records.
61 @retval EFI_INVALID_PARAMETER - Invalid parameter passed to function - NULL
62 pointer or invalid PerfId.
63 **/
64 EFI_STATUS
65 EFIAPI
66 CreatePerformanceMeasurement(
67 IN CONST VOID *CallerIdentifier, OPTIONAL
68 IN CONST VOID *Guid, OPTIONAL
69 IN CONST CHAR8 *String, OPTIONAL
70 IN UINT64 TimeStamp, OPTIONAL
71 IN UINT64 Address, OPTIONAL
72 IN UINT32 Identifier,
73 IN PERF_MEASUREMENT_ATTRIBUTE Attribute
74 );
75
76 #endif