X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Vlv2TbltDevicePkg%2FSmramSaveInfoHandlerSmm%2FSmramSaveInfoHandlerSmm.c;h=790c10c32974603eec40b7505071eb865a8653ca;hb=a2acb04ca67853519a514a986de11b6bc468d564;hp=a48de262dbcea028b049a64f88fef14757779276;hpb=3cbfba02fef9dae07a041fdbf2e89611d72d6f90;p=mirror_edk2.git diff --git a/Vlv2TbltDevicePkg/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.c b/Vlv2TbltDevicePkg/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.c index a48de262db..790c10c329 100644 --- a/Vlv2TbltDevicePkg/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.c +++ b/Vlv2TbltDevicePkg/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.c @@ -3,7 +3,7 @@ This driver is for ECP platforms. - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2015, 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 that accompanies this distribution. @@ -27,6 +27,7 @@ #include #include #include +#include #define SMM_FROM_SMBASE_DRIVER 0x55 #define SMM_FROM_CPU_DRIVER_SAVE_INFO 0x81 @@ -61,29 +62,15 @@ SmramSaveInfoHandler ( IN EFI_SMM_SW_DISPATCH_CONTEXT *DispatchContext ) { - EFI_STATUS Status; - UINT64 VarData[3]; - UINTN VarSize; - ASSERT (DispatchContext != NULL); ASSERT (DispatchContext->SwSmiInputValue == SMM_FROM_SMBASE_DRIVER); if (!mLocked && IoRead8 (mSmiDataRegister) == SMM_FROM_CPU_DRIVER_SAVE_INFO) { - VarSize = sizeof (VarData); - Status = gRT->GetVariable ( - L"SmramCpuNvs", - &mSmramCpuNvsHeaderGuid, - NULL, - &VarSize, - VarData - ); - if (!EFI_ERROR (Status) && VarSize == sizeof (VarData)) { CopyMem ( - (VOID *)(UINTN)(VarData[0]), - (VOID *)(UINTN)(VarData[1]), - (UINTN)(VarData[2]) + (VOID *)(UINTN)(PcdGetEx64 (&gEfiVLVTokenSpaceGuid, PcdCpuLockBoxDataAddress)), + (VOID *)(UINTN)(PcdGetEx64 (&gEfiVLVTokenSpaceGuid, PcdCpuSmramCpuDataAddress)), + (UINTN)(PcdGetEx64 (&gEfiVLVTokenSpaceGuid, PcdCpuLockBoxSize)) ); - } } }