]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Core/DxeIplPeim/DxeLoad.c
Make EDK Module Package pass Intel IPF compiler with /Ox switch.
[mirror_edk2.git] / EdkModulePkg / Core / DxeIplPeim / DxeLoad.c
index 6a4c53b9223e53963682d8d1454436ebcf483696..4d9ec5218a1de05c6a443ca89329850ed771fed5 100644 (file)
@@ -241,14 +241,6 @@ Returns:
              );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  //\r
-  // Transfer control to the DXE Core\r
-  // The handoff state is simply a pointer to the HOB list\r
-  //\r
-\r
-  Status = PeiServicesInstallPpi (&mPpiSignal);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
   //\r
   // Add HOB for the DXE Core\r
   //\r
@@ -309,8 +301,13 @@ Returns:
       );\r
   }\r
 \r
+  //\r
+  // Transfer control to the DXE Core\r
+  // The handoff state is simply a pointer to the HOB list\r
+  //\r
+\r
   DEBUG ((EFI_D_INFO, "DXE Core Entry Point 0x%08x\n", (UINTN) DxeCoreEntryPoint));\r
-  HandOffToDxeCore (DxeCoreEntryPoint, HobList);\r
+  HandOffToDxeCore (DxeCoreEntryPoint, HobList, &mPpiSignal);\r
   //\r
   // If we get here, then the DXE Core returned.  This is an error\r
   // Dxe Core should not return.\r
@@ -358,14 +355,12 @@ Returns:
 {\r
   EFI_FIRMWARE_VOLUME_HEADER  *FwVolHeader;\r
   EFI_FFS_FILE_HEADER         *FfsFileHeader;\r
-  VOID                        *SectionData;\r
   EFI_STATUS                  Status;\r
   EFI_PEI_HOB_POINTERS        Hob;\r
 \r
 \r
   FwVolHeader   = NULL;\r
   FfsFileHeader = NULL;\r
-  SectionData   = NULL;\r
   Status        = EFI_SUCCESS;\r
 \r
   //\r
@@ -657,7 +652,6 @@ Returns:
   UINTN                           SectionLength;\r
   UINTN                           OccupiedSectionLength;\r
   UINT64                          FileSize;\r
-  EFI_GUID_DEFINED_SECTION        *GuidedSectionHeader;\r
   UINT32                          AuthenticationStatus;\r
   EFI_PEI_SECTION_EXTRACTION_PPI  *SectionExtract;\r
   UINT32                          BufferSize;\r
@@ -700,10 +694,6 @@ Returns:
       // Was the DXE Core file encapsulated in a GUID'd section?\r
       //\r
       if (Section->Type == EFI_SECTION_GUID_DEFINED) {\r
-        //\r
-        // Locate the GUID'd Section Extractor\r
-        //\r
-        GuidedSectionHeader = (VOID *) (Section + 1);\r
 \r
         //\r
         // This following code constitutes the addition of the security model\r
@@ -851,6 +841,7 @@ Returns:
             //\r
             // GetInfo failed\r
             //\r
+            DEBUG ((EFI_D_ERROR, "Decompress GetInfo Failed - %r\n", Status));\r
             return EFI_NOT_FOUND;\r
           }\r
   \r
@@ -878,6 +869,13 @@ Returns:
                       DstBuffer,\r
                       ScratchBuffer\r
                       );\r
+          if (EFI_ERROR (Status)) {\r
+            //\r
+            // Decompress failed\r
+            //\r
+            DEBUG ((EFI_D_ERROR, "Decompress Failed - %r\n", Status));\r
+            return EFI_NOT_FOUND;\r
+          }\r
         }\r
         \r
         CmpSection = (EFI_COMMON_SECTION_HEADER *) DstBuffer;\r