summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Compatibility
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-10 21:59:39 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-10 21:59:39 +0000
commitca1677d839cd3bc00a29d8019524ffb3a46fd40f (patch)
tree5e66e079d4b93a5a1fbd837a6820e60a16bd46df /EdkCompatibilityPkg/Compatibility
parentd042c6e830756e63248f1d760a1dc0817c5ec0e8 (diff)
downloadedk2-platforms-ca1677d839cd3bc00a29d8019524ffb3a46fd40f.tar.xz
Update module to pass in a valid EFI_HANDLE when is reloads and restarts itself using the PeCoffLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11364 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Compatibility')
-rw-r--r--EdkCompatibilityPkg/Compatibility/BootScriptSaveOnS3SaveStateThunk/ScriptSave.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/BootScriptSaveOnS3SaveStateThunk/ScriptSave.c b/EdkCompatibilityPkg/Compatibility/BootScriptSaveOnS3SaveStateThunk/ScriptSave.c
index 7248e2e860..3a3b8c8be5 100644
--- a/EdkCompatibilityPkg/Compatibility/BootScriptSaveOnS3SaveStateThunk/ScriptSave.c
+++ b/EdkCompatibilityPkg/Compatibility/BootScriptSaveOnS3SaveStateThunk/ScriptSave.c
@@ -2,7 +2,7 @@
Implementation for S3 Boot Script Save thunk driver.
This thunk driver consumes PI S3SaveState protocol to produce framework S3BootScriptSave Protocol
- Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -803,6 +803,7 @@ InitializeScriptSaveOnS3SaveState (
VOID *DevicePath;
EFI_PHYSICAL_ADDRESS MemoryAddress;
UINTN PageNumber;
+ EFI_HANDLE NewImageHandle;
//
// Test if the gEfiCallerIdGuid of this image is already installed. if not, the entry
@@ -817,11 +818,12 @@ InitializeScriptSaveOnS3SaveState (
//
// A workarouond: Here we install a dummy handle
//
+ NewImageHandle = NULL;
Status = gBS->InstallProtocolInterface (
- &ImageHandle,
+ &NewImageHandle,
&gEfiCallerIdGuid,
EFI_NATIVE_INTERFACE,
- DevicePath
+ NULL
);
Status = GetSectionFromAnyFv (
@@ -881,7 +883,7 @@ InitializeScriptSaveOnS3SaveState (
// Flush the instruction cache so the image data is written before we execute it
//
InvalidateInstructionCacheRange ((VOID *)(UINTN)ImageContext.ImageAddress, (UINTN)ImageContext.ImageSize);
- Status = ((EFI_IMAGE_ENTRY_POINT)(UINTN)(ImageContext.EntryPoint)) ((EFI_HANDLE)(UINTN)(ImageContext.ImageAddress), SystemTable);
+ Status = ((EFI_IMAGE_ENTRY_POINT)(UINTN)(ImageContext.EntryPoint)) (NewImageHandle, SystemTable);
if (EFI_ERROR (Status)) {
gBS->FreePages (MemoryAddress, PageNumber);
return Status;