From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web11.33294.1628835235453330245 for ; Thu, 12 Aug 2021 23:13:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=krCFrcCP; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=085980678f=gary.lin@hpe.com) Received: from pps.filterd (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17D632Tn026227; Fri, 13 Aug 2021 06:13:55 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-transfer-encoding : content-type : mime-version; s=pps0720; bh=4Sal6jv7GAAG+FGBjRpnTtOGRC3R3Ufi8PEm6HppZF8=; b=krCFrcCPGn8H+OsPgxyLqF49YIjPHtJO3Nua/BosovaKgTXQqxB1uahRNGiR+bzRqEpw D7AMU0sYBlxf32du9GVzw/yGIRRfME8Pryqr09FAD/NyvhqAZyBBobBRawVWZLmg3trD t0S1dGR+TjZ6ZEq8444jokiV/F8zZNJeoudzQWUejdoxNv2uDzLdICfmV6C4CrM95ze5 uOjHm8nJbm3wTbsFbs3c2f+r766fp0nrRVTjkghRUrszc7GuY46gGV06883KRkksMlCD Em+ZM5b7CXXd5CVqB5sD6hwz2lzX2IhaBTN1v349vuJ/OLn/8N5aDoee3g/0tMiSuDcR Hw== Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0a-002e3701.pphosted.com with ESMTP id 3acr2dkrjv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Aug 2021 06:13:54 +0000 Received: from G9W8456.americas.hpqcorp.net (g9w8456.houston.hp.com [16.216.161.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2352.austin.hpe.com (Postfix) with ESMTPS id E042E9C; Fri, 13 Aug 2021 06:13:53 +0000 (UTC) Received: from G4W9120.americas.hpqcorp.net (2002:10d2:150f::10d2:150f) by G9W8456.americas.hpqcorp.net (2002:10d8:a15f::10d8:a15f) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 13 Aug 2021 06:13:53 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (15.241.52.10) by G4W9120.americas.hpqcorp.net (16.210.21.15) with Microsoft SMTP Server (TLS) id 15.0.1497.18 via Frontend Transport; Fri, 13 Aug 2021 06:13:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wg7az5kHMTMX7JTBjQ01gwIZqK9s6VTVPA42IXeH9tprZJLa3vgR987cgEcZpLl2dahc10CuFd25fQoKhn1udtRHhiLYmSJy6WUABbNyN3CS1jaTY4NYftWieI8Fw+RRh0n4VuJJzr5fxGZwMNXMxDjxCLGD2I2pIyeC8HksqssWUys8lr22dvBO8FysedmX4ImIgaX3qYOUQp5aAPH6RJ46wtsR+/WqgnmDRF43Vu6fVXXXvrfd0uw45bdDyzg9rVfzxn+EhaEwkbgMGXC3bS2YXtWvgzW9l5wKxrFCG7ePzdAjjXuQN2ylv/DtwhQY9ASc7wUkrqX2t/ElIAUqwQ== 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=4Sal6jv7GAAG+FGBjRpnTtOGRC3R3Ufi8PEm6HppZF8=; b=TNJpMArQEVVU+plsrEFN4OiF4fzQm7lR9mJ4NCXQHtN8L0blvZPr45acowpRzZVZSc3jWZCFp/PLpiH0bQtEhBN4ayq1sbi11ve0uKHnfLYvA6FHuy3JBFW5q7p8o8Sz7EVeEpb1T4CV087AQfAuMR+Q8cQXrt/Cj21I7C8zRc4VBu7NPoyTBF1/jhHsBKKhnnrnRHm0P/o+QeVOjq1vv+WS73vvBvHP1CWon90RM868ekAGdGmih8zQUTXT0yVEF5fJFG9h+moCS+LDCEYKKg93Dbj70mOy3RrZLAK+H9D0aA+MiNpO/vbMgoPLCYYRx2g6KdueQe6S9+r7RrvE1A== 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 AT5PR8401MB1185.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7420::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.17; Fri, 13 Aug 2021 06:13:52 +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.4415.018; Fri, 13 Aug 2021 06:13:52 +0000 From: "Lin, Gary (HPS OE-Linux)" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Jim Fehlig , Joey Li Subject: [PATCH v2 5/5] OvmfPkg/SmmControl2Dxe: use PcdAcpiS3Enable to detect S3 support Date: Fri, 13 Aug 2021 14:13:05 +0800 Message-ID: <20210813061305.17519-6-gary.lin@hpe.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210813061305.17519-1-gary.lin@hpe.com> References: <20210813061305.17519-1-gary.lin@hpe.com> X-ClientProxiedBy: HK2PR02CA0150.apcprd02.prod.outlook.com (2603:1096:202:16::34) To AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:741f::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (111.240.110.200) by HK2PR02CA0150.apcprd02.prod.outlook.com (2603:1096:202:16::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.15 via Frontend Transport; Fri, 13 Aug 2021 06:13:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2b830851-22c1-4bc8-f28e-08d95e2185d0 X-MS-TrafficTypeDiagnostic: AT5PR8401MB1185: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:409; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YnxpQ/yctZOaIfAfygRenHHK8Unys0E+QoD9hkIz8TG3Oo+d3WI8CYxCcRSMWZS1r94Tt15uIGaaviIyGkhguYC7mC1e5M0xnTGseFCHEMOp5JaADgl6M+rzIsyEKYvyoglXbOWhx4YXTO6idP+TheZctz4wQdJ73Wg3zWNWcGQsvIa5UduNwfnu4inpade/TuQTwXn1s8df07C3svvIzTAFYl+OnSJCWR67PX5uj2PXScLGYRPIDUNu1LgVPxMWAIGTPPPhq46H3ysSvboW04GOf8agVKgYCGja4Yn+kE5Vu5tkbMEUUkmnJLnC8gEucP8fXvzftpzda8nMVcBw6iW3jdRXaUVav+i7m5HUbyKjiBlItzeK2BLhiBTh0R7nS6JTsk+gaOYUBWY2UX3RmxplxmbwHMCa2fEM/2NlCgf+ICIFiUG55XOVjrHRcBUQkcaIFPSytIT92iqgCJtaynzn2tAC5vhtjo6iaqAeOmPMSVXTbURXCKkQsW9b6bIaA7PBR58W1xcFO1GndkCP4n4eVhi8WuAJKX35B+ilRSUT2HicU7GxJZcKAKmTZCnDWf5z6UqXdciN1+Ek2oZeQJwDaXi6fzqb2j6KHkk57p5KSrlZhUf4PK1bh81No4EqYAmLmVh5NupnZTBm/gxemQ== 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)(396003)(39860400002)(366004)(376002)(136003)(19627235002)(6486002)(186003)(26005)(6496006)(478600001)(66946007)(66476007)(66556008)(83380400001)(6666004)(4326008)(2906002)(86362001)(8936002)(36756003)(38100700002)(8676002)(1076003)(5660300002)(6916009)(44832011)(316002)(54906003)(956004)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?AAskHk2T89z/aeANxd3pbK4DZAhYn9L0GZKWXeuRriBWV5cX8lRpyKNta85h?= =?us-ascii?Q?ZE7G9KEHlwjL+pw6i7+ZFQlY5QLycZKAY2GNTKwmRlIc0i6QBOQ/9S/O/Uvm?= =?us-ascii?Q?+s9VxQ5M/ndVGyBEgKj1wTEx7sVuLu2ldbMV4WdSc3MH4l8MJ4YyM9bMucMv?= =?us-ascii?Q?VueV2aBQ4YY+k3ijD7cJ4H1PNeUqShRdB+Dm5nSAhgRyQDxUiwTS3YfaD310?= =?us-ascii?Q?RX335NaWwTxVKtPKzYGNhSS9x54WD85tYTX2Q3fSJc3+r42Z75WggyhcJMub?= =?us-ascii?Q?FvnoYWwE7m4rCFRpCnlaiGDOsHTS6Z88uDsnINjw463BVVdsXycEVU4H7z9g?= =?us-ascii?Q?vDpYb3LDumPIZzyx+s1o96YdLjtKzdOyGk2MJU6onmPp6vCqzgH04RsmS5dw?= =?us-ascii?Q?sO44ZmaZW9rWoEPJss5rfh33Cr5VQR2NZyzeu67UBLJDj5k+pL/ZTyLY+/Bt?= =?us-ascii?Q?oLH5B0cZkN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Network-Message-Id: 2b830851-22c1-4bc8-f28e-08d95e2185d0 X-MS-Exchange-CrossTenant-AuthSource: AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2021 06:13:52.2880 (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: u0WyPQ8aIiSku1bhyjNp42JZXZT9RBNafsuRvGgfcmNNHLn0oFU+ceEd8ItkVlFUkAYp7moYbFhZ41SHM/GpCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR8401MB1185 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: MYvXMEI6qsDsPC-bq-kME6bXhvfgFpek X-Proofpoint-ORIG-GUID: MYvXMEI6qsDsPC-bq-kME6bXhvfgFpek X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-08-13_01:2021-08-12,2021-08-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=578 phishscore=0 impostorscore=0 spamscore=0 mlxscore=0 bulkscore=0 suspectscore=0 clxscore=1015 malwarescore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108130038 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain To avoid the potential inconsistency between PcdAcpiS3Enable and QemuFwCfgS3Enabled(), this commit modifies SmmControl2Dxe to detect S3 support by PcdAcpiS3Enable as modules in MdeModulePkg do. 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