From d4a8aaee7303c4095828aac79ce36704b24675d3 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 26 May 2021 22:14:44 +0200 Subject: OvmfPkg/SmbiosPlatformDxe: create Xen-specific module INF file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "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 Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Cc: Philippe Mathieu-Daudé Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122 Signed-off-by: Laszlo Ersek Message-Id: <20210526201446.12554-42-lersek@redhat.com> Reviewed-by: Ard Biesheuvel Reviewed-by: Philippe Mathieu-Daudé --- OvmfPkg/OvmfXen.dsc | 2 +- OvmfPkg/OvmfXen.fdf | 2 +- OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf | 66 ++++++++++++++++++++++ 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf 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 @@ 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 +# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+# +# 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 + -- cgit v1.2.3