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.33195.1628835229948107976 for ; Thu, 12 Aug 2021 23:13:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=irtAJjEB; 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.143.35, mailfrom: prvs=085980678f=gary.lin@hpe.com) Received: from pps.filterd (m0148664.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17D6Dlww025943; Fri, 13 Aug 2021 06:13:49 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=qBBWi/qL61HkehDNY2ksbCYEdw5Thue6OyNqbbSmEZs=; b=irtAJjEBJ5F26P69SEuLrtKH98lE4swiQw+bY+SY/lYXM5p3G66z9fiVRvcJhwQ1e2aK 7I2qC3zWWFa+a8TNkIM8i1qlrk/UYMN2SlMKeH7DteoppqPZ5xJc0UJvsxyGJ424fxzl 09c5B2shlqfpD4ikMVdTDQQA/8H28oQc8hQCJjyKzX8k6LTm9oYuMQKMmbNyRfOxvEL6 Pw9U4mECwBLJkbgf14eGuFfZ/jyh6HnKMK1vuVn0vOy2iYxHqdHp0/42PAM7cvK/VqaC xvAvckbB8fjrEM1vYt39BE1UcTcOLRC9+LHWF4vNVQY3kpO/oMAq00LehbHVkEWVlz47 VQ== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 3ad15w02n9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Aug 2021 06:13:48 +0000 Received: from G1W8106.americas.hpqcorp.net (g1w8106.austin.hp.com [16.193.72.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3425.houston.hpe.com (Postfix) with ESMTPS id 5E7C58D; Fri, 13 Aug 2021 06:13:48 +0000 (UTC) Received: from G4W9336.americas.hpqcorp.net (16.208.33.86) by G1W8106.americas.hpqcorp.net (16.193.72.61) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 13 Aug 2021 06:13:46 +0000 Received: from G4W10204.americas.hpqcorp.net (2002:10cf:5210::10cf:5210) by G4W9336.americas.hpqcorp.net (2002:10d0:2156::10d0:2156) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 13 Aug 2021 06:13:46 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (15.241.52.13) by G4W10204.americas.hpqcorp.net (16.207.82.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18 via Frontend Transport; Fri, 13 Aug 2021 06:13:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WP1T2Epn3M6rSa4O/eaunKdvYOTJF4hRoqGqm1GDXNUahoy2Xm7XcR3ey79N7nzdpZj0V2xD08QarDaVtVRUmdEVK20BpjezL4HES+47AcTphjSgFci5g55/ghNaVEN5MPzcYksimxJYrPNZNAEP4W2BX/tT0cR6y+F95fnhwG9go2za0MSfPswTkkDSUfcaiQMJwkpa273BBWwIQxtnQ+hC6uZuIleqzoL9r8/JIIuxBEMlXiVN/hCkfZCwKpnOCS2A77MnQgql0tqf+9pywPfyNFD+bJ+mXE4NUULfaAe3YqXbLP49h73JwUfsH5FENZBAZ6mC+HiEvK8ghnEmag== 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=qBBWi/qL61HkehDNY2ksbCYEdw5Thue6OyNqbbSmEZs=; b=kpI0fidbEVtRVQKmMJgc9vdGd1+xNQVQ9ojxmjTw1fZL4GqhLH8VkH2hKntX/7723375N1DibkHzC63BSI7z2tgzCMGaUjpCiOuMRqwX1/mL7GujvMSkh+g4aVvwGAe6wcMC/x1gli9nXZ8SxMK0CLQBdSTx39BPyJ5s4guQxSU8mvLvZdiL38VljKIiagr5z5ScQYsfxud4vljI613PHe4FxO2PI6FmNCl7GgiK7KetZ+aCZACYhFK+rE9yepg2mFszc6ZvZRm7xJBRGDu5/NwtPde0FdzdVKr/vBXFw2jPG7zthBRkc2wYESRobRrEjMginC1HiKpz6QaudbWv5Q== 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:45 +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:45 +0000 From: "Lin, Gary (HPS OE-Linux)" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Jim Fehlig , Joey Li Subject: [PATCH v2 4/5] OvmfPkg/PlatformBootManagerLib: use PcdAcpiS3Enable to detect S3 support Date: Fri, 13 Aug 2021 14:13:04 +0800 Message-ID: <20210813061305.17519-5-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:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8b2df629-ce12-4d82-3934-08d95e218167 X-MS-TrafficTypeDiagnostic: AT5PR8401MB1185: 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: 6JRUUsqVsbKOH4iqkjO2XinR5lI32hFl3fZD8GhJKzgUwFeT5DUikMFzOE7RwGY55U92YUKfmxa1RMYGXsL50ID5x176ATX818LXZlFnEsCWIm3SBDHQ/jXeSlRpZXuZ2sBUZlBAiM6v00Zv/3e41xAbJ18u3NqDCn/ySy6QEcamd4x0nj+DRUj2hx6V82cas1D5hkFb9iZOD3aNKwNfBdI9sEc9tv0eAPB+vD1a14iVMhDY4ssxc/t8OkNXBDSYn73575c8qT68Lz2hoWK2S33CdAuGLyouxBbVQxnENcPDfvoIQOkhlJ/d5Hm45WCWMuK9l1GSXUVNfsWcMOVfrwMV9xzjuyei25QzsKHiw3JvR9YvYQDbkhFcrXeSPuo0tUWyl0OKg5HSW5yxAC5HIzoNfLSXreXt35uemJj0Id/5/wgrd+hhMJ9EcZHG9fEFAbQXTUXXJrgom7RATwCnvmsq0Cby5E5Dpq8CpAqs53vnqIViCI1x1Z3mWlWoHLiGK6aZC992Lb5mmX9I/lS2CH5wEvXV4Lo2+NXlnCna0q2Ej+M2rRhBcRhWZnvlopzp8kIyE+Y1j/O9HG00jQnJXo+A/A2ieyBgjSN/VXy5R3Jx4lobRtGQp/eb0a04RRU+8w6XNrVchmPbFmKGMFqUcA== 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?NK+FHvuACywbF3qbEEzNUprRaVHIsnYF4Nyx5V6snC3MEdGsQ6wm8zldMUod?= =?us-ascii?Q?ZUlS68xwJldjLu3PRXoQZ8xOEs3L3ELzdK551YI5c5/LBrJA22Os4cLUplC9?= =?us-ascii?Q?xVNgXxQxdc18C/29SDpTej9lByPXH8B257jYGFkCcHGtLOW2mWJYVLN4wEkt?= =?us-ascii?Q?Z7gGxB3OVIdVTXsrPPcrr7vWG+0kz1EQJUJDnNvgxEaJmKdRZM+wYTOH0rn4?= =?us-ascii?Q?N7v3XKbm+e79kPTXrrYRlupJGs+GdHGjV5IqValSwEFzeBfA83+QrUgGmdWP?= =?us-ascii?Q?op2b1niLLziPE2H330O73XZppk8RfeBqv4EJaKaUGrZK+lxXW8utdOUfkH+c?= =?us-ascii?Q?9ErSwx5wyyj2P6igr2GjXf+Uj832teR9S9HyfaBTUHvhv193TehQaapgHms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g7oDrLoZjhX3VAB6QI5gdpewC/nAq2cg?= =?us-ascii?Q?pmx9icKhctyCJnGDSmp6ldS/?= X-MS-Exchange-CrossTenant-Network-Message-Id: 8b2df629-ce12-4d82-3934-08d95e218167 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:44.8902 (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: KEuSoiCManpf+p3QUsaV0Vpl/W9kJN6WdVFqXiFARKryCtIiVWWPZ7hm1f2YUW/Y5r5ZmCnReysXY4Mo23radw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR8401MB1185 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: x8vBFSEYaiZ6wt8THjq9HKAfuMjEPd2j X-Proofpoint-ORIG-GUID: x8vBFSEYaiZ6wt8THjq9HKAfuMjEPd2j 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 lowpriorityscore=0 clxscore=1015 bulkscore=0 impostorscore=0 phishscore=0 spamscore=0 mlxlogscore=824 suspectscore=0 malwarescore=0 mlxscore=0 adultscore=1 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 PlatformBootManagerLib 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 --- .../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