From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
Sami Mujawar <sami.mujawar@arm.com>
Subject: [PATCH v2 5/6] ArmVirtPkg/Kvmtool: Enable ACPI support
Date: Tue, 11 Jan 2022 17:16:10 +0100 [thread overview]
Message-ID: <20220111161611.957688-6-Pierre.Gondois@arm.com> (raw)
In-Reply-To: <20220111161611.957688-1-Pierre.Gondois@arm.com>
From: Sami Mujawar <sami.mujawar@arm.com>
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=3742
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
---
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) == 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.dsc
index 9d23072d8fa8..1ded9df0fc5d 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -29,6 +29,10 @@ [Defines]
!include ArmVirtPkg/ArmVirt.dsc.inc
+!if $(ARCH) == AARCH64
+!include DynamicTablesPkg/DynamicTables.dsc.inc
+!endif
+
!include MdePkg/MdeLibs.dsc.inc
[LibraryClasses.common]
@@ -71,6 +75,9 @@ [LibraryClasses.common]
PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/Fdt16550SerialPortHookLib.inf
SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
+ HwInfoParserLib|DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf
+ DynamicPlatRepoLib|DynamicTablesPkg/Library/Common/DynamicPlatRepoLib/DynamicPlatRepoLib.inf
+
[LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM]
PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
PlatformHookLib|ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf
@@ -195,9 +202,6 @@ [PcdsDynamicDefault.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|640
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution|480
- ## 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) == AARCH64
+ #
+ # ACPI Support
+ #
+ ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManagerDxe.inf
+!endif
diff --git a/ArmVirtPkg/ArmVirtKvmTool.fdf b/ArmVirtPkg/ArmVirtKvmTool.fdf
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
+!if $(ARCH) == 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)
#
--
2.25.1
next prev parent reply other threads:[~2022-01-11 16:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 16:16 [PATCH v2 0/6] Add ACPI support for Kvmtool PierreGondois
2022-01-11 16:16 ` [PATCH v2 1/6] DynamicTablesPkg: Print specifier macro for CM_OBJECT_ID PierreGondois
2022-01-11 16:16 ` [PATCH v2 2/6] ArmVirtPkg: Add cspell exceptions PierreGondois
2022-01-11 16:16 ` [PATCH v2 3/6] ArmVirtPkg/Kvmtool: Add DSDT ACPI table PierreGondois
2022-01-11 16:16 ` [PATCH v2 4/6] ArmVirtPkg/Kvmtool: Add Configuration Manager PierreGondois
2022-01-11 16:16 ` PierreGondois [this message]
2022-01-11 16:16 ` [PATCH v2 6/6] ArmVirtPkg/Kvmtool: Enable Acpiview PierreGondois
2022-01-12 10:51 ` [PATCH v2 0/6] Add ACPI support for Kvmtool Ard Biesheuvel
2022-01-12 11:16 ` Ard Biesheuvel
2022-01-12 13:42 ` PierreGondois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220111161611.957688-6-Pierre.Gondois@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox