From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.9761.1641917787139949166 for ; Tue, 11 Jan 2022 08:16:27 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CC77EED1; Tue, 11 Jan 2022 08:16:26 -0800 (PST) Received: from e126645.arm.com (unknown [10.57.67.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C04E13F774; Tue, 11 Jan 2022 08:16:25 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [PATCH v2 5/6] ArmVirtPkg/Kvmtool: Enable ACPI support Date: Tue, 11 Jan 2022 17:16:10 +0100 Message-Id: <20220111161611.957688-6-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220111161611.957688-1-Pierre.Gondois@arm.com> References: <20220111161611.957688-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sami Mujawar A Configuration Manager that uses the Dynamic Tables framework to generate ACPI tables for Kvmtool Guests has been provided. This Configuration Manager uses the FdtHwInfoParser module to parse the Kvmtool Device Tree and generate the required Configuration Manager objects for generating the ACPI tables. Therefore, enable ACPI table generation for Kvmtool. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3742 Signed-off-by: Sami Mujawar Signed-off-by: Pierre Gondois --- Notes: v2: - Remove Pcds that are redefined to their default value, and modules already included in ArmVirtPkg/ArmVirt.dsc.inc [Laszlo] - Use guards as '!if $(ARCH) =3D=3D AARCH64' to conditionnaly generate ACPI tables. This allows to prevent the 32bits ARM/ACPI combination without restricting the DynamicTablesPkg to AARCH64. This means that KvmTool on ARM will use the DT. Not adding Laszlo's Acked-by since this is not exactly what was suggested. [Laszlo/Pierre] ArmVirtPkg/ArmVirtKvmTool.dsc | 17 ++++++++++++++--- ArmVirtPkg/ArmVirtKvmTool.fdf | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.ds= c index 9d23072d8fa8..1ded9df0fc5d 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.dsc +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc @@ -29,6 +29,10 @@ [Defines] =20 !include ArmVirtPkg/ArmVirt.dsc.inc =20 +!if $(ARCH) =3D=3D AARCH64 +!include DynamicTablesPkg/DynamicTables.dsc.inc +!endif + !include MdePkg/MdeLibs.dsc.inc =20 [LibraryClasses.common] @@ -71,6 +75,9 @@ [LibraryClasses.common] PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550S= erialPortHookLib.inf SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPo= rtLib16550.inf =20 + HwInfoParserLib|DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoP= arserLib.inf + DynamicPlatRepoLib|DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/= DynamicPlatRepoLib.inf + [LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClass= es.common.PEIM] PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt1= 6550SerialPortHookLib.inf @@ -195,9 +202,6 @@ [PcdsDynamicDefault.common] gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640 gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480 =20 - ## Force DTB - gArmVirtTokenSpaceGuid.PcdForceNoAcpi|TRUE - # Setup Flash storage variables gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x40000 @@ -353,3 +357,10 @@ [Components.common] } OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf OvmfPkg/Virtio10Dxe/Virtio10.inf + +!if $(ARCH) =3D=3D AARCH64 + # + # ACPI Support + # + ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf +!endif diff --git a/ArmVirtPkg/ArmVirtKvmTool.fdf b/ArmVirtPkg/ArmVirtKvmTool.fd= f index 14a5fce43a09..9e006e83ee5c 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.fdf +++ b/ArmVirtPkg/ArmVirtKvmTool.fdf @@ -1,5 +1,5 @@ # -# Copyright (c) 2018 - 2021, ARM Limited. All rights reserved. +# Copyright (c) 2018 - 2022, ARM Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -201,6 +201,19 @@ [FV.FvMain] INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf INF OvmfPkg/Virtio10Dxe/Virtio10.inf =20 +!if $(ARCH) =3D=3D AARCH64 + # + # ACPI Support + # + INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf + # + # Dynamic Table fdf + # + !include DynamicTablesPkg/DynamicTables.fdf.inc + + INF ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf +!endif + # # TianoCore logo (splash screen) # --=20 2.25.1