summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2021-05-26 22:14:44 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-06-04 16:01:50 +0000
commitd4a8aaee7303c4095828aac79ce36704b24675d3 (patch)
tree4cb0b9f9e3b9fbba3fc7e3a65c822fe48b4e6947 /OvmfPkg
parent9d84e74ca0d94aec5ff8be0ac1ac644fc1632dd8 (diff)
downloadedk2-d4a8aaee7303c4095828aac79ce36704b24675d3.tar.gz
edk2-d4a8aaee7303c4095828aac79ce36704b24675d3.tar.bz2
edk2-d4a8aaee7303c4095828aac79ce36704b24675d3.zip
OvmfPkg/SmbiosPlatformDxe: create Xen-specific module INF file
"OvmfPkg/SmbiosPlatformDxe" is structured somewhat differently from the drivers duplicated and trimmed thus far in this series. The final QEMU and Xen versions will share a relatively significant amount of code, therefore duplicating the whole driver is less useful, even temporarily. Instead, duplicate the INF file, in preparation for customizing the entry point function. Because ArmVirtXen doesn't actually include OvmfPkg/SmbiosPlatformDxe [*], there is only one platform that's supposed to consume the new driver: OvmfXen. Switch OvmfXen to the new driver at once. [*] See commit 164cf4038357 ("OvmfPkg: SmbiosPlatformDxe: restrict current Xen code to IA32/X64", 2015-07-26). This patch is best viewed with "git show --find-copies-harder". Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Julien Grall <julien@xen.org> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210526201446.12554-42-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/OvmfXen.dsc2
-rw-r--r--OvmfPkg/OvmfXen.fdf2
-rw-r--r--OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf66
3 files changed, 68 insertions, 2 deletions
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 0986d9f5c3..3c1ca6bfd4 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -645,7 +645,7 @@
<LibraryClasses>
NULL|OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.inf
}
- OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+ OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf
#
# ACPI Support
diff --git a/OvmfPkg/OvmfXen.fdf b/OvmfPkg/OvmfXen.fdf
index 9acc7c93b9..aeb9336fd5 100644
--- a/OvmfPkg/OvmfXen.fdf
+++ b/OvmfPkg/OvmfXen.fdf
@@ -348,7 +348,7 @@ INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
-INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+INF OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf
INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
INF OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
diff --git a/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf b/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf
new file mode 100644
index 0000000000..5a093c69af
--- /dev/null
+++ b/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf
@@ -0,0 +1,66 @@
+## @file
+# This driver installs SMBIOS information for OVMF on Xen
+#
+# Copyright (C) 2021, Red Hat, Inc.
+# Copyright (c) 2011, Bei Guan <gbtju85@gmail.com>
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = XenSmbiosPlatformDxe
+ FILE_GUID = c41f0579-5598-40f1-95db-3983c8ebbe2a
+ MODULE_TYPE = DXE_DRIVER
+ VERSION_STRING = 1.0
+
+ ENTRY_POINT = SmbiosTablePublishEntry
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 EBC ARM AARCH64
+#
+
+[Sources]
+ Qemu.c
+ SmbiosPlatformDxe.c
+ SmbiosPlatformDxe.h
+ XenSmbiosPlatformDxe.h
+
+[Sources.IA32, Sources.X64]
+ X86Xen.c
+
+[Sources.ARM, Sources.AARCH64]
+ ArmXen.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ OvmfPkg/OvmfPkg.dec
+
+[LibraryClasses]
+ DebugLib
+ MemoryAllocationLib
+ PcdLib
+ QemuFwCfgLib
+ UefiBootServicesTableLib
+ UefiDriverEntryPoint
+
+[LibraryClasses.IA32, LibraryClasses.X64]
+ BaseLib
+ HobLib
+
+[Pcd]
+ gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated
+
+[Protocols]
+ gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED
+
+[Guids.IA32, Guids.X64]
+ gEfiXenInfoGuid
+
+[Depex]
+ gEfiSmbiosProtocolGuid
+