From nobody Thu Dec 26 13:06:18 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1503544767301723.0560266779005; Wed, 23 Aug 2017 20:19:27 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E762E21D2E647; Wed, 23 Aug 2017 20:16:50 -0700 (PDT) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4ECC521D2E63A for ; Wed, 23 Aug 2017 20:16:49 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2017 20:19:23 -0700 Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 23 Aug 2017 20:19:22 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 23 Aug 2017 20:19:22 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 23 Aug 2017 20:19:22 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.183]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.117]) with mapi id 14.03.0319.002; Thu, 24 Aug 2017 11:19:20 +0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,419,1498546800"; d="dat'59?scan'59,208,59";a="1007082537" From: "Guo, Mang" To: "edk2-devel@lists.01.org" Thread-Topic: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017 09/1 BroxtonPlatformPkg: Fix MRC param issue Thread-Index: AdMch8ZilSTTlyOZRsujkZrY9te7Ig== Date: Thu, 24 Aug 2017 03:19:19 +0000 Message-ID: <22D2C85ED001C54AA20BFE3B0E4751D15253FC8B@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: <22D2C85ED001C54AA20BFE3B0E4751D15253FC8B@shsmsx102.ccr.corp.intel.com> x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017 09/1 BroxtonPlatformPkg: Fix MRC param issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang --- .../BensonGlacier/BoardInitPreMem/BoardInitMiscs.c | 21 ++++++++---------= ---- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMe= m/BoardInitMiscs.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardI= nitPreMem/BoardInitMiscs.c index d0987bb..0b602bd 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/Board= InitMiscs.c +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/Board= InitMiscs.c @@ -40,8 +40,8 @@ BgUpdateFspmUpd ( EFI_PLATFORM_INFO_HOB *PlatformInfo =3D NULL; DRAM_POLICY_PPI *DramPolicy; EFI_STATUS Status; - MRC_PARAMS_SAVE_RESTORE *MrcNvData; - BOOT_VARIABLE_NV_DATA *BootVariableNvData; + MRC_NV_DATA_FRAME *MrcNvData; + MRC_PARAMS_SAVE_RESTORE *MrcParamsHob; BOOT_VARIABLE_NV_DATA *BootVariableNvDataHob; =20 @@ -84,18 +84,13 @@ BgUpdateFspmUpd ( CopyMem (&(FspUpdRgn->FspmConfig.Ch0_Bit_swizzling), &DramPolicy->ChSw= izzle, sizeof (DramPolicy->ChSwizzle)); =20 if (((VOID *)(UINT32)DramPolicy->MrcTrainingDataPtr !=3D 0) && - ((VOID *)(UINT32)DramPolicy->MrcBootDataPtr !=3D 0)) { - DEBUG ((DEBUG_INFO, "UpdateFspmUpd - NvsBufferPtr\n")); - MrcNvData =3D (MRC_PARAMS_SAVE_RESTORE *) AllocateZeroPool = (sizeof (MRC_PARAMS_SAVE_RESTORE)); - BootVariableNvData =3D (BOOT_VARIABLE_NV_DATA *) AllocateZeroPool (s= izeof (BOOT_VARIABLE_NV_DATA)); - - MrcParamsHob =3D (MRC_PARAMS_SAVE_RESTORE*)((UINT32)DramPol= icy->MrcTrainingDataPtr); + ((VOID *)(UINT32)DramPolicy->MrcBootDataPtr !=3D 0)) { + MrcNvData =3D (MRC_NV_DATA_FRAME *) AllocateZeroPool (sizeof (MRC_NV= _DATA_FRAME)); + MrcParamsHob =3D (MRC_PARAMS_SAVE_RESTORE*)((UINT32)DramPolicy->MrcT= rainingDataPtr); BootVariableNvDataHob =3D (BOOT_VARIABLE_NV_DATA*)((UINT32)DramPolic= y->MrcBootDataPtr); - - CopyMem(MrcNvData, MrcParamsHob, sizeof (MRC_PARAMS_SAVE_RESTORE)); - CopyMem(BootVariableNvData, BootVariableNvDataHob, sizeof (BOOT_VARI= ABLE_NV_DATA)); - FspUpdRgn->FspmArchUpd.NvsBufferPtr =3D (VOID *)(UINT32)MrcNv= Data; - FspUpdRgn->FspmConfig.VariableNvsBufferPtr =3D (VOID *)(UINT32)BootV= ariableNvData; + CopyMem(&(MrcNvData->MrcParamsSaveRestore), MrcParamsHob, sizeof (MR= C_PARAMS_SAVE_RESTORE)); + CopyMem(&(MrcNvData->BootVariableNvData), BootVariableNvDataHob, siz= eof (BOOT_VARIABLE_NV_DATA)); + FspUpdRgn->FspmArchUpd.NvsBufferPtr =3D (VOID *)(UINT32)MrcNvData; } =20 } --=20 2.10.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel