]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Core/DxeIplPeim/DxeLoad.c
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1436 6f19259b...
[mirror_edk2.git] / EdkModulePkg / Core / DxeIplPeim / DxeLoad.c
index 44923764627e75cf4867a7c43cbe096d790acae7..8e1aeedac261b4ae56bb736e9ebffaa817cb4c9c 100644 (file)
@@ -130,7 +130,7 @@ Returns:
              NULL\r
              );\r
 \r
-  if (EFI_ERROR (Status) && (BootMode != BOOT_ON_S3_RESUME)) {   \r
+  if (EFI_ERROR (Status) && (BootMode != BOOT_ON_S3_RESUME)) {\r
     //\r
     // The DxeIpl has not yet been shadowed\r
     //\r
@@ -320,7 +320,10 @@ Returns:
 \r
     ASSERT_EFI_ERROR (Status);\r
     Status = PeiRecovery->LoadRecoveryCapsule (PeiServices, PeiRecovery);\r
-    ASSERT_EFI_ERROR (Status);\r
+    if (EFI_ERROR (Status)) {\r
+      DEBUG ((EFI_D_ERROR, "Load Recovery Capsule Failed.(Status = %r)\n", Status));\r
+      CpuDeadLoop ();\r
+    }\r
 \r
     //\r
     // Now should have a HOB with the DXE core w/ the old HOB destroyed\r
@@ -371,7 +374,6 @@ Returns:
   // Transfer control to the DXE Core\r
   // The handoff state is simply a pointer to the HOB list\r
   //\r
-//  PERF_END (PeiServices, L"DxeIpl", NULL, 0);\r
 \r
   Status = PeiServicesInstallPpi (&mPpiSignal);\r
 \r
@@ -396,17 +398,20 @@ Returns:
     );\r
 \r
   DEBUG ((EFI_D_INFO, "DXE Core Entry\n"));\r
-  SwitchStack (\r
+  SwitchIplStacks (\r
     (SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,\r
     HobList.Raw,\r
-    (VOID *) (UINTN) BspStore,\r
-    TopOfStack\r
+    NULL,\r
+    TopOfStack,\r
+    (VOID *) (UINTN) BspStore\r
     );\r
 \r
   //\r
   // If we get here, then the DXE Core returned.  This is an error\r
+  // Dxe Core should not return.\r
   //\r
-  ASSERT_EFI_ERROR (Status);\r
+  ASSERT (FALSE);\r
+  CpuDeadLoop ();\r
 \r
   return EFI_OUT_OF_RESOURCES;\r
 }\r
@@ -757,7 +762,7 @@ Returns:
   EFI_FIRMWARE_VOLUME_HEADER      *FvHeader;\r
   EFI_COMPRESSION_SECTION         *CompressionSection;\r
   EFI_FFS_FILE_HEADER             *FfsFileHeader;\r
-  \r
+\r
   FfsFileHeader = *RealFfsFileHeader;\r
 \r
   Status = PeiServicesFfsFindSectionData (\r