From 27172c0f366fd159ea5789e4e85454d160f37447 Mon Sep 17 00:00:00 2001 From: andrewfish Date: Wed, 7 Jul 2010 23:10:14 +0000 Subject: Fix issue with ARM port. Image.c shadow code is not ANSI C and crashes on ARM. So I did the same thing that is done on Itanium and skipped the shadow for ARM architecture in all cases. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10636 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Pei/Image/Image.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'MdeModulePkg/Core/Pei') diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c index 5b2a6d0a72..0130d77342 100644 --- a/MdeModulePkg/Core/Pei/Image/Image.c +++ b/MdeModulePkg/Core/Pei/Image/Image.c @@ -117,7 +117,12 @@ GetImageReadFunction ( Private = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ()); - if (!Private->PeiMemoryInstalled || (Private->HobList.HandoffInformationTable->BootMode == BOOT_ON_S3_RESUME) || EFI_IMAGE_MACHINE_TYPE_SUPPORTED(EFI_IMAGE_MACHINE_IA64)) { + if (!Private->PeiMemoryInstalled || (Private->HobList.HandoffInformationTable->BootMode == BOOT_ON_S3_RESUME) || + EFI_IMAGE_MACHINE_TYPE_SUPPORTED(EFI_IMAGE_MACHINE_IA64) || EFI_IMAGE_MACHINE_TYPE_SUPPORTED(EFI_IMAGE_MACHINE_ARMTHUMB_MIXED)) { + // + // Point to ROM version if memory is not installed, we are in an S3. + // The shadow code is not ANSI C so skip on IA64 and ARM architectures. + // ImageContext->ImageRead = PeiImageRead; } else { if (Private->ShadowedImageRead == NULL) { -- cgit v1.2.3