]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: add error handling when DXE IPL PPI is not found.
authorElvin Li <elvin.li@intel.com>
Wed, 1 Apr 2015 04:56:00 +0000 (04:56 +0000)
committerli-elvin <li-elvin@Edk2>
Wed, 1 Apr 2015 04:56:00 +0000 (04:56 +0000)
Add status code report and cpu deadloop when DXE IPL PPI is not found.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17087 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Pei/PeiMain/PeiMain.c

index 3220ffb8eecb9816ade75f92318fafc86140e50a..d019141c6eecd70db1acc390e145eda2122563dd 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Pei Core Main Entry Point\r
   \r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -436,6 +436,17 @@ PeiCore (
              );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
+  if (EFI_ERROR (Status)) {\r
+    //\r
+    // Report status code to indicate DXE IPL PPI could not be found.\r
+    //\r
+    REPORT_STATUS_CODE (\r
+      EFI_ERROR_CODE | EFI_ERROR_MAJOR,\r
+      (EFI_SOFTWARE_PEI_CORE | EFI_SW_PEI_CORE_EC_DXEIPL_NOT_FOUND)\r
+      );\r
+    CpuDeadLoop ();\r
+  }\r
+\r
   //\r
   // Enter DxeIpl to load Dxe core.\r
   //\r