Clean up DxeCore to use report status code macros in ReportStatusCode to retire CoreReportProgressCode() & CoreReportProgressCodeSpecific() in Library.c in DxeCore.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5761 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2008-09-01 08:27:31 +00:00
parent 286f0de74c
commit 2680a30801
6 changed files with 25 additions and 109 deletions

View File

@ -492,14 +492,21 @@ CoreDispatcher (
CoreReleaseDispatcherLock ();
CoreReportProgressCodeSpecific (
REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
EFI_PROGRESS_CODE,
FixedPcdGet32(PcdStatusCodeValueDxeDriverBegin),
DriverEntry->ImageHandle
&DriverEntry->ImageHandle,
sizeof (DriverEntry->ImageHandle)
);
Status = CoreStartImage (DriverEntry->ImageHandle, NULL, NULL);
CoreReportProgressCodeSpecific (
REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
EFI_PROGRESS_CODE,
FixedPcdGet32(PcdStatusCodeValueDxeDriverEnd),
DriverEntry->ImageHandle
&DriverEntry->ImageHandle,
sizeof (DriverEntry->ImageHandle)
);
ReturnStatus = EFI_SUCCESS;

View File

@ -78,6 +78,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/MemoryAllocationLib.h>
#include <Library/DevicePathLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/ReportStatusCodeLib.h>
#include "DebugImageInfo.h"
#include "Library.h"

View File

@ -89,6 +89,7 @@
MemoryAllocationLib
UefiBootServicesTableLib
DevicePathLib
ReportStatusCodeLib
[Guids]
gEfiEventLegacyBootGuid # ALWAYS_CONSUMED

View File

@ -303,7 +303,10 @@ DxeMain (
//
// Report Status Code here for DXE_ENTRY_POINT once it is available
//
CoreReportProgressCode (FixedPcdGet32(PcdStatusCodeValueDxeCoreEntry));
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
FixedPcdGet32(PcdStatusCodeValueDxeCoreEntry)
);
//
// Create the aligned system table pointer structure that is used by external
@ -398,7 +401,10 @@ DxeMain (
//
// Report Status code before transfer control to BDS
//
CoreReportProgressCode (FixedPcdGet32 (PcdStatusCodeValueDxeCoreHandoffToBds));
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
FixedPcdGet32 (PcdStatusCodeValueDxeCoreHandoffToBds)
);
//
// Display any drivers that were not dispatched because dependency expression
@ -720,9 +726,10 @@ CoreExitBootServices (
//
// Report that ExitBootServices() has been called
//
// We are using gEfiCallerIdGuid as the caller ID for Dxe Core
//
CoreReportProgressCode (FixedPcdGet32 (PcdStatusCodeValueBootServiceExit));
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
FixedPcdGet32 (PcdStatusCodeValueBootServiceExit)
);
//
// Clear the non-runtime values of the EFI System Table

View File

@ -16,38 +16,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define _DXE_LIBRARY_H_
/**
Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid.
@param Value Describes the class/subclass/operation of the
hardware or software entity that the Status Code
relates to.
**/
VOID
CoreReportProgressCode (
IN EFI_STATUS_CODE_VALUE Value
);
/**
Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid,
with a handle as additional information.
@param Value Describes the class/subclass/operation of the
hardware or software entity that the Status Code
relates to.
@param Handle Additional information.
**/
VOID
CoreReportProgressCodeSpecific (
IN EFI_STATUS_CODE_VALUE Value,
IN EFI_HANDLE Handle
);
/**
Raising to the task priority level of the mutual exclusion
lock, and then acquires ownership of the lock.

View File

@ -14,74 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "DxeMain.h"
UINTN mErrorLevel = DEBUG_ERROR | DEBUG_LOAD;
EFI_DXE_DEVICE_HANDLE_EXTENDED_DATA mStatusCodeData = {
{
sizeof (EFI_STATUS_CODE_DATA),
0,
EFI_STATUS_CODE_DXE_CORE_GUID
},
NULL
};
/**
Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid,
with a handle as additional information.
@param Value Describes the class/subclass/operation of the
hardware or software entity that the Status Code
relates to.
@param Handle Additional information.
**/
VOID
CoreReportProgressCodeSpecific (
IN EFI_STATUS_CODE_VALUE Value,
IN EFI_HANDLE Handle
)
{
mStatusCodeData.DataHeader.Size = sizeof (EFI_DXE_DEVICE_HANDLE_EXTENDED_DATA) - sizeof (EFI_STATUS_CODE_DATA);
mStatusCodeData.Handle = Handle;
if ((gStatusCode != NULL) && (gStatusCode->ReportStatusCode != NULL) ) {
gStatusCode->ReportStatusCode (
EFI_PROGRESS_CODE,
Value,
0,
&gEfiCallerIdGuid,
(EFI_STATUS_CODE_DATA *) &mStatusCodeData
);
}
}
/**
Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid.
@param Value Describes the class/subclass/operation of the
hardware or software entity that the Status Code
relates to.
**/
VOID
CoreReportProgressCode (
IN EFI_STATUS_CODE_VALUE Value
)
{
if ((gStatusCode != NULL) && (gStatusCode->ReportStatusCode != NULL) ) {
gStatusCode->ReportStatusCode (
EFI_PROGRESS_CODE,
Value,
0,
&gEfiCallerIdGuid,
NULL
);
}
}
//
// Lock Stuff
//