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.20532.1629702611205024974 for ; Mon, 23 Aug 2021 00:10:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=EfR8Z6/J; 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 (m0134423.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17N73Y0H028739; Mon, 23 Aug 2021 07:10:10 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=lEClfpZoyD0wUko2aGNUczw79D4K/8oVLObQolLLRA4=; b=EfR8Z6/JGw20JO36q0LlyfJqLJpSa8KN6MKwgdCZAIEaKy0hvbIjylOeyfZR3399nUUO wc9GJNKZXtm0+hc63qRhOu3138PEIOkeC61yPC4vFCreFCcajQaXvc6lS6GPO6GQEhro PuQrlK9t+EVnigwudjZAa3GBVV8BW9pJvVJpHSFZUtJfZLyyCTExdjHixVOfGsa5zXB5 KO7UktHdcSEBawIBWg8Iq0MfoYgF6fqhaq2lS0pexcimWttneMeEhAhRkj6txGvYL2Ee TOUX7Sx0Luz/j41ONRd54iDJZhRjNuA06+xLI+QbzBQcin0bFCMnL/m0TCwZvlie1L9F 1A== Received: from g4t3427.houston.hpe.com (g4t3427.houston.hpe.com [15.241.140.73]) by mx0b-002e3701.pphosted.com with ESMTP id 3ajq0ep0aq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Aug 2021 07:10:10 +0000 Received: from G9W8455.americas.hpqcorp.net (g9w8455.houston.hp.com [16.216.161.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3427.houston.hpe.com (Postfix) with ESMTPS id 7118583; Mon, 23 Aug 2021 07:10:09 +0000 (UTC) Received: from G4W9120.americas.hpqcorp.net (2002:10d2:150f::10d2:150f) by G9W8455.americas.hpqcorp.net (2002:10d8:a15e::10d8:a15e) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 23 Aug 2021 07:10:09 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (15.241.52.12) by G4W9120.americas.hpqcorp.net (16.210.21.15) with Microsoft SMTP Server (TLS) id 15.0.1497.18 via Frontend Transport; Mon, 23 Aug 2021 07:10:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iXIaA2C6CQA4gGCxHdHmcPghcHuVOs8M/YoIwYyAfuQN7yatNp+KPV7H6xxkrVMMBLeeLsp+GPeofyXwPdU0mq+p7AdPV8i0vd2tnS/5p//4BSP1WESWr1w2E0oLb0zZnvKkjbfxom8nXJjkB6HTJ0r3AMwtNBwwjcOZtApGjwhf7NorL9AIbATMC1luCt6vf9xPFHL0WvJgKOYMmE03oko9BcAQnkl1aXY2i0Eq3cU1PwxtRQ8yyUddWIYta6o1guaqx7lTuaupvBr2X1/Io2J1cvvMWZgPnIurCG1IAa97Bs3nmlkkOfP6iZPjP4GcqJhOUV/fvRD57FTO1pNXqQ== 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=lEClfpZoyD0wUko2aGNUczw79D4K/8oVLObQolLLRA4=; b=VWe4CWGEls4yyLLnRl7arQaBt0oXO+Wgr+v4SiOVUytpRARJoZ39G/ReURw9dq2KnChN7RTiEB2nbB7ST/oxA8aiDQ0X4maaCe1Y2ImRIMxVD9h+EcmQ5j4AuG4/vla5mTU3ETdp7ibmHQofOzr+vB19ORjvMKohlFxo6qD1Xg8uT9DzDM0Yk/Flbh2RZSCPBoGtG20+HtSJHNuLFCz4AFSVg3qad9Rhzk7Px7RCOuh0kGjV5rH/gvE33eGhp7oFMAKC8kO5K/vfZ+JI7wGpJzM9bkrYZ2ERqz2Lp004zj295vHvhaz64P6lDo45RhX1sa9rXtFWMaScvDXnsa6u2A== 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:08 +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:08 +0000 From: "Lin, Gary (HPS OE-Linux)" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Jim Fehlig , Joey Li Subject: [PATCH v3 3/4] OvmfPkg/PlatformBootManagerLib: use PcdAcpiS3Enable to detect S3 support Date: Mon, 23 Aug 2021 15:09:24 +0800 Message-ID: <20210823070925.10095-4-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: HK2PR02CA0175.apcprd02.prod.outlook.com (2603:1096:201:21::11) To AT5PR8401MB0387.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:741f::21) X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (111.240.132.81) by HK2PR02CA0175.apcprd02.prod.outlook.com (2603:1096:201:21::11) 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:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a13fcddf-1a3f-44d2-0cf0-08d966050a29 X-MS-TrafficTypeDiagnostic: AT5PR8401MB1106: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:843; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dEs/tZYF6l37/5bt4sYbBOo02tJOMWySUr6ZiwaMQfdeasjxlkeHKMOqSU10MbLuooVsR3byyE5XOSbfeJ3AqzEjZRhOCyA8b14cJDXti5MHMT43qe3ETWHyzHqslbaIPS3bT+dEWmtJCMRA4al8fitt705Ci5mGHu42g3OLkU52gr4SLXd0AeB8JpQsL8wgMFyuWZY4D7T5uCzTXeYL9631KPVzPFRzLkrMdYFlYRDAiLIAOlcftEDB0Hbl8W21qDEw+KF4wReaErV+L7prRS6PDPtan9wAH6OQYrOLIf1F4imABSnEfNseMPY27YsZhGbDIUJforeuqqth3Cwg9vxSOok+LXEk1y93Q6T81OcXnxK0D9snUijohTy+oRkMdlmo/FiG7wOkRiiSHL+PravETWBYj+DzcrBdb3qLb3sutPNNS+jI8bjkMuSn2V2wRwLSa+ci846v6r6jeTh+IMTyqGkGTM+isvbCmNZN4aPBAncvqHmGGUKlw+Mbpac7S1pCPBpUfYGAqT3OI3jL3kXHllU2Aqsf44DQDUp5rZ6oYDYMEiiEmgxyBD0MEW5w+0HZ6DpbT0t3XM8Q686+IYiBUWgEPe8XdF6ZQbFAfz0mlL2dUzgcBAjtzNqtLmkWpRD3UMwf7BjxeMqC3U2kPj38KlhuXJhOLtqdLAc0YHsytUpDZZ5kD6Kmu+tEOvSprBqTU0xeAQ867UQjqwc0jpaiwJ3P4g/4t57GvziP5cI= 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?lBhJI1miVZVV9diP0452vwsvGGDVdjOZFrQFCxMl59mqkd8wpFfd5B67F1vo?= =?us-ascii?Q?bqQLTcC0zln1s5hhU8HKYhGFtKwmKFmkXIqBhhqYpr/RIAPnCiVzg7pXLgqk?= =?us-ascii?Q?XysJDr7LVZDScyE9tZdAjw2TuoBuzekN9WLkKMJitPrVO7wHKnYXOYT/jZdo?= =?us-ascii?Q?xWhAiotETutXIzYk72+VPyMJawpXBSdDzA2P8vKzG7cTfux/lef06+lDzexP?= =?us-ascii?Q?Rd1y6a+PsCY2a+9poC7/jpriOwLWU98uATFvJFTQq3Gsx1+HmqnkEOyIGZMk?= =?us-ascii?Q?nBseWQpXiYOK9xWtuHMwT91xDll6fmeg3Y/nWnqcmkYFVrOMiGw2cFDKF6IC?= =?us-ascii?Q?tRGN/mtjrK20zm9RzUc/+YYa6RqW5rXhFxYdYhHw9IrekNm88YtcntkuS4af?= =?us-ascii?Q?g0sC6n3wTyG1fcQBkas6RBIoY7II9FggzIdqqs47//uS+ee9tovtOBOCXOMQ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S-Exchange-CrossTenant-Network-Message-Id: a13fcddf-1a3f-44d2-0cf0-08d966050a29 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:08.2187 (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: lqFncww//JKFMwMV+3ZtZhS1iDjsdlx+eSk4856s2Dk48Hm+1b4FTyIVOtFrmpAqS7NaDKYVRp7K07rX/tyekw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR8401MB1106 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: b77iiAEiM-xECW5moLvp0ehiBV3J5ZBw X-Proofpoint-ORIG-GUID: b77iiAEiM-xECW5moLvp0ehiBV3J5ZBw 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 mlxlogscore=929 spamscore=0 bulkscore=0 phishscore=0 clxscore=1015 malwarescore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 mlxscore=0 impostorscore=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 PlatformBootManagerLib 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 --- .../Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 + OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.= inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index e470b9a6a3e5..c249a3cf1e35 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -61,6 +61,7 @@ [Pcd] gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent=0D gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable=0D gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable=0D gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut=0D gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate ## CONSUMES=0D gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits ## CONSUMES=0D diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg= /Library/PlatformBootManagerLib/BdsPlatform.c index b0e97429372b..71f63b244828 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -379,7 +379,7 @@ PlatformBootManagerBeforeConsole ( //=0D EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);=0D =0D - if (QemuFwCfgS3Enabled ()) {=0D + if (PcdGetBool (PcdAcpiS3Enable)) {=0D //=0D // Save the boot script too. Note that this will require us to emit th= e=0D // DxeSmmReadyToLock event just below, which in turn locks down SMM.=0D --=20 2.31.1