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 F40A5D80591 for ; Tue, 26 Mar 2024 17:08:03 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=vgSYy9MizY1M6KOZW2UPdq5RTPbsuKGh88jINqNIcqU=; c=relaxed/simple; d=groups.io; h=Received-SPF:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:NoDisclaimer:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1711472882; v=1; b=mqhrst0O61/FBlzJiMMkwSZBxHwWeYChazZMYx19I3NUZd/izL/RJxLZMcGxwCtipZa/3xEb N7JfMerdYUQ0RWG/GmZtO27gmSUtSLo61FHQW+PRpHXk/FB3pU8lZ3ZHT56ojjttDjTfdxXrvRq AoSrHdOIUh1iHU+z6GtOc7a5pIhlNBY0lrhAHJX1ZPMe9K948BvDs6rCI7ixQUfSeWUlODh7j3o Dbz4oJn3yQ1Yip0At94nbQ8bzr3cQsJnA9vmLTiFEljx6wk81F71DOoVD1thj8YqtNChHqjyDu5 nAc8nuR6uASe/qcd7xRQV7RdaMPhigLL+xWbm5Gyi4rZg== X-Received: by 127.0.0.2 with SMTP id JqIVYY7687511xkTOSQjKfGi; Tue, 26 Mar 2024 10:08:02 -0700 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.74]) by mx.groups.io with SMTP id smtpd.web11.15344.1711472881317283861 for ; Tue, 26 Mar 2024 10:08:01 -0700 X-Received: from AM9P192CA0016.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:21d::21) by VI0PR08MB10848.eurprd08.prod.outlook.com (2603:10a6:800:211::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Tue, 26 Mar 2024 17:07:53 +0000 X-Received: from AM4PEPF00027A6A.eurprd04.prod.outlook.com (2603:10a6:20b:21d:cafe::de) by AM9P192CA0016.outlook.office365.com (2603:10a6:20b:21d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 17:07:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM4PEPF00027A6A.mail.protection.outlook.com (10.167.16.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 17:07:52 +0000 X-Received: ("Tessian outbound 9d16f63426bd:v300"); Tue, 26 Mar 2024 17:07:52 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 52b51c45f15dcd1f X-CR-MTA-TID: 64aa7808 X-Received: from be12a39fb2dc.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4DC9411C-8FC5-44D0-A120-F6946E32E92A.1; Tue, 26 Mar 2024 17:07:46 +0000 X-Received: from EUR02-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id be12a39fb2dc.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 26 Mar 2024 17:07:46 +0000 X-Received: from DB9PR05CA0022.eurprd05.prod.outlook.com (2603:10a6:10:1da::27) by AS4PR08MB7430.eurprd08.prod.outlook.com (2603:10a6:20b:4e2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Tue, 26 Mar 2024 17:07:44 +0000 X-Received: from DU2PEPF00028D13.eurprd03.prod.outlook.com (2603:10a6:10:1da:cafe::1a) by DB9PR05CA0022.outlook.office365.com (2603:10a6:10:1da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Tue, 26 Mar 2024 17:07:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C X-Received: from nebula.arm.com (40.67.248.234) by DU2PEPF00028D13.mail.protection.outlook.com (10.167.242.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 26 Mar 2024 17:07:44 +0000 X-Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 17:07:43 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 26 Mar 2024 17:07:43 +0000 X-Received: from E114225.Arm.com (10.1.196.56) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 26 Mar 2024 17:07:43 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [edk2-devel] [PATCH v1 1/1] ArmVirtPkg: Kvmtool: Fix ACPI/DT boot selection Date: Tue, 26 Mar 2024 17:07:42 +0000 Message-ID: <20240326170742.4480-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU2PEPF00028D13:EE_|AS4PR08MB7430:EE_|AM4PEPF00027A6A:EE_|VI0PR08MB10848:EE_ X-MS-Office365-Filtering-Correlation-Id: 9da96338-36ca-4307-67f0-08dc4db74612 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: JCufpNbesqlavJUGNTHjP+6xUL+ai1FmzaqdGc2SPtJk4CViSNQiQU5CqBKg3B9KasSmRWdmtfEuWUOLMNP92qZH0ZBphm/z6Tg1TtmIxRUMP9CAI9+8J6PfbHCASLozKYyTHh+Z+mlrZK4dKCA7oPykhI+wIiUCh/T+SAnUB+7EEet/3OHZsxLXlV51CUZQ0Gz2u7Qd/U7V2NeGyD1T7xg4bnieKIFVCCBqKKiz7WKI3X0yNiMX0ZuFmC+VRDcf3WQY1MtqNQM63HEzcS/zTaCa8lcoGzj2bmSWjKFI6mjxiLV7PcsxPkTz7H+VXIAY25H7hlyo7p7OmGzHg1Wm46SZOacZRfRaWe7Bt3AplXemornNher+dvH3VsmtQHiCTPLrs4Od7WBzCkScyMpzn0/mqq1hA9zPPQAA2qo5mIihdZM0rh7PHdCCSTbhVAP9P/wgmXg8GxrlNnrDDhKVhx0ksg5EkNT+cbDjpkB4QOusSmSukkRgbKY9P+gcSdQcAB5smtOcWaxHYRKP3z9WpfPgKdJkSnP9V5wsoTIU4slQws3P2mZuorh2o8FSehU0iKqGqDXeNgsE4GcdH+i1Q9ozFA8gNTPxs1ZiURoPnDuPqSNNQNcIzXg0anvBrWLoNtb8zYKmNeajqOw9vljulUIwNiKI15fY9XI4E40YIFejvcLgqWtW+DdrYtHnBbEA749KIhEx8qdx+a7u7WJwUQ== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(1800799015)(36860700004)(82310400014)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB7430 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00027A6A.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 49ccbd18-6abc-44fe-be76-08dc4db740ec X-Microsoft-Antispam-Message-Info: RBIUVNBW447uWsLOKx/F4WeGmWv33lB8bOUKQbH0CeFotN+LPmf7HfoRnnCiKI9vhpwTVXlzJX/zwFLT8YIsls8LrxtXBjsaW8goAzKPF5PLnHrQWjCnyeObUGClXgnG9TvrycZPUeTKj+YRby3XUrNW+3pREez4bLB8prUpGkLGP0lNxvRN8w4qaIlmK2wQg1aydA5kTyoIvnhUgZAUsFw1EDZcM/GaHiZzaEXjDAFHxb8WqJ8tKjwUE253/mEUs0eBEW5iTlfftAZk5mJfxtJivDIpta2xWZAL3AQC9LP3SGYkVHRqvcvWH4klNWPQR7WY2ZEYQrwYbQR07tsUP65Hi5n8FbvP8aJJwE9BBVACgEi0ZVInX4kj6ClBAlyF/L/lqMjPNxZn4T2mgY/UMcBLHsAjBn2biBGdppfI+phjpwuigAsFwnybyjQAmadJF1PenCAfDZs6JeOJ3D0nUAf7VvTcabadhzJvcku4HYkvdQ8R/g/WJg3EgkGpwak9LEZz7KaVPlYJUc0qBjISxDLW4g+cpfgF9aEBlYyxpKvqUMDvGgHIEv3EO0CIx5g/ff51lZvYccrDBgTpKQJmT2muZuDmBYvazu/x4AiPC9CqmMVo6xqT2JDJb1jD6Y0Qcbf2s6DcFBegdhbzsq8tjQb7RC+aWdgU9KE/HIBi6bm54v1xPAcFe23HuStQVY/LZ+fbeq0gfg+BcP6Wu04TdQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 17:07:52.9264 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9da96338-36ca-4307-67f0-08dc4db74612 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00027A6A.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR08MB10848 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 Resent-Date: Tue, 26 Mar 2024 10:08:01 -0700 Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: RO3hQCZlsmCdqDJfh2RWvHLcx7686176AA= Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=mqhrst0O; 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=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none) The Kvmtool guest firmware uses the dynamic HII PCD PcdForceNoAcpi to determine if ACPI tables or the DT must be used for booting an OS. This PcdForceNoAcpi is a BOOLEAN value that can be configured using the variable "ForceNoAcpi" specifing the gOvmfVariableGuid GUID which is "50BEA1E5-A2C5-46E9-9B3A-59596516B00A". However, this feature was not working as the PCD was not defined in the platform DSC file and the DEPEX section in KvmtoolPlatfomDxe.inf was not set correctly. Therefore, fix this issue so that the ACPI/DT boot selection can be done from the UEFI shell as shown below. 1. Check the status of the 'ForceNoAcpi' variable setvar ForceNoAcpi -guid "50BEA1E5-A2C5-46E9-9B3A-59596516B00A" -nv -bs Value 00 indicates ACPI boot Value 01 indicates DT boot 2. Set the boot mode to ACPI setvar ForceNoAcpi -guid "50BEA1E5-A2C5-46E9-9B3A-59596516B00A" -nv -bs =0x00 3. Set the boot mode to DT setvar ForceNoAcpi -guid "50BEA1E5-A2C5-46E9-9B3A-59596516B00A" -nv -bs =0x01 Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Gerd Hoffmann Signed-off-by: Sami Mujawar --- The changes can be seen at: https://github.com/samimujawar/edk2/tree/2954_kvmtool_fix_acpi_dt_selection_v1 ArmVirtPkg/ArmVirtKvmTool.dsc | 14 ++++++++++++++ ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc index 20da3319667900e64755272fa110d57452d1fc67..c3c27b2765b34599c7312026ce5cb9474a22c684 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.dsc +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc @@ -189,6 +189,20 @@ [PcdsPatchableInModule.common] [PcdsDynamicHii] gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|5 + # + # Dynamic Hii PCD to select ACPI/DT boot. + # + # 1. Check the status of the 'ForceNoAcpi' variable + # setvar ForceNoAcpi -guid "50BEA1E5-A2C5-46E9-9B3A-59596516B00A" -nv -bs + # Value 00 indicates ACPI boot + # Value 01 indicates DT boot + # 2. Set the boot mode to ACPI + # setvar ForceNoAcpi -guid "50BEA1E5-A2C5-46E9-9B3A-59596516B00A" -nv -bs =0x00 + # 3. Set the boot mode to DT + # setvar ForceNoAcpi -guid "50BEA1E5-A2C5-46E9-9B3A-59596516B00A" -nv -bs =0x01 + # + gUefiOvmfPkgTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gOvmfVariableGuid|0x0|FALSE|NV,BS + [PcdsDynamicDefault.common] gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum|0x0 gArmTokenSpaceGuid.PcdArmArchTimerIntrNum|0x0 diff --git a/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf b/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf index b0583d52058805aaeece31d7e3776ac498f101ad..508bfa60c2c2cb3f3e7456b010f4e9057437cda8 100644 --- a/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf +++ b/ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf @@ -42,4 +42,4 @@ [Pcd] gUefiOvmfPkgTokenSpaceGuid.PcdForceNoAcpi [Depex] - TRUE + gEfiVariableArchProtocolGuid -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117136): https://edk2.groups.io/g/devel/message/117136 Mute This Topic: https://groups.io/mt/105162199/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-