diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-06-29 09:29:39 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-06-29 09:29:39 +0000 |
commit | 445b3570b87e0ebb1428795568ff8f5872f9d81d (patch) | |
tree | df585d496f2076ed779cfde21adc05eb5b6c5f55 /IntelFrameworkModulePkg/Universal | |
parent | 7df41b11500a6513d8627c0991a7f13c15b259b7 (diff) | |
download | edk2-platforms-445b3570b87e0ebb1428795568ff8f5872f9d81d.tar.xz |
roll back last check-in.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10613 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal')
3 files changed, 13 insertions, 19 deletions
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c index 34ccc79528..e767e6b147 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c +++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c @@ -104,10 +104,11 @@ MemoryStatusCodeReportWorker ( PacketIndex = 0;
//
- // Journal GUID'ed HOBs to find empty record entry.
+ // Journal GUID'ed HOBs to find empty record entry. if found, then save status code in it.
+ // otherwise, create a new GUID'ed HOB.
//
Hob.Raw = GetFirstGuidHob (&gMemoryStatusCodeRecordGuid);
- while ((Hob.Raw = GetNextGuidHob (&gMemoryStatusCodeRecordGuid, Hob.Raw)) != NULL) {
+ while (Hob.Raw != NULL) {
PacketHeader = (MEMORY_STATUSCODE_PACKET_HEADER *) GET_GUID_HOB_DATA (Hob.Guid);
//
@@ -123,14 +124,17 @@ MemoryStatusCodeReportWorker ( //
PacketIndex++;
- Hob.Raw = GET_NEXT_HOB (Hob);
+ Hob.Raw = GetNextGuidHob (&gMemoryStatusCodeRecordGuid, Hob.Raw);
}
if (Record == NULL) {
//
- // No available entry found
+ // No available entry found, so create new packet.
//
- return EFI_OUT_OF_RESOURCES;
+ PacketHeader = CreateMemoryStatusCodePacket (PacketIndex);
+
+ Record = (MEMORY_STATUSCODE_RECORD *) (PacketHeader + 1);
+ Record = &Record[PacketHeader->RecordIndex++];
}
Record->CodeType = CodeType;
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c index 92ca20a2ed..5c1616e14b 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 = NULL;
+EFI_DATA_HUB_PROTOCOL *mDataHubProtocol;
/**
@@ -189,7 +189,6 @@ DataHubStatusCodeReportWorker ( BASE_LIST Marker;
CHAR8 *Format;
UINTN CharCount;
- EFI_STATUS Status;
//
// Use atom operation to avoid the reentant of report.
@@ -206,13 +205,6 @@ DataHubStatusCodeReportWorker ( return EFI_DEVICE_ERROR;
}
- if (mDataHubProtocol == NULL) {
- Status = DataHubStatusCodeInitializeWorker ();
- if (EFI_ERROR (Status)) {
- return Status;
- }
- }
-
Record = AcquireRecordBuffer ();
if (Record == NULL) {
//
@@ -366,10 +358,7 @@ DataHubStatusCodeInitializeWorker ( NULL,
(VOID **) &mDataHubProtocol
);
- if (EFI_ERROR (Status)) {
- mDataHubProtocol = NULL;
- return Status;
- }
+ ASSERT_EFI_ERROR (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 8807bbac4e..cb2c271124 100644 --- a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.c +++ b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.c @@ -226,7 +226,8 @@ InitializationDispatcherWorker ( ASSERT_EFI_ERROR (Status);
}
if (FeaturePcdGet (PcdStatusCodeUseDataHub)) {
- DataHubStatusCodeInitializeWorker ();
+ Status = DataHubStatusCodeInitializeWorker ();
+ ASSERT_EFI_ERROR (Status);
}
if (FeaturePcdGet (PcdStatusCodeUseOEM)) {
//
|