]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
Move global variable to the top of C file for consistent coding style.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / DxeMain / DxeMain.c
index acc675844a89d3bc41f8d3c236e14752d031f1d9..5916013a5c2fb63665575ccec1ecafa208916ef0 100644 (file)
@@ -35,19 +35,9 @@ EFI_WATCHDOG_TIMER_ARCH_PROTOCOL  *gWatchdogTimer = NULL;
 EFI_GUID                           *gDxeCoreFileName;\r
 EFI_LOADED_IMAGE_PROTOCOL          *gDxeCoreLoadedImage;\r
 \r
-//\r
-// BugBug: I'n not runtime, but is the PPI?\r
-//\r
-EFI_STATUS_CODE_PROTOCOL     gStatusCodeInstance = {\r
-  NULL\r
-};\r
-\r
-EFI_STATUS_CODE_PROTOCOL     *gStatusCode    = &gStatusCodeInstance;\r
-\r
 //\r
 // DXE Core Module Variables\r
 //\r
-\r
 EFI_BOOT_SERVICES mBootServices = {\r
   {\r
     EFI_BOOT_SERVICES_SIGNATURE,                                                          // Signature\r
@@ -295,15 +285,13 @@ DxeMain (
   Status = CoreInstallConfigurationTable (&gEfiMemoryTypeInformationGuid, &gMemoryTypeInformation);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  //\r
-  // Initialize the ReportStatusCode with PEI version, if available\r
-  //\r
-  CoreGetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **) &gStatusCode->ReportStatusCode);\r
-\r
   //\r
   // Report Status Code here for DXE_ENTRY_POINT once it is available\r
   //\r
-  CoreReportProgressCode (FixedPcdGet32(PcdStatusCodeValueDxeCoreEntry));\r
+  REPORT_STATUS_CODE (\r
+    EFI_PROGRESS_CODE,\r
+    FixedPcdGet32(PcdStatusCodeValueDxeCoreEntry)\r
+    );\r
 \r
   //\r
   // Create the aligned system table pointer structure that is used by external\r
@@ -398,7 +386,10 @@ DxeMain (
   //\r
   // Report Status code before transfer control to BDS\r
   //\r
-  CoreReportProgressCode (FixedPcdGet32 (PcdStatusCodeValueDxeCoreHandoffToBds));\r
+  REPORT_STATUS_CODE (\r
+    EFI_PROGRESS_CODE,\r
+    FixedPcdGet32 (PcdStatusCodeValueDxeCoreHandoffToBds)\r
+    );\r
 \r
   //\r
   // Display any drivers that were not dispatched because dependency expression\r
@@ -586,42 +577,6 @@ CoreEfiNotAvailableYetArg5 (
 }\r
 \r
 \r
-\r
-/**\r
-  Searches for a Protocol Interface passed from PEI through a HOB.\r
-\r
-  @param  ProtocolGuid           The Protocol GUID to search for in the HOB List\r
-  @param  Interface              A pointer to the interface for the Protocol GUID\r
-\r
-  @retval EFI_SUCCESS            The Protocol GUID was found and its interface is\r
-                                 returned in Interface\r
-  @retval EFI_NOT_FOUND          The Protocol GUID was not found in the HOB List\r
-\r
-**/\r
-EFI_STATUS\r
-CoreGetPeiProtocol (\r
-  IN EFI_GUID  *ProtocolGuid,\r
-  IN VOID      **Interface\r
-  )\r
-{\r
-  EFI_HOB_GUID_TYPE   *GuidHob;\r
-  VOID                *Buffer;\r
-\r
-  GuidHob = GetFirstGuidHob (ProtocolGuid);\r
-  if (GuidHob == NULL) {\r
-    return EFI_NOT_FOUND;\r
-  }\r
-\r
-  Buffer = GET_GUID_HOB_DATA (GuidHob);\r
-  ASSERT (Buffer != NULL);\r
-\r
-  *Interface = (VOID *)(*(UINTN *)(Buffer));\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-\r
 /**\r
   Calcualte the 32-bit CRC in a EFI table using the service provided by the\r
   gRuntime service.\r
@@ -648,8 +603,6 @@ CalculateEfiHdrCrc (
 }\r
 \r
 \r
-\r
-\r
 /**\r
   Terminates all boot services.\r
 \r
@@ -720,9 +673,10 @@ CoreExitBootServices (
   //\r
   // Report that ExitBootServices() has been called\r
   //\r
-  // We are using gEfiCallerIdGuid as the caller ID for Dxe Core\r
-  //\r
-  CoreReportProgressCode (FixedPcdGet32 (PcdStatusCodeValueBootServiceExit));\r
+  REPORT_STATUS_CODE (\r
+    EFI_PROGRESS_CODE,\r
+    FixedPcdGet32 (PcdStatusCodeValueBootServiceExit)\r
+    );\r
 \r
   //\r
   // Clear the non-runtime values of the EFI System Table\r