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.web09.33185.1628835222833938984 for ; Thu, 12 Aug 2021 23:13:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=lPjE+G6H; 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 (m0134421.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17D6DDK6011189; Fri, 13 Aug 2021 06:13:42 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=f8/ordlpUanLZE+X+lRMNvFTizj27QYH+7UMxxyVVUo=; b=lPjE+G6HJgqX3kqS7apbLlidbvAV8SNBD46whLRZ31Tb5lsc2kuhYn9Kl/vF1yq28cS8 FRoaxVRXVTmIgqooElroGXAgD9uPyb/YcU9wgOsJReYSUg+5PhK0PThl++kwdTLrhLVV IBC7cXx/0u1UguUqd3KSR0dVjRyoQ9lMVKBmdWJqDRGNUAaYQQD50V4SmFYobnjyPLf7 cGIgrld9eFTvQQzvxlvNPr+h/JSX05yX8D9IqOb15NQe9ijmXIowIqleaUIKpedQ5/VL j7C8xEST4qxatU3w7WT/vx4Bhb1idoUjZPMINJPGO3WghQ5kJx7o6cf1sYsmUYgzuKMA dA== Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0b-002e3701.pphosted.com with ESMTP id 3adhef8pd5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Aug 2021 06:13:41 +0000 Received: from G4W10205.americas.hpqcorp.net (g4w10205.houston.hpecorp.net [16.207.82.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2353.austin.hpe.com (Postfix) with ESMTPS id 2B5EB65; Fri, 13 Aug 2021 06:13:41 +0000 (UTC) Received: from G9W9210.americas.hpqcorp.net (2002:10dc:429b::10dc:429b) by G4W10205.americas.hpqcorp.net (2002:10cf:520f::10cf:520f) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 13 Aug 2021 06:13:40 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (15.241.52.10) by G9W9210.americas.hpqcorp.net (16.220.66.155) with Microsoft SMTP Server (TLS) id 15.0.1497.18 via Frontend Transport; Fri, 13 Aug 2021 06:13:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XkxhhDyZoEnn2k1SmkyOAQjLlqcsKUJLG0iov+YyLGrSwV1dB33AqN1X4YjUgrqlzSP11r+rzs1dQj5bUXac3Mx0A2oixQfvi5H6skveIm+aKOS7nbwrGChOzKb68TGwSH0p6NQR47z+a4pmyQ5S4xgcPRmRyPZpC7MSjDZBKJOkoLVy11q5i4tcRStufVD9REtyrbq3Pl81vxAbuxGi0uZUKYspUuuAIcyoPLqq60bPYWalW5FUv0v/DTapS5SEvjqD70+w9lEKB0toW3VZlF5+xbPgExVdU/bJOz1obSSslWM8BNtN/sZn0/2rtglvRhkt9KLsCXs1HRoIo003eg== 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=f8/ordlpUanLZE+X+lRMNvFTizj27QYH+7UMxxyVVUo=; b=j4GnLU3sSWoNgxbfY2vuvahoPWX9Qkn8wyQlhjkY0lcgUbAlsj2Pp+AOSNN+EbeIb5dIEVYL/+9haUzoaxIq5u79Mhpb7S71AK73xBBeMkE9SdPbW4PEcP2o4Dfcy7DN6xyekocYA5t0noJLnQnsuWI9dOyQygibBsVnn/AiRXv2DLYZPnp8mhJ/esBlohFpzar/6ILpZV4+0LfuHjD4nk2Nyc6SlgMiKEy04pEwlp25zzfeD1hV05VnNDmDe27qJLZhLiNxMgr/VUU+kMYa/1iZaXzUdw+A56rbbhKfA0pYuhqp0AqhDUUgbS0IAn7Qugw3PQmJPlQeYOmPhC7aKg== 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:40 +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:39 +0000 From: "Lin, Gary (HPS OE-Linux)" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Jim Fehlig , Joey Li Subject: [PATCH v2 3/5] OvmfPkg/LockBoxLib: use PcdAcpiS3Enable to detect S3 support Date: Fri, 13 Aug 2021 14:13:03 +0800 Message-ID: <20210813061305.17519-4-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: HK2PR02CA0222.apcprd02.prod.outlook.com (2603:1096:201:20::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 HK2PR02CA0222.apcprd02.prod.outlook.com (2603:1096:201:20::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14 via Frontend Transport; Fri, 13 Aug 2021 06:13:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0974cb75-b555-4b77-d272-08d95e217e66 X-MS-TrafficTypeDiagnostic: AT5PR8401MB1185: 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: ye6JXpDhnBcF3EXihk7AaRGleNQ/NLvWxJSUPf6qw6bO5RYM/l5lMVkWpnEnZRfo5+jGxLw9hDd5Fx69JiVOX4OvOv0R5nc6Bd9dPwamwzvB9t5yrrp5I9sMU/CIOPA2V0Vp8ihOH34T4pDJXoNqJh5mIT4VFp678C/dYxNO+j2ZddpyKAoo5zNFKhPejNbPNc9nBsT7Xkvf7eH39rCgm1n11OrUnzZIHLFBcJVkiX3xHEh1HVBzfNIQt+v5hmmTpGHiFNw2quNWhNmCFsaE1Cm0FUqVnmhFu946TO1pOin7tuWom9UCPHG1LLRbIALQ+JW1nIqx4x1mVkeGCnkGAGI2B7bpN2lcJzIMv4vI3pw9N/SF0gO8CQjUwZLQ3zOzESdeG0R1c7IpJ5CBdN22YSCiE3ObQfQ4VrGOlSHxvPdw92T9dFX7aaQd9zv2Q2DKd8udirR0lZ3xIgiH06EdLMY+6ureohcikjUMBxkCgLQMvnB4dgQotgEWW4cURh3pQbQ+4o5Hut8PE9gy8pdOwptVCMD8p/n6Q9seotGFLFgLRJb1axh8t6gSLd6nyS/yCpdTT+vEVErdLBZkwD75vCvZ+xZDgXbrm4mnKH8HFymayWbxY1xNgbIv+Ezm0ivtrt+lAXhgNlQEU3Dk2k10Xg== 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?e2b9A3WXEkUy7exLF7HktLWJcTezVH7C5dj18E/lAq8TfoSCsxibDa0p0XjZ?= =?us-ascii?Q?7Ow6CPYEMZuGOQiyV/Bt2PUVkAjEnXS7Chq0F3Oi0wMxa3R8jbwh9apEXmp/?= =?us-ascii?Q?iNhJbrhYSEZDfsnqVV5SL18R4DKJsw4Zz/SRYpnnaS6Bc6qVYt/KaS18Qqc1?= =?us-ascii?Q?nnr3Zoxlwq1D68fdp72QUOw+tNq6ljAIy0/LFIAHN1OL6lNKlQRiYAjK+grv?= =?us-ascii?Q?6aW8VpVzY7eQLxjSf7wn2TPLyh6M1VvLRCOot4cEai8XCkBO9T7zCTe1eJno?= =?us-ascii?Q?VoFqysIeVPoE41guKaKSubM2oGufL2Su1ddmh/0StRdiTTNOz4pLdDgpLIb5?= =?us-ascii?Q?oDCXo1phhNV8IirSk5Cj9e2L6Dg2RhQi2nYphFAC/xJjEH35ltS+nHHuQF8Z?= =?us-ascii?Q?bDrfTfwiARCWd4zGOt2g0cFIuKcXpWTCysOMKkbYZvrkdcTkVElEGnfC7zAn?= =?us-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enant-Network-Message-Id: 0974cb75-b555-4b77-d272-08d95e217e66 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:39.8454 (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: J5Gepf5igVK3vYBURVdLl7JXLgdOFybvWx5pt2pIO7s7I1ON1tZQ+m1UxmK/ymu2Yl7Uusm/bvee9m/Xk6tdxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR8401MB1185 X-OriginatorOrg: hpe.com X-Proofpoint-ORIG-GUID: 8n56Ca5a03EEM87gsVcZ8DwXwPMYdghk X-Proofpoint-GUID: 8n56Ca5a03EEM87gsVcZ8DwXwPMYdghk 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 suspectscore=0 mlxscore=0 priorityscore=1501 malwarescore=0 spamscore=0 phishscore=0 mlxlogscore=593 bulkscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108130039 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain To avoid the potential inconsistency between PcdAcpiS3Enable and QemuFwCfgS3Enabled(), this commit modifies LockBoxLib 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/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