From nobody Sun Dec 29 02:47:21 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.zoho.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 1492159955895847.4589100927619; Fri, 14 Apr 2017 01:52:35 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 96D232194EB5C; Fri, 14 Apr 2017 01:52:33 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 E1DBC21A04830 for ; Fri, 14 Apr 2017 01:52:32 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 14 Apr 2017 01:52:32 -0700 Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 14 Apr 2017 01:52:32 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 14 Apr 2017 01:52:31 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 14 Apr 2017 01:52:31 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.217]) with mapi id 14.03.0319.002; Fri, 14 Apr 2017 16:52:29 +0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,197,1488873600"; d="dat'59?scan'59,208,59";a="77218075" From: "Guo, Mang" To: "edk2-devel@lists.01.org" Thread-Topic: [Patch][edk2-platforms/devel-MinnowBoard3] Fix issue in PlatformSMM Thread-Index: AdK0/HJ7SUBlDs4xR5Wt/eoXW1UyEw== Date: Fri, 14 Apr 2017 08:52:29 +0000 Message-ID: <22D2C85ED001C54AA20BFE3B0E4751D152501F13@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: <22D2C85ED001C54AA20BFE3B0E4751D152501F13@SHSMSX103.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] Fix issue in PlatformSMM 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: , Cc: "Lu, ShifeiX A" , "Wei, David" 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" Change code to set R_SMI_EN earlier in S3 boot path to make sure all SMI we= re detected. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang --- Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c | 13 +++++++++++= +- Platform/BroxtonPlatformPkg/Common/PlatformSmm/S3Save.c | 11 +---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c b/Pl= atform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c index 673df3a..e0c6c71 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSmm/Platform.c @@ -1,7 +1,7 @@ /** @file This is a generic template for a child of the IchSmm driver. =20 - Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -142,6 +142,7 @@ InitializePlatformSmm ( EFI_SMM_SW_REGISTER_CONTEXT SwContext; UINTN VarSize; EFI_BOOT_MODE BootMode; + UINT32 Data32; Handle =3D NULL; =20 // @@ -315,6 +316,16 @@ InitializePlatformSmm ( =20 ASSERT_EFI_ERROR (Status); =20 + =20 + Data32 =3D IoRead32 (mAcpiBaseAddr + R_SMI_EN); + S3BootScriptSaveIoWrite ( + S3BootScriptWidthUint32, + (mAcpiBaseAddr + R_SMI_EN), + 1, + &Data32 + ); + =20 + =20 // // Get the ICHn protocol // diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/S3Save.c b/Plat= form/BroxtonPlatformPkg/Common/PlatformSmm/S3Save.c index 4b3f34f..00b25f5 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSmm/S3Save.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSmm/S3Save.c @@ -1,7 +1,7 @@ /** @file SMM S3 handler Driver implementation file. =20 - Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -22,7 +22,6 @@ SaveRuntimeScriptTable ( IN EFI_SMM_SYSTEM_TABLE2 *Smst ) { - UINT32 Data32; UINT16 Data16; UINT8 Data8; UINT32 DwordData; @@ -58,14 +57,6 @@ SaveRuntimeScriptTable ( &Data8 ); =20 - Data32 =3D IoRead32 (mAcpiBaseAddr + R_SMI_EN); - S3BootScriptSaveIoWrite ( - S3BootScriptWidthUint32, - (mAcpiBaseAddr + R_SMI_EN), - 1, - &Data32 - ); - // // Save B_ICH_TCO_CNT_LOCK so it will be done on S3 resume path. // --=20 2.10.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel