This commit is contained in:
vanjeff
2010-06-29 09:14:31 +00:00
parent 6b22483ffb
commit 7df41b1150
3 changed files with 19 additions and 13 deletions

View File

@ -24,7 +24,7 @@ EFI_EVENT mLogDataHubEvent;
//
// Cache data hub protocol.
//
EFI_DATA_HUB_PROTOCOL *mDataHubProtocol;
EFI_DATA_HUB_PROTOCOL *mDataHubProtocol = NULL;
/**
@ -189,6 +189,7 @@ DataHubStatusCodeReportWorker (
BASE_LIST Marker;
CHAR8 *Format;
UINTN CharCount;
EFI_STATUS Status;
//
// Use atom operation to avoid the reentant of report.
@ -205,6 +206,13 @@ DataHubStatusCodeReportWorker (
return EFI_DEVICE_ERROR;
}
if (mDataHubProtocol == NULL) {
Status = DataHubStatusCodeInitializeWorker ();
if (EFI_ERROR (Status)) {
return Status;
}
}
Record = AcquireRecordBuffer ();
if (Record == NULL) {
//
@ -358,7 +366,10 @@ DataHubStatusCodeInitializeWorker (
NULL,
(VOID **) &mDataHubProtocol
);
ASSERT_EFI_ERROR (Status);
if (EFI_ERROR (Status)) {
mDataHubProtocol = NULL;
return Status;
}
//
// Create a Notify Event to log data in Data Hub