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.web08.20250.1629702599710281912 for ; Mon, 23 Aug 2021 00:10:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=KlVmSrHe; 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 (m0150244.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17N72hpo027200; Mon, 23 Aug 2021 07:09:58 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=g7dmEI/SE8dvfdEm4mkZhLIFXG/o87a8oOATJ7IhTio=; b=KlVmSrHemOFKOLiKcjxDS1Ph7j0/tqP24Ca84qyCE2aJj+dpL1XDtPWXXGJTN5oICKn+ F5+lh2BxmyewYZUGwpex9W4jDICDIJ2SpVC6txpgwr4Ppu4tgL33+OAoIr+NYZI8+tje LTDeH6+Lbj6Yi+K1eFhJL79Wma2cneFfvuA+VfjVrEa9SLU7OnqfxxlbXZ2ZLzjGLvNA sT4Dwm2Np4kqwcp+wfyteU1C5r1C6K1mgz3RgfrCbpqspnv31XphVRGi/32K2+ZjNZUF H2+4CX9obLIX9v+BjOepoj2SKA9gu8XuJj06sepN4WrCii3qSuyO6YE/9//26DAX9NGn 7g== Received: from g9t5008.houston.hpe.com (g9t5008.houston.hpe.com [15.241.48.72]) by mx0b-002e3701.pphosted.com with ESMTP id 3ajt57d67j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Aug 2021 07:09:58 +0000 Received: from G1W8108.americas.hpqcorp.net (g1w8108.austin.hp.com [16.193.72.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5008.houston.hpe.com (Postfix) with ESMTPS id 07F1459; Mon, 23 Aug 2021 07:09:58 +0000 (UTC) Received: from G9W8453.americas.hpqcorp.net (2002:10d8:a0d3::10d8:a0d3) by G1W8108.americas.hpqcorp.net (2002:10c1:483c::10c1:483c) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 23 Aug 2021 07:09:57 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (15.241.52.12) 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:09:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XaGtv/6rnEFwlGjlAdY+BmATmyeDR3p3Kc1Uczvmq5AM8IdUORFSQmH3Zl6Wx605JTuagCTi3gv+lAwJjSJesvpvSjaIXp2E3lKUs7qH/eKQlmpyqE32cWkM6cTK8ARLIPpJTUQjvtTfDo3dSAFqYPa9b5UIVSZ1JsfmiPcvHnb9RfTI6r+E+px2bHLZhSMleSESNHywXldViEs6KbDQQ/MaSuqW+viacjEYR9So6RLTRwJYRbzKQOBLdalPjKitUni5o1smubSapucVBFBmJUBfy9ptlLHqzKV/Hm20yfZfVRqMuPcfFdBatvTLlHy1cT6nUf598DYv0VoIDbU/9A== 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=g7dmEI/SE8dvfdEm4mkZhLIFXG/o87a8oOATJ7IhTio=; b=cO5EmiLmgPP62NtjthCLl3JwymCDCkflae+VynoQNWwp6KLJYfdtSUz5F+cOTg1NGFJiQF/WquG5Bwfp6Odz8OzmbqDyqS5VGULALtqRHYS9Pxm0mYzYLx4aqvLbpdpqIcgWOlr++NNIVWviSkY2v7nfATHnrAq6vb8jjrSu6lXfmQp/5+z2PvjL1ZnEBbsVoOb4cBmrFV4qOaJlWvJWky3JskfPp5+cT2sXgyksgda2duWvwFhYc3LwIAYEEltbP95tQflVbktEIONteyrvLRJ+jeOeu5BIDLXgUIWmoSRCabC5rNmYhwm0F+PKZSAhANfkjig6HVVs2VadxIdYWA== 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:09:56 +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:09:56 +0000 From: "Lin, Gary (HPS OE-Linux)" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Jim Fehlig , Joey Li Subject: [PATCH v3 2/4] OvmfPkg/LockBoxLib: use PcdAcpiS3Enable to detect S3 support Date: Mon, 23 Aug 2021 15:09:23 +0800 Message-ID: <20210823070925.10095-3-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: HK2PR02CA0185.apcprd02.prod.outlook.com (2603:1096:201:21::21) To AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:741f::21) X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (111.240.132.81) by HK2PR02CA0185.apcprd02.prod.outlook.com (2603:1096:201:21::21) 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:09:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f6dcd0ae-3b55-4078-5080-08d96605033a X-MS-TrafficTypeDiagnostic: AT5PR8401MB1106: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:663; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8fF9/ZVG5zdZ9H7dltnjwCUpajXxPoYAnOqlp4jbN3OZsWINfyjB/smBrAZNhpNMu30ncMOt7F2jer6gze/YJ5jfaVIcwbFyZmaVampCjR/0BTmzxQ5Hia/SCZzet6W/Jc/hsuS7WUXnIUtN7I3kgUOfDMHqLd91oVzGe42pM/fMnffXosxZTqcDntDYnbRDCLxaab6xV5z2EUj57Kpy4lzCPBx0cubWbMvK1i0YPovTe/xg0xqaPJyjKjkqRqUFG5n/rV6i9x8WUOJbnow35lxumIv2SDRsCaQH+j0HT4PCcdu0xaMLGydoYHXMghSX2zhpQLBMaByY6Is+Fna++yarZjgGZYfY3LbAgemHgOB3+vMs9XCk/xHydffmMkkWZbza7nm9yUXc9Dho7/kguLiAc1Qe0fRvm/xVQl4uxSvlkrZ/aahBFDbGJFDmFeiaRC+T8kVrTTM0zl2gkSbOIihV/VKJNJxd5dKxowG/+4L/TQgmjVwz6lEoVLDGGly59+8Dbc86ziJ7VFNv1WCeiRLblRPg4KCzD3XvG2IUbg2UqEyjlPVxn9RjRLpvJ/f69ZOnySELHUGJmmIQyDUk3UyvQDWgSV5ln4cZaOnl2pSYb81slObh2aWnISgqPdrAcOPZWdoODFEgMb2yHH9gFDJQ06boBi/TT81HUKd6yDIA3XzLPxmgJh00FKf0qCRifWZ8+z7NoDa+yGswcoraHzUOm2a7bxLDb1kORFR8a24= 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?/6MLd4Q9+aOSdGtd6n1O7t1Jp6jMc4mCqda6jP5c7huhh/4C8kX6f2MRiQiO?= =?us-ascii?Q?v24EHpJpUEhVNLXdZ7vSk5TpJeIW7r4ybowUJuIH3pAnm45CL2oqwsUvlLjr?= =?us-ascii?Q?8E6vrCk7/1o+spZ7cX+2h1fgXe3qo3KYhgNY1bEAHcOv0SqdH466HbpMW7uI?= =?us-ascii?Q?fMHY0kWwCvqXjWj/Qd9MfJwHzchXtrlkMZAFvK91SePFDzXUEEi6D4yJehlS?= =?us-ascii?Q?J1KZmmxpfyYbmoUyr73Ro2CEpt7wA+CzpVpy7hX5c8uiKE7q1yX/wQoNAP8P?= =?us-ascii?Q?Eor59682vDX7eORhVz2nO2zpEFaO6lblHo0h0H/OekABvizM3YLZ+jLVYAjC?= =?us-ascii?Q?MBfs15KrjIN8mdi7LZ9TxI2bKCp0sMxg+VxCPe6S/WUG2/38EZyVjdht/hsg?= =?us-ascii?Q?GjpDjxSTzlu07GqMaw2zZX0JM+1nYwYK9zmbd93WLxKYO/xpwGa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EjllGx?= X-MS-Exchange-CrossTenant-Network-Message-Id: f6dcd0ae-3b55-4078-5080-08d96605033a 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:09:56.5758 (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: z1kRQ/CH9vYQibjxnHMG6Om/HdM4LUTD/efL/pFOi6+Azop2riyBAHbX08MKxdRJ3Z3YVgVbTYGLZGbXRMpIOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR8401MB1106 X-OriginatorOrg: hpe.com X-Proofpoint-ORIG-GUID: _m84WpPyvFF6joBeh1A1pBS9uvvHXNf- X-Proofpoint-GUID: _m84WpPyvFF6joBeh1A1pBS9uvvHXNf- 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 clxscore=1015 malwarescore=0 adultscore=0 spamscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 mlxscore=0 impostorscore=0 mlxlogscore=872 phishscore=0 priorityscore=1501 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 LockBoxLib 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/Library/LockBoxLib/LockBoxDxeLib.inf | 3 +-- OvmfPkg/Library/LockBoxLib/LockBoxDxe.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf b/OvmfPkg/Library= /LockBoxLib/LockBoxDxeLib.inf index 38bcc577084a..9140b1ba9de9 100644 --- a/OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf +++ b/OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf @@ -33,8 +33,6 @@ [LibraryClasses] BaseMemoryLib=0D DebugLib=0D UefiBootServicesTableLib=0D - QemuFwCfgLib=0D - QemuFwCfgS3Lib=0D =0D [Protocols]=0D gEfiLockBoxProtocolGuid ## SOMETIMES_PRODUCES=0D @@ -42,6 +40,7 @@ [Protocols] [Pcd]=0D gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageBase=0D gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageSize=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable=0D =0D [FeaturePcd]=0D gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire=0D diff --git a/OvmfPkg/Library/LockBoxLib/LockBoxDxe.c b/OvmfPkg/Library/Lock= BoxLib/LockBoxDxe.c index b28ad4d2dba7..7dc2eea2395a 100644 --- a/OvmfPkg/Library/LockBoxLib/LockBoxDxe.c +++ b/OvmfPkg/Library/LockBoxLib/LockBoxDxe.c @@ -12,8 +12,6 @@ #include =0D #include =0D #include =0D -#include =0D -#include =0D #include =0D #include =0D =0D @@ -117,7 +115,7 @@ LockBoxDxeLibInitialize ( =0D Status =3D LockBoxLibInitialize ();=0D if (!EFI_ERROR (Status)) {=0D - if (QemuFwCfgS3Enabled ()) {=0D + if (PcdGetBool (PcdAcpiS3Enable)) {=0D //=0D // When S3 enabled, the first driver run with this library linked wi= ll=0D // have this library constructor to install LockBox protocol on the= =0D --=20 2.31.1