GAUGE_DATA_ENTRY_EX *mGaugeDataEx = NULL;\r
UINTN mGaugeNumberOfEntriesEx = 0;\r
\r
+BOOLEAN mNoSmmPerfHandler = FALSE;\r
+BOOLEAN mNoSmmPerfExHandler = FALSE;\r
+\r
//\r
// The cached Performance Protocol and PerformanceEx Protocol interface.\r
//\r
On exit, the key of the next performance log entry.\r
\r
@retval !NULL Get all gauge data success.\r
- @retval NULL Get all guage data failed.\r
+ @retval NULL Get all gauge data failed.\r
**/\r
GAUGE_DATA_ENTRY *\r
EFIAPI\r
UINTN CommSize;\r
UINTN DataSize;\r
\r
+ if (mNoSmmPerfHandler) {\r
+ //\r
+ // Not try to get the SMM gauge data again\r
+ // if no SMM Performance handler found.\r
+ //\r
+ return NULL;\r
+ }\r
+\r
if (LogEntryKey != 0) {\r
if (mGaugeData != NULL) {\r
return mGaugeData;\r
}\r
} else {\r
//\r
- // Reget the SMM guage data at the first entry get.\r
+ // Reget the SMM gauge data at the first entry get.\r
//\r
if (mGaugeData != NULL) {\r
FreePool (mGaugeData);\r
CommSize = SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE;\r
\r
//\r
- // Get totol number of SMM gauge entries\r
+ // Get total number of SMM gauge entries\r
//\r
SmmPerfCommData->Function = SMM_PERF_FUNCTION_GET_GAUGE_ENTRY_NUMBER;\r
Status = mSmmCommunication->Communicate (mSmmCommunication, mSmmPerformanceBuffer, &CommSize);\r
+ if (Status == EFI_NOT_FOUND) {\r
+ mNoSmmPerfHandler = TRUE;\r
+ }\r
if (EFI_ERROR (Status) || EFI_ERROR (SmmPerfCommData->ReturnStatus) || SmmPerfCommData->NumberOfEntries == 0) {\r
return NULL;\r
}\r
On exit, the key of the next performance log entry.\r
\r
@retval !NULL Get all gauge data success.\r
- @retval NULL Get all guage data failed.\r
+ @retval NULL Get all gauge data failed.\r
**/\r
GAUGE_DATA_ENTRY_EX *\r
EFIAPI\r
UINTN CommSize;\r
UINTN DataSize;\r
\r
+ if (mNoSmmPerfExHandler) {\r
+ //\r
+ // Not try to get the SMM gauge data again\r
+ // if no SMM PerformanceEx handler found.\r
+ //\r
+ return NULL;\r
+ }\r
+\r
if (LogEntryKey != 0) {\r
if (mGaugeDataEx != NULL) {\r
return mGaugeDataEx;\r
}\r
} else {\r
//\r
- // Reget the SMM guage data at the first entry get.\r
+ // Reget the SMM gauge data at the first entry get.\r
//\r
if (mGaugeDataEx != NULL) {\r
FreePool (mGaugeDataEx);\r
CommSize = SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE;\r
\r
//\r
- // Get totol number of SMM gauge entries\r
+ // Get total number of SMM gauge entries\r
//\r
SmmPerfCommData->Function = SMM_PERF_FUNCTION_GET_GAUGE_ENTRY_NUMBER;\r
Status = mSmmCommunication->Communicate (mSmmCommunication, mSmmPerformanceBuffer, &CommSize);\r
+ if (Status == EFI_NOT_FOUND) {\r
+ mNoSmmPerfExHandler = TRUE;\r
+ }\r
if (EFI_ERROR (Status) || EFI_ERROR (SmmPerfCommData->ReturnStatus) || SmmPerfCommData->NumberOfEntries == 0) {\r
return NULL;\r
}\r
GaugeData = (GAUGE_DATA_ENTRY_EX *) &mGaugeData[LogEntryKey++];\r
*Identifier = 0;\r
} else {\r
- return 0;\r
+ return GetByPerformanceProtocol (\r
+ LogEntryKey,\r
+ Handle,\r
+ Token,\r
+ Module,\r
+ StartTimeStamp,\r
+ EndTimeStamp,\r
+ Identifier\r
+ );\r
}\r
}\r
\r