]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update module to pass in a valid EFI_HANDLE when is reloads and restarts itself using...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 10 Mar 2011 21:59:39 +0000 (21:59 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 10 Mar 2011 21:59:39 +0000 (21:59 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11364 6f19259b-4bc3-4df7-8a09-765794883524

EdkCompatibilityPkg/Compatibility/BootScriptSaveOnS3SaveStateThunk/ScriptSave.c

index 7248e2e860c3aa9baa518bd9cc49c2d3d29224a4..3a3b8c8be53f0b93fea22763127d4b416d0e9255 100644 (file)
@@ -2,7 +2,7 @@
   Implementation for S3 Boot Script Save thunk driver.\r
   This thunk driver consumes PI S3SaveState protocol to produce framework S3BootScriptSave Protocol \r
   \r
-  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2011, 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
@@ -803,6 +803,7 @@ InitializeScriptSaveOnS3SaveState (
   VOID                                          *DevicePath;\r
   EFI_PHYSICAL_ADDRESS                          MemoryAddress;\r
   UINTN                                         PageNumber;\r
+  EFI_HANDLE                                    NewImageHandle;\r
 \r
   //\r
   // Test if the gEfiCallerIdGuid of this image is already installed. if not, the entry\r
@@ -817,11 +818,12 @@ InitializeScriptSaveOnS3SaveState (
     //\r
     // A workarouond: Here we install a dummy handle\r
     //\r
+    NewImageHandle = NULL;\r
     Status = gBS->InstallProtocolInterface (\r
-                    &ImageHandle,\r
+                    &NewImageHandle,\r
                     &gEfiCallerIdGuid,\r
                     EFI_NATIVE_INTERFACE,\r
-                    DevicePath\r
+                    NULL\r
                     );\r
 \r
     Status = GetSectionFromAnyFv  (\r
@@ -881,7 +883,7 @@ InitializeScriptSaveOnS3SaveState (
     // Flush the instruction cache so the image data is written before we execute it\r
     //\r
     InvalidateInstructionCacheRange ((VOID *)(UINTN)ImageContext.ImageAddress, (UINTN)ImageContext.ImageSize);\r
-    Status = ((EFI_IMAGE_ENTRY_POINT)(UINTN)(ImageContext.EntryPoint)) ((EFI_HANDLE)(UINTN)(ImageContext.ImageAddress), SystemTable);\r
+    Status = ((EFI_IMAGE_ENTRY_POINT)(UINTN)(ImageContext.EntryPoint)) (NewImageHandle, SystemTable);\r
     if (EFI_ERROR (Status)) {\r
       gBS->FreePages (MemoryAddress, PageNumber);\r
       return Status;\r