]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/SmbiosPlatformDxe: create Xen-specific module INF file
authorLaszlo Ersek <lersek@redhat.com>
Wed, 26 May 2021 20:14:44 +0000 (22:14 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 4 Jun 2021 16:01:50 +0000 (16:01 +0000)
"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>
OvmfPkg/OvmfXen.dsc
OvmfPkg/OvmfXen.fdf
OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf [new file with mode: 0644]

index 0986d9f5c356a7c7fe36b71b7c20f08576f05422..3c1ca6bfd493705382ede9814676069a1f3e6411 100644 (file)
     <LibraryClasses>\r
       NULL|OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.inf\r
   }\r
-  OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf\r
+  OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf\r
 \r
   #\r
   # ACPI Support\r
index 9acc7c93b98b4ea3203190ef6011016b71d26d94..aeb9336fd5b7f86f1510b8922981ccb1d1a33a37 100644 (file)
@@ -348,7 +348,7 @@ INF  MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
 INF  MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf\r
 \r
 INF  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf\r
-INF  OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf\r
+INF  OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf\r
 \r
 INF  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf\r
 INF  OvmfPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf\r
diff --git a/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf b/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.inf
new file mode 100644 (file)
index 0000000..5a093c6
--- /dev/null
@@ -0,0 +1,66 @@
+## @file\r
+#  This driver installs SMBIOS information for OVMF on Xen\r
+#\r
+#  Copyright (C) 2021, Red Hat, Inc.\r
+#  Copyright (c) 2011, Bei Guan <gbtju85@gmail.com>\r
+#  Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+#\r
+#  SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+##\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = XenSmbiosPlatformDxe\r
+  FILE_GUID                      = c41f0579-5598-40f1-95db-3983c8ebbe2a\r
+  MODULE_TYPE                    = DXE_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+\r
+  ENTRY_POINT                    = SmbiosTablePublishEntry\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 EBC ARM AARCH64\r
+#\r
+\r
+[Sources]\r
+  Qemu.c\r
+  SmbiosPlatformDxe.c\r
+  SmbiosPlatformDxe.h\r
+  XenSmbiosPlatformDxe.h\r
+\r
+[Sources.IA32, Sources.X64]\r
+  X86Xen.c\r
+\r
+[Sources.ARM, Sources.AARCH64]\r
+  ArmXen.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  OvmfPkg/OvmfPkg.dec\r
+\r
+[LibraryClasses]\r
+  DebugLib\r
+  MemoryAllocationLib\r
+  PcdLib\r
+  QemuFwCfgLib\r
+  UefiBootServicesTableLib\r
+  UefiDriverEntryPoint\r
+\r
+[LibraryClasses.IA32, LibraryClasses.X64]\r
+  BaseLib\r
+  HobLib\r
+\r
+[Pcd]\r
+  gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated\r
+\r
+[Protocols]\r
+  gEfiSmbiosProtocolGuid                      # PROTOCOL ALWAYS_CONSUMED\r
+\r
+[Guids.IA32, Guids.X64]\r
+  gEfiXenInfoGuid\r
+\r
+[Depex]\r
+  gEfiSmbiosProtocolGuid\r
+\r