From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web09.20533.1629702619989473056 for ; Mon, 23 Aug 2021 00:10:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=HOrf5Nv7; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0869c54ae3=gary.lin@hpe.com) Received: from pps.filterd (m0134424.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17N73cOt029503; Mon, 23 Aug 2021 07:10:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=m63LYnX9Pplamgj8ORYMYRgDOVc6sDyfZ9EPb06VbEo=; b=HOrf5Nv7wSMqURlvEQKVE6Qrm0Gqtrj+yOLk67nfX7+WqokDX3xzmpM+aoekk6MuwGUa g8DyI6k8xaL3NzkI/uEHFmvBbBffuz+ZFqquSTfwspcvjKuMEzXv9L1fnG0k9fFBEnF9 DackHIYgoeZXokx4XnTOfC9eylaxvZh/1/C+AE22rWutyGWSwAUbKqHobLEnvOgGqGgA 4qsIjIw7YNPYTvwqPxjMfvE/xdvbjh0DNy0e7qyDH4Jn4j6VRxflGyA8RfZMZOvRjMVu ir9lLGZZK+4jM6qrgn/jOKizpyo3quLGO31Wz5eW1HoQ7afV1YB4ecxD9tHmXMkzo9Ld /Q== Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) by mx0b-002e3701.pphosted.com with ESMTP id 3ajrfqnn3u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Aug 2021 07:10:18 +0000 Received: from G9W8453.americas.hpqcorp.net (exchangepmrr1.us.hpecorp.net [16.216.160.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3426.houston.hpe.com (Postfix) with ESMTPS id 5AC5960; Mon, 23 Aug 2021 07:10:18 +0000 (UTC) Received: from G9W8453.americas.hpqcorp.net (2002:10d8:a0d3::10d8:a0d3) by G9W8453.americas.hpqcorp.net (2002:10d8:a0d3::10d8:a0d3) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 23 Aug 2021 07:10:18 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (15.241.52.13) by G9W8453.americas.hpqcorp.net (16.216.160.211) with Microsoft SMTP Server (TLS) id 15.0.1497.18 via Frontend Transport; Mon, 23 Aug 2021 07:10:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DczOLRsCXCa0olaKexZPtCxv+Mjwl0scdnZPNZAB5MmZhz6M3mpDIp9tBH5/n1gx9/vPzVDNVvkN6mJpgmtngWodlUKmbs0goKli/jnvYMKlqPyt7lsBenzLAkzccxMfLO74nQyzlPNiqprFtS2PghFQGjyRD27JdIBRcMGgV5Ru2gu9rcmueCevyDmWVB9siYEzobFC5OhUEOhyX3K3/dxJLMYYoyx2oy2uK+Akvl0EGAYv3gX8AP6fM8PJlY2Ey5dcCPYmPvTQADcVb6E1qaRKbdSphrjePqzyhLFul8Gahv0dsExgez3IETW2mtA3LpjrdtWXQf4dEM+l0deVtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m63LYnX9Pplamgj8ORYMYRgDOVc6sDyfZ9EPb06VbEo=; b=nGToBuDkG6LCbSyHgAYnIvTmG3HZq7IpAdwbPoKYciwOyaezsd2wMDfK6u6FTFufPK3aUlR3JA5qVGwNRmH82nm7GXd1Jm4s6ZaYiYn7V8YQZHkYSBH4aKW+7Gg/DzrVHluJBxRf8eLWK2YjE2G50zwB4QIo8J1Cix4Axvfgqk+ePEe7xf8fUYp+G4+g6eeOzgBDkXO+gQHqN0GLDXPyHTQ1Z+9LMidH6Q72cI9+PNyyc1f2lvOFnUnkDJWQmIcDZBIrJYblm4hsf40yRRehoDr3WhlLp678T8HKPcUXXAv/wudozL3ek03ay2aXgmh/thVUlwBgPm7E3bwtzitvzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=hpe.com; Received: from AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:741f::21) by AT5PR8401MB1106.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7421::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.22; Mon, 23 Aug 2021 07:10:17 +0000 Received: from AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM ([fe80::106b:abb8:386b:a2db]) by AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM ([fe80::106b:abb8:386b:a2db%9]) with mapi id 15.20.4436.019; Mon, 23 Aug 2021 07:10:17 +0000 From: "Lin, Gary (HPS OE-Linux)" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Jim Fehlig , Joey Li Subject: [PATCH v3 4/4] OvmfPkg/SmmControl2Dxe: use PcdAcpiS3Enable to detect S3 support Date: Mon, 23 Aug 2021 15:09:25 +0800 Message-ID: <20210823070925.10095-5-gary.lin@hpe.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210823070925.10095-1-gary.lin@hpe.com> References: <20210823070925.10095-1-gary.lin@hpe.com> X-ClientProxiedBy: HK2PR02CA0184.apcprd02.prod.outlook.com (2603:1096:201:21::20) To AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:741f::21) X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (111.240.132.81) by HK2PR02CA0184.apcprd02.prod.outlook.com (2603:1096:201:21::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Mon, 23 Aug 2021 07:10:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cc7f6b56-987b-4425-6bcb-08d966050f75 X-MS-TrafficTypeDiagnostic: AT5PR8401MB1106: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:525; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yYV33+RKdW9xaaQMM8K1DTGXAvukxSaFlgl4qfsJZygh2mU4kmz+SRcOSvBnkc0ZSYejE1wrfdlNweNSA956iCKyY+SeCWANo+qmBz8azE8ji/JG1V9j18ymrAOARQYcGCEwDzyiwhYzbWvfrdp35PojgKn2eoqW13Zoj0STzd5sGJRQsGwb+6yk+nKCK19LS/SIUg/DWUYHHR1ZV8KBwWMrHYFcrTo52pyUopHejRSWm5RENGThkjP1PoJuzUb7BiI+iH5e2XSJgmwgZnszet7o/N3cYg/abp46b73Vbr4dvdjUGvuIZ+w9Z6LGf7r0o3BlAYGXcLuNn49t/zJ2ug0+BMGaK3EMd17T+SFeykcOu3xGQoykpLRbUkyKlHxhd2fw1zmmaou86jiLZGVMkr5kzFqIBjyookHM34dIrD3Odb7aYKzwwyGmCFUnOWHDFGsVnvttK0ioit539YlMCmhyGDwjBq0oviMn7dBWnxpDy0P1vCLJZKqKcplZK/GkXD9gaxAyuo5iQm4ly1nY2LuKiMGjCYqHDVgFO0YCsETafNukdnHTwmtCXWnWKnWMAToW1AjNIc0WoQfX5tHWjdvUl+r25mdK6GIy0xmZAQx5dA9TSOmAu6bEJRFl6PL0n76WntoYhdhag6WLqUOIHnXZ9uqT7bX9b7Fkw2iUAFqlobWOTvJpaHIeX6bsFYg98097cnlOgD/FjaSfAML3ztlrrL08zYhgGwGh8NaHntc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(346002)(376002)(136003)(396003)(366004)(39860400002)(316002)(966005)(54906003)(26005)(478600001)(83380400001)(19627235002)(1076003)(8936002)(6486002)(86362001)(36756003)(2616005)(956004)(6916009)(186003)(5660300002)(66556008)(8676002)(4326008)(66476007)(66946007)(6666004)(6496006)(2906002)(44832011)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?N0BqGEVlAT71LRdO41GsKizR1LMftaUA7crTw1abi2SFXUMm5JjjpZCICsnv?= =?us-ascii?Q?smesLVbR6NvRuiOxAnLGgggYTtA0Udw2wIrfMVYd0LiJhm7W51ZecITpARuy?= =?us-ascii?Q?XN9OuHUmuA6dzY/s0HJgL+jQZ/nA77TC20cDPfYzwJcmeTsEoNrW34Hs9D+q?= =?us-ascii?Q?teLaNXotNQvYzHJQexBy2VPXH1UtnFy3p3Jcl9teCak6iaM5Dqf6omOjKXc3?= =?us-ascii?Q?iGu/tMNOvIFEcVl3k9N8m8V7/WfjDhwR4PrSvv95PeEnXFjV9jlKT4notj7J?= =?us-ascii?Q?0w9YMZgmovhhoTz0it8kpW/RbQ8gH8iK31kqq7NCPOgRy7uMZ9cr5rwrHEzd?= =?us-ascii?Q?+0McfWJPnGbEQWiig8oSY27lVc1p9QMEjZOo18kNnoGuy4UGcTDsQns0haj7?= =?us-ascii?Q?MBjWRQXBv6qlZFFeV7D0p+0N5mlrRUspxAuwt/n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E41p+ASY3Rog?= X-MS-Exchange-CrossTenant-Network-Message-Id: cc7f6b56-987b-4425-6bcb-08d966050f75 X-MS-Exchange-CrossTenant-AuthSource: AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2021 07:10:17.1028 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HRawR47g2yn6y7NCGZyATurxSa4cusR+A2eLkM0JZJG9dZuo3Cm2T+jG89JXWKUj8xUpH27Jk4Jne14gfJufew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR8401MB1106 X-OriginatorOrg: hpe.com X-Proofpoint-ORIG-GUID: z5k-MCtxCxxMZptjIllEI8SmARGGHSo2 X-Proofpoint-GUID: z5k-MCtxCxxMZptjIllEI8SmARGGHSo2 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-08-23_02:2021-08-20,2021-08-23 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=760 suspectscore=0 phishscore=0 bulkscore=0 priorityscore=1501 spamscore=0 adultscore=0 mlxscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108230047 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable https://bugzilla.tianocore.org/show_bug.cgi?id=3D3573 To avoid the potential inconsistency between PcdAcpiS3Enable and QemuFwCfgS3Enabled(), this commit modifies SmmControl2Dxe to detect S3 support by PcdAcpiS3Enable as modules in MdeModulePkg do. v3: - Add the bugzilla link Cc: Ard Biesheuvel Cc: Jiewen Yao cc: Jordan Justen Cc: Jim Fehlig Cc: Joey Li Signed-off-by: Gary Lin --- OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf | 2 ++ OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf b/OvmfPkg/SmmControl= 2Dxe/SmmControl2Dxe.inf index b8fdea8deb84..4cad56516f49 100644 --- a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf +++ b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf @@ -39,6 +39,7 @@ [Sources] =0D [Packages]=0D MdePkg/MdePkg.dec=0D + MdeModulePkg/MdeModulePkg.dec=0D OvmfPkg/OvmfPkg.dec=0D UefiCpuPkg/UefiCpuPkg.dec=0D =0D @@ -62,6 +63,7 @@ [Protocols] [Pcd]=0D gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmApSyncTimeout ## SOMETIMES_PRODUCES=0D gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmSyncMode ## SOMETIMES_PRODUCES=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable=0D =0D [FeaturePcd]=0D gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire=0D diff --git a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c b/OvmfPkg/SmmControl2D= xe/SmmControl2Dxe.c index 9547c202880f..be04baf7b288 100644 --- a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c +++ b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c @@ -25,8 +25,6 @@ #include =0D #include =0D #include =0D -#include =0D -#include =0D #include =0D #include =0D #include =0D @@ -238,7 +236,7 @@ SmmControl2DxeEntryPoint ( //=0D mSmiFeatureNegotiation =3D NegotiateSmiFeatures ();=0D =0D - if (QemuFwCfgS3Enabled ()) {=0D + if (PcdGetBool (PcdAcpiS3Enable)) {=0D VOID *Registration;=0D =0D //=0D --=20 2.31.1