mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 23:24:03 +02:00
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:
parent
286f0de74c
commit
2680a30801
@ -492,14 +492,21 @@ CoreDispatcher (
|
|||||||
|
|
||||||
CoreReleaseDispatcherLock ();
|
CoreReleaseDispatcherLock ();
|
||||||
|
|
||||||
CoreReportProgressCodeSpecific (
|
|
||||||
|
REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
|
||||||
|
EFI_PROGRESS_CODE,
|
||||||
FixedPcdGet32(PcdStatusCodeValueDxeDriverBegin),
|
FixedPcdGet32(PcdStatusCodeValueDxeDriverBegin),
|
||||||
DriverEntry->ImageHandle
|
&DriverEntry->ImageHandle,
|
||||||
|
sizeof (DriverEntry->ImageHandle)
|
||||||
);
|
);
|
||||||
|
|
||||||
Status = CoreStartImage (DriverEntry->ImageHandle, NULL, NULL);
|
Status = CoreStartImage (DriverEntry->ImageHandle, NULL, NULL);
|
||||||
CoreReportProgressCodeSpecific (
|
|
||||||
|
REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
|
||||||
|
EFI_PROGRESS_CODE,
|
||||||
FixedPcdGet32(PcdStatusCodeValueDxeDriverEnd),
|
FixedPcdGet32(PcdStatusCodeValueDxeDriverEnd),
|
||||||
DriverEntry->ImageHandle
|
&DriverEntry->ImageHandle,
|
||||||
|
sizeof (DriverEntry->ImageHandle)
|
||||||
);
|
);
|
||||||
|
|
||||||
ReturnStatus = EFI_SUCCESS;
|
ReturnStatus = EFI_SUCCESS;
|
||||||
|
@ -78,6 +78,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/DevicePathLib.h>
|
#include <Library/DevicePathLib.h>
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
#include <Library/ReportStatusCodeLib.h>
|
||||||
|
|
||||||
#include "DebugImageInfo.h"
|
#include "DebugImageInfo.h"
|
||||||
#include "Library.h"
|
#include "Library.h"
|
||||||
|
@ -89,6 +89,7 @@
|
|||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
DevicePathLib
|
DevicePathLib
|
||||||
|
ReportStatusCodeLib
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiEventLegacyBootGuid # ALWAYS_CONSUMED
|
gEfiEventLegacyBootGuid # ALWAYS_CONSUMED
|
||||||
|
@ -303,7 +303,10 @@ DxeMain (
|
|||||||
//
|
//
|
||||||
// Report Status Code here for DXE_ENTRY_POINT once it is available
|
// 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
|
// 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
|
// 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
|
// Display any drivers that were not dispatched because dependency expression
|
||||||
@ -720,9 +726,10 @@ CoreExitBootServices (
|
|||||||
//
|
//
|
||||||
// Report that ExitBootServices() has been called
|
// Report that ExitBootServices() has been called
|
||||||
//
|
//
|
||||||
// We are using gEfiCallerIdGuid as the caller ID for Dxe Core
|
REPORT_STATUS_CODE (
|
||||||
//
|
EFI_PROGRESS_CODE,
|
||||||
CoreReportProgressCode (FixedPcdGet32 (PcdStatusCodeValueBootServiceExit));
|
FixedPcdGet32 (PcdStatusCodeValueBootServiceExit)
|
||||||
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Clear the non-runtime values of the EFI System Table
|
// Clear the non-runtime values of the EFI System Table
|
||||||
|
@ -16,38 +16,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#define _DXE_LIBRARY_H_
|
#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
|
Raising to the task priority level of the mutual exclusion
|
||||||
lock, and then acquires ownership of the lock.
|
lock, and then acquires ownership of the lock.
|
||||||
|
@ -14,74 +14,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
#include "DxeMain.h"
|
#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
|
// Lock Stuff
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user