25BOOLEAN mPerformanceMeasurementEnabled;
26VOID *mPerformanceLibExitBootServicesRegistration;
52 mPerformanceMeasurementEnabled =
FALSE;
77 Status =
gSmst->SmmRegisterProtocolNotify (
78 &gEdkiiSmmExitBootServicesProtocolGuid,
80 &mPerformanceLibExitBootServicesRegistration
107 Status =
gSmst->SmmRegisterProtocolNotify (
108 &gEdkiiSmmExitBootServicesProtocolGuid,
110 &mPerformanceLibExitBootServicesRegistration
134 if (mPerformanceMeasurement !=
NULL) {
138 Status =
gSmst->SmmLocateProtocol (&gEdkiiSmmPerformanceMeasurementProtocolGuid,
NULL, (VOID **)&PerformanceMeasurement);
139 if (!EFI_ERROR (Status)) {
140 ASSERT (PerformanceMeasurement !=
NULL);
144 mPerformanceMeasurement = PerformanceMeasurement;
148 return EFI_NOT_FOUND;
176 IN CONST VOID *Handle OPTIONAL,
177 IN CONST CHAR8 *Token OPTIONAL,
178 IN CONST CHAR8 *Module OPTIONAL,
187 if (EFI_ERROR (Status)) {
193 }
else if (Module !=
NULL) {
199 if (mPerformanceMeasurement !=
NULL) {
200 Status = mPerformanceMeasurement->CreatePerformanceMeasurement (Handle,
NULL, String, TimeStamp, 0, Identifier, PerfStartEntry);
205 return (RETURN_STATUS)Status;
235 IN CONST VOID *Handle OPTIONAL,
236 IN CONST CHAR8 *Token OPTIONAL,
237 IN CONST CHAR8 *Module OPTIONAL,
246 if (EFI_ERROR (Status)) {
252 }
else if (Module !=
NULL) {
258 if (mPerformanceMeasurement !=
NULL) {
259 Status = mPerformanceMeasurement->CreatePerformanceMeasurement (Handle,
NULL, String, TimeStamp, 0, Identifier, PerfEndEntry);
264 return (RETURN_STATUS)Status;
315 OUT UINT64 *StartTimeStamp,
316 OUT UINT64 *EndTimeStamp,
317 OUT UINT32 *Identifier
346 IN CONST VOID *Handle OPTIONAL,
347 IN CONST CHAR8 *Token OPTIONAL,
348 IN CONST CHAR8 *Module OPTIONAL,
380 IN CONST VOID *Handle OPTIONAL,
381 IN CONST CHAR8 *Token OPTIONAL,
382 IN CONST CHAR8 *Module OPTIONAL,
435 OUT UINT64 *StartTimeStamp,
436 OUT UINT64 *EndTimeStamp
460 return mPerformanceMeasurementEnabled;
481 IN CONST VOID *CallerIdentifier,
483 IN CONST CHAR8 *String OPTIONAL,
484 IN UINT64 Address OPTIONAL,
491 if (EFI_ERROR (Status)) {
495 if (mPerformanceMeasurement !=
NULL) {
496 Status = mPerformanceMeasurement->CreatePerformanceMeasurement (CallerIdentifier, Guid, String, 0, Address, Identifier, PerfEntry);
501 return (RETURN_STATUS)Status;
#define RETURN_OUT_OF_RESOURCES
#define ASSERT_EFI_ERROR(StatusParameter)
#define PcdGet8(TokenName)
EFI_SMM_SYSTEM_TABLE2 * gSmst