]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Update IA32 PeiCore implementation to support load x64 image for EFI_PEI_LOAD_FILE...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 11 Aug 2009 15:45:16 +0000 (15:45 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 11 Aug 2009 15:45:16 +0000 (15:45 +0000)
2. Simplify the implementation of PeiLoadImage() in PeiCore to skip the function call of PeiLoadImageLoadImage() because PeiCore itself produce one instance of EFI_PEI_LOAD_FILE_PPI.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9045 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Pei/Image/Image.c

index 0ef19952a0c98399599a20dcfa59be8941e5701e..03e1d86ad73a6190908bef16e775cba6e21eb0d0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Pei Core Load Image Support\r
   \r
-Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2009, Intel Corporation                                                         \r
 All rights reserved. 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
@@ -287,7 +287,9 @@ PeiLoadImageLoadImage (
   Machine = PeCoffLoaderGetMachineType (Pe32Data);\r
   \r
   if (!EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Machine)) {\r
-    return EFI_UNSUPPORTED;  \r
+    if (!EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED (Machine)) {\r
+      return EFI_UNSUPPORTED;\r
+    }\r
   }\r
 \r
   if (ImageAddressArg != NULL) {\r
@@ -438,19 +440,7 @@ PeiLoadImage (
     Index++;\r
   } while (!EFI_ERROR (PpiStatus));\r
 \r
-  //\r
-  // If no instances reports EFI_SUCCESS, then build-in support for\r
-  // the PE32+/TE XIP image format is used.\r
-  //\r
-  Status = PeiLoadImageLoadImage (\r
-            PeiServices, \r
-            FileHandle, \r
-            NULL, \r
-            NULL, \r
-            EntryPoint, \r
-            AuthenticationState\r
-            );\r
-  return Status;\r
+  return PpiStatus;\r
 }\r
 \r
 \r