diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-01 08:27:31 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-01 08:27:31 +0000 |
commit | 2680a308013ecbad9a68599286ee05ddb7afa471 (patch) | |
tree | 36c20bc51c4d4d5feb90c9b632ffbb3bcd3e440b /MdeModulePkg | |
parent | 286f0de74c81e209b2cef628c06202ec722cf82f (diff) | |
download | edk2-platforms-2680a308013ecbad9a68599286ee05ddb7afa471.tar.xz |
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 15 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/DxeMain.h | 1 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/DxeMain.inf | 1 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 17 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/Library.h | 32 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/Library/Library.c | 68 |
6 files changed, 25 insertions, 109 deletions
diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c index ba8734e1d6..0936fad997 100644 --- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c @@ -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;
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h index 64c0f9709f..a227ce5f8e 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.h +++ b/MdeModulePkg/Core/Dxe/DxeMain.h @@ -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"
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf index a6c8d5e3de..8a99582d30 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.inf +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf @@ -89,6 +89,7 @@ MemoryAllocationLib
UefiBootServicesTableLib
DevicePathLib
+ ReportStatusCodeLib
[Guids]
gEfiEventLegacyBootGuid # ALWAYS_CONSUMED
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index acc675844a..1d04e38490 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -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
diff --git a/MdeModulePkg/Core/Dxe/Library.h b/MdeModulePkg/Core/Dxe/Library.h index 6e6ad3818b..c68e62d81a 100644 --- a/MdeModulePkg/Core/Dxe/Library.h +++ b/MdeModulePkg/Core/Dxe/Library.h @@ -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.
diff --git a/MdeModulePkg/Core/Dxe/Library/Library.c b/MdeModulePkg/Core/Dxe/Library/Library.c index 911fbb70b8..5ba89fdc21 100644 --- a/MdeModulePkg/Core/Dxe/Library/Library.c +++ b/MdeModulePkg/Core/Dxe/Library/Library.c @@ -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
//
|