From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id A2F96D808CC for ; Wed, 16 Aug 2023 20:13:10 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=YOuipNlroKhS/HggonxOQQTFxrcahx35NqALC/q0r/A=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1692216789; v=1; b=PJrpyhPrtPFmW54kR4QiyzvkK9KC7Xtlz47MXgiiEQyGUCWqMOQY8J8N7jzKUnxjbZSuiDTj eKyoOfaPnnY1FpSzszdtM/UcfMwgkZW047f41W+e3+cBlFFNBvchVVxiCN1OZcUm1+6OuG9MDgd 6H8bx5TW++kKHpBT9CckGbj4= X-Received: by 127.0.0.2 with SMTP id sWNrYY7687511xvav7LRWMcn; Wed, 16 Aug 2023 13:13:09 -0700 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.68]) by mx.groups.io with SMTP id smtpd.web11.170915.1692216788522019490 for ; Wed, 16 Aug 2023 13:13:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kM5LqGtqoOYqPywM46T0DmhNeQcpihX/ipsZS48T3y75R7B6ccwwQPI+y4YRKdViUProP8G1ffvFDwZetvoKYLtGSlD1YgUMaGWiss5nU1/3VOy3HxHoszSYWsvacih1Qh0LgQlrsK4P2HXk++aoLaFyVi7gEhxmB1PZOrMw3uZx0R6ZIHmXCdannKBzSM4+lFR6kZka4NeF+xucu8hLoYn3nyhWfw97H7OZyeLWoz8qIz39ormgb6U6R6Vi5vHlMxlKk+EBiMvpsnGvE3tQDx1m4TdQNCIsnrXOV9vUj/U4M4u50NS+tIuWNyjW0t79+HuPSAWlBU1fH0upiQ5O9A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5fmSEPfDfunHN1vtstpvW6CaqGoJsoGjCj11A/RICFg=; b=QZHtxRuWT4TSb+KeOX6NQsBnL0HFRmMk17C9dNRJGCO8Ygj0M6VVTgYpxey9Me89kcnWLTEeEARmiIYfN5HGHbYDC6SP+LxTQzcZgnotXfDpT4jPOwElWITntSPTZTL/EaWgDGRje0rdSVG7+5dUx4uNxLVNvNGBUca+vk5YshusV+ZkVY3sZ3OTOrqKmk5IfkOnZkoQJU1/Q05BYc75NTSrcqO5PRjw3uL4W5XPrj3ZDNacbBbbRTr/ysMV0Lqot8Hio7wzeuddEJivIU/4wM+mU4wkx6XmySPWvKNtsT4QhaFrpDSGGAO2pzCw4EoknunISMCJv0ZYEph+2g3LYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from CH2PR16CA0005.namprd16.prod.outlook.com (2603:10b6:610:50::15) by CH2PR12MB4117.namprd12.prod.outlook.com (2603:10b6:610:ae::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.29; Wed, 16 Aug 2023 20:13:06 +0000 X-Received: from SN1PEPF0002636A.namprd02.prod.outlook.com (2603:10b6:610:50:cafe::9a) by CH2PR16CA0005.outlook.office365.com (2603:10b6:610:50::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.33 via Frontend Transport; Wed, 16 Aug 2023 20:13:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002636A.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6699.14 via Frontend Transport; Wed, 16 Aug 2023 20:13:05 +0000 X-Received: from localhost (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 16 Aug 2023 15:12:45 -0500 From: "Roth, Michael via groups.io" To: CC: Gerd Hoffmann , Ray Ni , Erdem Aktas , James Bottomley , Jiewen Yao , Min Xu , Tom Lendacky Subject: [edk2-devel] [PATCH 1/2] OvmfPkg/AmdSev: fix BdsPlatform.c assertion failure during boot Date: Wed, 16 Aug 2023 15:11:45 -0500 Message-ID: <20230816201146.1634348-2-michael.roth@amd.com> In-Reply-To: <20230816201146.1634348-1-michael.roth@amd.com> References: <20230816201146.1634348-1-michael.roth@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636A:EE_|CH2PR12MB4117:EE_ X-MS-Office365-Filtering-Correlation-Id: dccd2163-edf7-4e09-3162-08db9e9533da X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: Pe3Xl796RCipSYTKmD1a7AfaXHKZ25bP+BoYL7MhqLDFjQXOjC5Thvks0ia4++wQ7bWW8ggFnCrmKrAAaKY8VCt0zW2cqSTC1IzEToJvc/0lmnj9VQ5RNZ669u5xeJ5hG7efzgxbyuspqh9YUHLzbt48QBOeiPWRu9esWdkXaR1thrFlDGBXrYzzyjrMUpUUkBzkq4l6437Y8mlNCgInEx57pIRstAA6BvJwT+abYVqSKZjnTN+y2FBKIC3LS/odAp5eyKoJcHBlS8GfKFDYQVB2mA+NiqFOpxbCCJ/4MGXXlVNae8UMQZNzpqCW6AGCq6FlJiTZSLckEXWo/CKAI5dhlT62xRrm2OPiXfamOWminLgORjyJf6OjUWx4agGQx6Yc/BILgdyBjdp+OPrMWdT2lp3zxdV4IM1R07gqDihia5tsqAcF++4X5NYdq+cs3FYJXKhUrhYbzBt1kbFKrOOHbEK4Q32Sm4KKwgKjpGzfusEN7+ZcEbA0yiClQI6i61yb5pq28kIu0gLCDyUD8AvR1RavPfQ4lnrzLIrrmjxlcvUJoiUM1AZd0ONgVn18raCiMPEcHta5tjocN4o3lFRM/zZAfCvWdQiBV3inxzAmERqfC0ZRlPBdphd78bfjQJQ/OjGNOjd19XllUtUbn+O7Cb5UQy3JLQWmMevJzEXqNgjJbOnPUv5Jegnj68AfdFDmVmY3+jOgNjSUDHXiSQ6yhCgcs/F6WHfcnK2dYxocA0Pr0Difr2sfTBHR5m+m8OvXhSjgP0sS/9g/AXiyiQ== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2023 20:13:05.9685 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dccd2163-edf7-4e09-3162-08db9e9533da X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4117 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,Michael.Roth@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: IMeNq16dWyytpDLkrVkWPfzgx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=PJrpyhPr; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") Booting an SEV guest with AmdSev OVMF package currently triggers the following assertion with QEMU: InstallQemuFwCfgTables: installed 7 tables PcRtc: Write 0x20 to CMOS location 0x32 [Variable]END_OF_DXE is signaled Initialize variable error flag (FF) ASSERT_EFI_ERROR (Status =3D Not Found) ASSERT [BdsDxe] /home/VT_BUILD/ovmf/OvmfPkg/Library/PlatformBootManagerLi= b/BdsPlatform.c(1711): !(((INTN)(RETURN_STATUS)(Status)) < 0) This seems to be due to commit 81dc0d8b4c, which switched to using PlatformBootManagerLib instead of PlatformBootManagerLibGrub. That pulls in a dependency on gEfiS3SaveStateProtocolGuid provider being available (which is asserted for in BdsPlatform.c:PlatformBootManagerBeforeConsole()/SaveS3BootScript()), but the libraries that provide it aren't currently included in the build. Add them similarly to what's done for OvmfPkg. Fixes: 81dc0d8b4c ("OvmfPkg/AmdSev: stop using PlatformBootManagerLibGrub") Cc: Gerd Hoffmann Cc: Ray Ni Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Min Xu Cc: Tom Lendacky Signed-off-by: Michael Roth --- OvmfPkg/AmdSev/AmdSevX64.dsc | 3 +++ OvmfPkg/AmdSev/AmdSevX64.fdf | 2 ++ 2 files changed, 5 insertions(+) diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc index 2c6ed7c974..f43300a95e 100644 --- a/OvmfPkg/AmdSev/AmdSevX64.dsc +++ b/OvmfPkg/AmdSev/AmdSevX64.dsc @@ -200,6 +200,7 @@ =20 SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib= /BaseOrderedCollectionRedBlackTreeLib.inf + S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScrip= tLib.inf =20 !include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc =20 @@ -709,6 +710,8 @@ # MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf + MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf + MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.= inf MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsRes= ourceTableDxe.inf =20 # diff --git a/OvmfPkg/AmdSev/AmdSevX64.fdf b/OvmfPkg/AmdSev/AmdSevX64.fdf index 463bd3e9ef..b2ab0c7773 100644 --- a/OvmfPkg/AmdSev/AmdSevX64.fdf +++ b/OvmfPkg/AmdSev/AmdSevX64.fdf @@ -270,6 +270,8 @@ INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf =20 INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf +INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf +INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorD= xe.inf INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphics= ResourceTableDxe.inf =20 INF FatPkg/EnhancedFatDxe/Fat.inf --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107806): https://edk2.groups.io/g/devel/message/107806 Mute This Topic: https://groups.io/mt/100787519/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-