]> git.proxmox.com Git - mirror_edk2.git/commitdiff
The fix is for EFI Linux capsule test case can not run.
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Feb 2010 06:27:18 +0000 (06:27 +0000)
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Feb 2010 06:27:18 +0000 (06:27 +0000)
It should use runtime library EfiSetVariable, gRT is not converted to virtual address which cause SetVariable failure in EFI Linux.

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

MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c

index c47335bece81606b5ca4e0df4f8c805b49077b34..fc9fc0e78f6007c34525b8dba75845b6ea58c43d 100644 (file)
@@ -4,7 +4,7 @@
   It installs the Capsule Architectural Protocol defined in PI1.0a to signify \r
   the capsule runtime services are ready.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>\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
@@ -164,20 +164,20 @@ UpdateCapsule (
   // system reset. Set its value into NV storage to let pre-boot driver to pick it up \r
   // after coming through a system reset.\r
   //\r
-  Status = gRT->SetVariable (\r
-                 EFI_CAPSULE_VARIABLE_NAME,\r
-                 &gEfiCapsuleVendorGuid,\r
-                 EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-                 sizeof (UINTN),\r
-                 (VOID *) &ScatterGatherList\r
-                 );\r
+  Status = EfiSetVariable (\r
+             EFI_CAPSULE_VARIABLE_NAME,\r
+             &gEfiCapsuleVendorGuid,\r
+             EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
+             sizeof (UINTN),\r
+             (VOID *) &ScatterGatherList\r
+             );\r
   if (!EFI_ERROR (Status) && InitiateReset) {\r
     //\r
     // Firmware that encounters a capsule which has the CAPSULE_FLAGS_INITIATE_RESET Flag set in its header\r
     // will initiate a reset of the platform which is compatible with the passed-in capsule request and will \r
     // not return back to the caller.\r
     //\r
-    gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);\r
+    EfiResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);\r
   }\r
   return Status;\r
 }\r