From b3b1a4cfa9f93f38739037dbec242cda885daee2 Mon Sep 17 00:00:00 2001 From: li-elvin Date: Thu, 11 Feb 2010 06:27:18 +0000 Subject: The fix is for EFI Linux capsule test case can not run. 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 --- .../Universal/CapsuleRuntimeDxe/CapsuleService.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c index c47335bece..fc9fc0e78f 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c @@ -4,7 +4,7 @@ It installs the Capsule Architectural Protocol defined in PI1.0a to signify the capsule runtime services are ready. -Copyright (c) 2006 - 2009, Intel Corporation.
+Copyright (c) 2006 - 2010, Intel Corporation.
All rights reserved. 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 @@ -164,20 +164,20 @@ UpdateCapsule ( // system reset. Set its value into NV storage to let pre-boot driver to pick it up // after coming through a system reset. // - Status = gRT->SetVariable ( - EFI_CAPSULE_VARIABLE_NAME, - &gEfiCapsuleVendorGuid, - EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS, - sizeof (UINTN), - (VOID *) &ScatterGatherList - ); + Status = EfiSetVariable ( + EFI_CAPSULE_VARIABLE_NAME, + &gEfiCapsuleVendorGuid, + EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS, + sizeof (UINTN), + (VOID *) &ScatterGatherList + ); if (!EFI_ERROR (Status) && InitiateReset) { // // Firmware that encounters a capsule which has the CAPSULE_FLAGS_INITIATE_RESET Flag set in its header // will initiate a reset of the platform which is compatible with the passed-in capsule request and will // not return back to the caller. // - gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL); + EfiResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL); } return Status; } -- cgit v1.2.3