From 6f2b45bb6708eb7c06746e1670ccb6520b7bcb5b Mon Sep 17 00:00:00 2001 From: yshang1 Date: Fri, 13 Jul 2007 06:15:56 +0000 Subject: Remove CommonHeader.h in StatusCodeDxe. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3230 6f19259b-4bc3-4df7-8a09-765794883524 --- .../StatusCode/Dxe/DataHubStatusCodeWorker.c | 38 ++++++++++++---------- .../Universal/StatusCode/Dxe/DxeStatusCode.h | 14 ++++---- .../Universal/StatusCode/Dxe/DxeStatusCode.msa | 2 +- 3 files changed, 28 insertions(+), 26 deletions(-) (limited to 'EdkModulePkg') diff --git a/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c b/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c index 72d699d..737bc8a 100644 --- a/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c +++ b/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c @@ -13,6 +13,8 @@ Module Name: DataHubStatusCodeWorker.c **/ + +#include #include "DxeStatusCode.h" // @@ -41,7 +43,7 @@ EFI_DATA_HUB_PROTOCOL *mDataHubProtocol; **/ STATIC -DATAHUB_STATUSCODE_RECORD * +DATA_HUB_STATUS_CODE_DATA_RECORD * AcquireRecordBuffer ( VOID ) @@ -81,7 +83,7 @@ AcquireRecordBuffer ( gBS->RestoreTPL (CurrentTpl); - return Record; + return (DATA_HUB_STATUS_CODE_DATA_RECORD *) (Record->Data); } @@ -94,14 +96,15 @@ AcquireRecordBuffer ( **/ STATIC -DATAHUB_STATUSCODE_RECORD * +DATA_HUB_STATUS_CODE_DATA_RECORD * RetrieveRecord ( VOID ) { - DATAHUB_STATUSCODE_RECORD *Record = NULL; - LIST_ENTRY *Node; - EFI_TPL CurrentTpl; + DATA_HUB_STATUS_CODE_DATA_RECORD *RecordData = NULL; + DATAHUB_STATUSCODE_RECORD *Record; + LIST_ENTRY *Node; + EFI_TPL CurrentTpl; CurrentTpl = gBS->RaiseTPL (TPL_HIGH_LEVEL); @@ -112,11 +115,12 @@ RetrieveRecord ( RemoveEntryList (&Record->Node); InsertTailList (&mRecordsBuffer, &Record->Node); Record->Signature = 0; + RecordData = (DATA_HUB_STATUS_CODE_DATA_RECORD *) Record->Data; } gBS->RestoreTPL (CurrentTpl); - return Record; + return RecordData; } @@ -159,11 +163,11 @@ DataHubStatusCodeReportWorker ( IN EFI_STATUS_CODE_DATA *Data OPTIONAL ) { - DATAHUB_STATUSCODE_RECORD *Record; - UINT32 ErrorLevel; - VA_LIST Marker; - CHAR8 *Format; - UINTN CharCount; + DATA_HUB_STATUS_CODE_DATA_RECORD *Record; + UINT32 ErrorLevel; + VA_LIST Marker; + CHAR8 *Format; + UINTN CharCount; // // See whether in runtime phase or not. @@ -193,7 +197,7 @@ DataHubStatusCodeReportWorker ( if (Data != NULL) { if (ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) { CharCount = UnicodeVSPrintAsciiFormat ( - (CHAR16 *) Record->ExtendData, + (CHAR16 *) (Record + 1), EFI_STATUS_CODE_DATA_MAX_SIZE, Format, Marker @@ -201,7 +205,7 @@ DataHubStatusCodeReportWorker ( // // Change record data type from DebugType to String Type. // - CopyGuid (&Record->Data.Type, &gEfiStatusCodeDataTypeStringGuid); + CopyGuid (&Record->Data.Type, &gEfiStatusCodeDataTypeDebugGuid); Record->Data.HeaderSize = Data->HeaderSize; Record->Data.Size = (UINT16) ((CharCount + 1) * sizeof (CHAR16)); } else { @@ -213,7 +217,7 @@ DataHubStatusCodeReportWorker ( if (Data->Size > EFI_STATUS_CODE_DATA_MAX_SIZE) { Record->Data.Size = EFI_STATUS_CODE_DATA_MAX_SIZE; } - CopyMem (Record->ExtendData, Data + 1, Record->Data.Size); + CopyMem ((VOID *) (Record + 1), Data + 1, Record->Data.Size); } } @@ -239,7 +243,7 @@ LogDataHubEventCallBack ( IN VOID *Context ) { - DATAHUB_STATUSCODE_RECORD *Record; + DATA_HUB_STATUS_CODE_DATA_RECORD *Record; UINT32 Size; UINT64 DataRecordClass; @@ -255,7 +259,7 @@ LogDataHubEventCallBack ( // // Add in the size of the header we added. // - Size = sizeof (DATAHUB_STATUSCODE_RECORD) + (UINT32) Record->Data.Size; + Size = sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD) + (UINT32) Record->Data.Size; if ((Record->CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) { DataRecordClass = EFI_DATA_RECORD_CLASS_PROGRESS_CODE; diff --git a/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h b/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h index e03dc37..5f8cee0 100644 --- a/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h +++ b/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h @@ -22,6 +22,8 @@ Abstract: #ifndef __DXE_STATUS_CODE_H__ #define __DXE_STATUS_CODE_H__ +#include + // // Data hub worker definition // @@ -41,14 +43,10 @@ typedef enum { } PROCESSOR_MODE; typedef struct { - UINTN Signature; - LIST_ENTRY Node; - EFI_STATUS_CODE_TYPE CodeType; - EFI_STATUS_CODE_VALUE Value; - UINT32 Instance; - EFI_GUID CallerId; - EFI_STATUS_CODE_DATA Data; - UINT8 ExtendData[EFI_STATUS_CODE_DATA_MAX_SIZE]; + UINTN Signature; + LIST_ENTRY Node; + + UINT8 Data[sizeof (DATA_HUB_STATUS_CODE_DATA_RECORD) + EFI_STATUS_CODE_DATA_MAX_SIZE]; } DATAHUB_STATUSCODE_RECORD; diff --git a/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.msa b/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.msa index d8c16cb..915dfb5 100644 --- a/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.msa +++ b/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.msa @@ -108,7 +108,7 @@ gMemoryStatusCodeRecordGuid - gEfiStatusCodeDataTypeStringGuid + gEfiStatusCodeDataTypeDebugGuid gEfiStatusCodeSpecificDataGuid -- cgit v1.1