diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-06-29 09:14:31 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-06-29 09:14:31 +0000 |
commit | 7df41b11500a6513d8627c0991a7f13c15b259b7 (patch) | |
tree | 7b4a50af69943c8f940b92d65e6f8e70fcf2531b /IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe | |
parent | 6b22483ffb95077f580f04588ba9a58546565767 (diff) | |
download | edk2-platforms-7df41b11500a6513d8627c0991a7f13c15b259b7.tar.xz |
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10612 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe')
-rw-r--r-- | IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c | 15 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.c | 3 |
2 files changed, 14 insertions, 4 deletions
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c index 5c1616e14b..92ca20a2ed 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c +++ b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c @@ -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
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.c b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.c index cb2c271124..8807bbac4e 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.c +++ b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.c @@ -226,8 +226,7 @@ InitializationDispatcherWorker ( ASSERT_EFI_ERROR (Status);
}
if (FeaturePcdGet (PcdStatusCodeUseDataHub)) {
- Status = DataHubStatusCodeInitializeWorker ();
- ASSERT_EFI_ERROR (Status);
+ DataHubStatusCodeInitializeWorker ();
}
if (FeaturePcdGet (PcdStatusCodeUseOEM)) {
//
|