[edk2-devel] [PATCH 11/43] OvmfPkg/XenAcpiPlatformDxe: create from AcpiPlatformDxe
Laszlo Ersek
lersek at redhat.com
Wed May 26 20:14:14 UTC 2021
Create an almost verbatim copy of the
"OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf" driver for the OvmfXen
platform. We're going to trim the driver in subsequent patches.
Ultimately, the XenAcpiPlatformDxe driver will duplicate a negligible
amount of code that is currently present in the QemuFwCfgAcpiPlatformDxe
driver.
List the new driver in "Maintainers.txt", in the "OvmfPkg: Xen-related
modules" section.
Switch the OvmfXen platform to the new driver at once.
This patch should be reviewed with "git show --find-copies-harder".
Cc: Andrew Fish <afish at apple.com>
Cc: Anthony Perard <anthony.perard at citrix.com>
Cc: Ard Biesheuvel <ardb+tianocore at kernel.org>
Cc: Jordan Justen <jordan.l.justen at intel.com>
Cc: Julien Grall <julien at xen.org>
Cc: Leif Lindholm <leif at nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney at intel.com>
Cc: Philippe Mathieu-Daudé <philmd at redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122
Signed-off-by: Laszlo Ersek <lersek at redhat.com>
---
OvmfPkg/OvmfXen.dsc | 2 +-
OvmfPkg/OvmfXen.fdf | 2 +-
OvmfPkg/{AcpiPlatformDxe/AcpiPlatformDxe.inf => XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf} | 7 ++++---
Maintainers.txt | 1 +
OvmfPkg/{AcpiPlatformDxe => XenAcpiPlatformDxe}/AcpiPlatform.h | 3 ++-
OvmfPkg/{AcpiPlatformDxe => XenAcpiPlatformDxe}/AcpiPlatform.c | 3 ++-
OvmfPkg/{AcpiPlatformDxe => XenAcpiPlatformDxe}/BootScript.c | 2 +-
OvmfPkg/{AcpiPlatformDxe => XenAcpiPlatformDxe}/EntryPoint.c | 4 ++--
OvmfPkg/{AcpiPlatformDxe => XenAcpiPlatformDxe}/PciDecoding.c | 2 +-
OvmfPkg/{AcpiPlatformDxe => XenAcpiPlatformDxe}/Qemu.c | 3 +--
OvmfPkg/{AcpiPlatformDxe => XenAcpiPlatformDxe}/QemuFwCfgAcpi.c | 2 +-
OvmfPkg/{AcpiPlatformDxe => XenAcpiPlatformDxe}/Xen.c | 1 +
12 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index e535503e385d..4d5171cd43c1 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -649,13 +649,13 @@ [Components]
OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
#
# ACPI Support
#
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
- OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
+ OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
OvmfPkg/AcpiTables/AcpiTables.inf
MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
#
diff --git a/OvmfPkg/OvmfXen.fdf b/OvmfPkg/OvmfXen.fdf
index c7d4d1853027..85306245b50f 100644
--- a/OvmfPkg/OvmfXen.fdf
+++ b/OvmfPkg/OvmfXen.fdf
@@ -349,13 +349,13 @@ [FV.DXEFV]
INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
-INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
+INF OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
INF RuleOverride=ACPITABLE OvmfPkg/AcpiTables/AcpiTables.inf
INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
INF FatPkg/EnhancedFatDxe/Fat.inf
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf b/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
similarity index 85%
copy from OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
copy to OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
index 77607298cbea..379b5d56d565 100644
--- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
@@ -1,18 +1,19 @@
## @file
-# OVMF ACPI Platform Driver
+# OVMF ACPI Platform Driver for Xen guests
#
+# Copyright (C) 2021, Red Hat, Inc.
# Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
- BASE_NAME = AcpiPlatform
- FILE_GUID = 49970331-E3FA-4637-9ABC-3B7868676970
+ BASE_NAME = XenAcpiPlatform
+ FILE_GUID = fa0a48ac-767d-4c88-b70c-ec54c8b900c4
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = AcpiPlatformEntryPoint
#
# The following information is for reference only and not required by the build tools.
diff --git a/Maintainers.txt b/Maintainers.txt
index cafe6b1ab85d..50c87d1ac29a 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -503,12 +503,13 @@ F: OvmfPkg/Library/XenRealTimeClockLib/
F: OvmfPkg/OvmfXen.*
F: OvmfPkg/OvmfXenElfHeaderGenerator.c
F: OvmfPkg/PlatformPei/MemDetect.c
F: OvmfPkg/PlatformPei/Platform.*
F: OvmfPkg/PlatformPei/Xen.*
F: OvmfPkg/SmbiosPlatformDxe/*Xen.c
+F: OvmfPkg/XenAcpiPlatformDxe/
F: OvmfPkg/XenBusDxe/
F: OvmfPkg/XenIoPciDxe/
F: OvmfPkg/XenIoPvhDxe/
F: OvmfPkg/XenPlatformPei/
F: OvmfPkg/XenPvBlkDxe/
F: OvmfPkg/XenResetVector/
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.h
similarity index 91%
copy from OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
copy to OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.h
index d98b79baab40..6259697c4b2d 100644
--- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
+++ b/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.h
@@ -1,9 +1,10 @@
/** @file
- OVMF ACPI Platform Driver
+ OVMF ACPI Platform Driver for Xen guests
+ Copyright (C) 2021, Red Hat, Inc.
Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef ACPI_PLATFORM_H_
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.c
similarity index 95%
copy from OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c
copy to OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.c
index efbbfab89d2b..2b2dc576754b 100644
--- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c
+++ b/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.c
@@ -1,9 +1,10 @@
/** @file
- OVMF ACPI Platform Driver
+ OVMF ACPI Platform Driver for Xen guests
+ Copyright (C) 2021, Red Hat, Inc.
Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Library/DebugLib.h> // ASSERT_EFI_ERROR()
diff --git a/OvmfPkg/AcpiPlatformDxe/BootScript.c b/OvmfPkg/XenAcpiPlatformDxe/BootScript.c
similarity index 96%
copy from OvmfPkg/AcpiPlatformDxe/BootScript.c
copy to OvmfPkg/XenAcpiPlatformDxe/BootScript.c
index f2d1089e91ce..14d1e68694cb 100644
--- a/OvmfPkg/AcpiPlatformDxe/BootScript.c
+++ b/OvmfPkg/XenAcpiPlatformDxe/BootScript.c
@@ -1,11 +1,11 @@
/** @file
Append an ACPI S3 Boot Script fragment from the QEMU_LOADER_WRITE_POINTER
commands of QEMU's fully processed table linker/loader script.
- Copyright (C) 2017, Red Hat, Inc.
+ Copyright (C) 2017-2021, Red Hat, Inc.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Library/BaseLib.h> // CpuDeadLoop()
#include <Library/DebugLib.h> // DEBUG()
diff --git a/OvmfPkg/AcpiPlatformDxe/EntryPoint.c b/OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c
similarity index 93%
copy from OvmfPkg/AcpiPlatformDxe/EntryPoint.c
copy to OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c
index bb5fe82c18d4..b6d0835fe3d4 100644
--- a/OvmfPkg/AcpiPlatformDxe/EntryPoint.c
+++ b/OvmfPkg/XenAcpiPlatformDxe/EntryPoint.c
@@ -1,10 +1,10 @@
/** @file
- Entry point of OVMF ACPI Platform Driver
+ Entry point of OVMF ACPI Platform Driver for Xen guests
- Copyright (C) 2015, Red Hat, Inc.
+ Copyright (C) 2015-2021, Red Hat, Inc.
Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Guid/RootBridgesConnectedEventGroup.h> // gRootBridgesConnectedEve...
diff --git a/OvmfPkg/AcpiPlatformDxe/PciDecoding.c b/OvmfPkg/XenAcpiPlatformDxe/PciDecoding.c
similarity index 96%
copy from OvmfPkg/AcpiPlatformDxe/PciDecoding.c
copy to OvmfPkg/XenAcpiPlatformDxe/PciDecoding.c
index 6ba4c936ad8e..00fc57eb13eb 100644
--- a/OvmfPkg/AcpiPlatformDxe/PciDecoding.c
+++ b/OvmfPkg/XenAcpiPlatformDxe/PciDecoding.c
@@ -1,11 +1,11 @@
/** @file
Temporarily enable IO and MMIO decoding for all PCI devices while QEMU
regenerates the ACPI tables.
- Copyright (C) 2016, Red Hat, Inc.
+ Copyright (C) 2016-2021, Red Hat, Inc.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Library/DebugLib.h> // DEBUG()
#include <Library/MemoryAllocationLib.h> // AllocatePool()
diff --git a/OvmfPkg/AcpiPlatformDxe/Qemu.c b/OvmfPkg/XenAcpiPlatformDxe/Qemu.c
similarity index 96%
copy from OvmfPkg/AcpiPlatformDxe/Qemu.c
copy to OvmfPkg/XenAcpiPlatformDxe/Qemu.c
index bdcc46b7186a..b4a407c41b71 100644
--- a/OvmfPkg/AcpiPlatformDxe/Qemu.c
+++ b/OvmfPkg/XenAcpiPlatformDxe/Qemu.c
@@ -1,13 +1,12 @@
/** @file
OVMF ACPI QEMU support
+ Copyright (C) 2012-2021, Red Hat, Inc.
Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
- Copyright (C) 2012-2014, Red Hat, Inc.
-
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <IndustryStandard/Acpi.h> // EFI_ACPI_1_0_IO_APIC_STRUCTURE
#include <Library/BaseMemoryLib.h> // CopyMem()
diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/XenAcpiPlatformDxe/QemuFwCfgAcpi.c
similarity index 97%
copy from OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
copy to OvmfPkg/XenAcpiPlatformDxe/QemuFwCfgAcpi.c
index df800b149275..521c06cf546f 100644
--- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
+++ b/OvmfPkg/XenAcpiPlatformDxe/QemuFwCfgAcpi.c
@@ -1,11 +1,11 @@
/** @file
OVMF ACPI support using QEMU's fw-cfg interface
+ Copyright (C) 2012-2021, Red Hat, Inc.
Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>
- Copyright (C) 2012-2014, Red Hat, Inc.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <IndustryStandard/Acpi.h> // EFI_ACPI_DESCRIPTION_HEADER
diff --git a/OvmfPkg/AcpiPlatformDxe/Xen.c b/OvmfPkg/XenAcpiPlatformDxe/Xen.c
similarity index 96%
copy from OvmfPkg/AcpiPlatformDxe/Xen.c
copy to OvmfPkg/XenAcpiPlatformDxe/Xen.c
index be2c5d695846..e8395db548d9 100644
--- a/OvmfPkg/AcpiPlatformDxe/Xen.c
+++ b/OvmfPkg/XenAcpiPlatformDxe/Xen.c
@@ -1,9 +1,10 @@
/** @file
OVMF ACPI Xen support
+ Copyright (C) 2021, Red Hat, Inc.
Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2012, Bei Guan <gbtju85 at gmail.com>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
--
2.19.1.3.g30247aa5d201
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75680): https://edk2.groups.io/g/devel/message/75680
Mute This Topic: https://groups.io/mt/83110483/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list