public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io
Cc: "Andrew Fish" <afish@apple.com>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Ard Biesheuvel" <ardb+tianocore@kernel.org>,
	"Jordan Justen" <jordan.l.justen@intel.com>,
	"Julien Grall" <julien@xen.org>,
	"Leif Lindholm" <leif@nuviainc.com>,
	"Michael D Kinney" <michael.d.kinney@intel.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH 39/43] OvmfPkg/SmbiosPlatformDxe: split GetXenSmbiosTables() decl. to new header
Date: Wed, 26 May 2021 22:14:42 +0200	[thread overview]
Message-ID: <20210526201446.12554-40-lersek@redhat.com> (raw)
In-Reply-To: <20210526201446.12554-1-lersek@redhat.com>

Move the declaration of the GetXenSmbiosTables() function to a new header
file called "XenSmbiosPlatformDxe.h". (The only declaration that remains
in "SmbiosPlatformDxe.h" for now is that of GetQemuSmbiosTables().)

Modify the pattern in "Maintainers.txt" so that the new file be covered in
the "OvmfPkg: Xen-related modules" section.

This patch is best viewed with "git show --no-renames".

Cc: Andrew Fish <afish@apple.com>
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: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
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>
---
 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf                |  1 +
 Maintainers.txt                                                |  2 +-
 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h                  | 14 --------------
 OvmfPkg/SmbiosPlatformDxe/{ArmXen.c => XenSmbiosPlatformDxe.h} | 20 ++++++++++----------
 OvmfPkg/SmbiosPlatformDxe/ArmXen.c                             |  2 +-
 OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c                  |  1 +
 OvmfPkg/SmbiosPlatformDxe/X86Xen.c                             |  2 +-
 7 files changed, 15 insertions(+), 27 deletions(-)

diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
index 6063c0c9f609..140fa16ac135 100644
--- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
@@ -24,12 +24,13 @@ [Defines]
 #
 
 [Sources]
   Qemu.c
   SmbiosPlatformDxe.c
   SmbiosPlatformDxe.h
+  XenSmbiosPlatformDxe.h
 
 [Sources.IA32, Sources.X64]
   X86Xen.c
 
 [Sources.ARM, Sources.AARCH64]
   ArmXen.c
diff --git a/Maintainers.txt b/Maintainers.txt
index e5f419e67f0c..751477e8e62a 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -499,13 +499,13 @@ F: OvmfPkg/Library/XenConsoleSerialPortLib/
 F: OvmfPkg/Library/XenHypercallLib/
 F: OvmfPkg/Library/XenIoMmioLib/
 F: OvmfPkg/Library/XenPlatformLib/
 F: OvmfPkg/Library/XenRealTimeClockLib/
 F: OvmfPkg/OvmfXen.*
 F: OvmfPkg/OvmfXenElfHeaderGenerator.c
-F: OvmfPkg/SmbiosPlatformDxe/*Xen.c
+F: OvmfPkg/SmbiosPlatformDxe/*Xen*
 F: OvmfPkg/XenAcpiPlatformDxe/
 F: OvmfPkg/XenBusDxe/
 F: OvmfPkg/XenIoPciDxe/
 F: OvmfPkg/XenIoPvhDxe/
 F: OvmfPkg/XenPlatformPei/
 F: OvmfPkg/XenPvBlkDxe/
diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h
index ad42a326418c..7a0bdbb2911f 100644
--- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h
+++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h
@@ -8,26 +8,12 @@
 
 **/
 
 #ifndef SMBIOS_PLATFORM_DXE_H_
 #define SMBIOS_PLATFORM_DXE_H_
 
-#include <IndustryStandard/SmBios.h> // SMBIOS_TABLE_ENTRY_POINT
-
-/**
-  Locates the Xen SMBIOS data if it exists
-
-  @return SMBIOS_TABLE_ENTRY_POINT   Address of Xen SMBIOS data
-
-**/
-SMBIOS_TABLE_ENTRY_POINT *
-GetXenSmbiosTables (
-  VOID
-  );
-
-
 /**
   Locates and extracts the QEMU SMBIOS table data if present in fw_cfg
 
   @return             Address of extracted QEMU SMBIOS data
 
 **/
diff --git a/OvmfPkg/SmbiosPlatformDxe/ArmXen.c b/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.h
similarity index 56%
copy from OvmfPkg/SmbiosPlatformDxe/ArmXen.c
copy to OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.h
index c2847f905303..850a8b662cd5 100644
--- a/OvmfPkg/SmbiosPlatformDxe/ArmXen.c
+++ b/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.h
@@ -1,28 +1,28 @@
 /** @file
-  Detect Xen SMBIOS data on ARM / AARCH64.
+  This driver installs SMBIOS information for OVMF on Xen
 
-  Copyright (C) 2015, Red Hat, Inc.
+  Copyright (C) 2021, Red Hat, Inc.
   Copyright (c) 2011, Bei Guan <gbtju85@gmail.com>
   Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
+
 **/
 
-#include "SmbiosPlatformDxe.h"
+#ifndef XEN_SMBIOS_PLATFORM_DXE_H_
+#define XEN_SMBIOS_PLATFORM_DXE_H_
+
+#include <IndustryStandard/SmBios.h> // SMBIOS_TABLE_ENTRY_POINT
 
 /**
   Locates the Xen SMBIOS data if it exists
 
   @return SMBIOS_TABLE_ENTRY_POINT   Address of Xen SMBIOS data
 
 **/
 SMBIOS_TABLE_ENTRY_POINT *
 GetXenSmbiosTables (
   VOID
-  )
-{
-  //
-  // Not implemented yet.
-  //
-  return NULL;
-}
+  );
+
+#endif
diff --git a/OvmfPkg/SmbiosPlatformDxe/ArmXen.c b/OvmfPkg/SmbiosPlatformDxe/ArmXen.c
index c2847f905303..3dd849bbc0b4 100644
--- a/OvmfPkg/SmbiosPlatformDxe/ArmXen.c
+++ b/OvmfPkg/SmbiosPlatformDxe/ArmXen.c
@@ -5,13 +5,13 @@
   Copyright (c) 2011, Bei Guan <gbtju85@gmail.com>
   Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
-#include "SmbiosPlatformDxe.h"
+#include "XenSmbiosPlatformDxe.h"
 
 /**
   Locates the Xen SMBIOS data if it exists
 
   @return SMBIOS_TABLE_ENTRY_POINT   Address of Xen SMBIOS data
 
diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
index 757bec879e4a..f280a1852ddd 100644
--- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
+++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
@@ -12,12 +12,13 @@
 #include <Library/DebugLib.h>                 // ASSERT_EFI_ERROR()
 #include <Library/MemoryAllocationLib.h>      // FreePool()
 #include <Library/UefiBootServicesTableLib.h> // gBS
 #include <Protocol/Smbios.h>                  // EFI_SMBIOS_PROTOCOL
 
 #include "SmbiosPlatformDxe.h"
+#include "XenSmbiosPlatformDxe.h"
 
 #define TYPE0_STRINGS \
   "EFI Development Kit II / OVMF\0"     /* Vendor */ \
   "0.0.0\0"                             /* BiosVersion */ \
   "02/06/2015\0"                        /* BiosReleaseDate */
 //
diff --git a/OvmfPkg/SmbiosPlatformDxe/X86Xen.c b/OvmfPkg/SmbiosPlatformDxe/X86Xen.c
index e0b1b29f80db..0acedf8995da 100644
--- a/OvmfPkg/SmbiosPlatformDxe/X86Xen.c
+++ b/OvmfPkg/SmbiosPlatformDxe/X86Xen.c
@@ -9,13 +9,13 @@
 **/
 
 #include <Library/BaseLib.h> // AsciiStrnCmp()
 #include <Library/HobLib.h>  // GetFirstGuidHob()
 #include <Pi/PiHob.h>        // EFI_HOB_GUID_TYPE
 
-#include "SmbiosPlatformDxe.h"
+#include "XenSmbiosPlatformDxe.h"
 
 #define XEN_SMBIOS_PHYSICAL_ADDRESS       0x000EB000
 #define XEN_SMBIOS_PHYSICAL_END           0x000F0000
 
 /**
   Validates the SMBIOS entry point structure
-- 
2.19.1.3.g30247aa5d201



  parent reply	other threads:[~2021-05-26 20:56 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 20:14 [PATCH 00/43] OvmfPkg: remove Xen support from OvmfPkg*.dsc, in favor of OvmfXen.dsc Laszlo Ersek
2021-05-26 20:14 ` [PATCH 01/43] OvmfPkg: remove the Xen drivers from the IA32, IA32X64, and X64 platforms Laszlo Ersek
2021-05-27  8:22   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 02/43] OvmfPkg: remove the Xen drivers from the AmdSev platform Laszlo Ersek
2021-05-27  8:22   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 03/43] OvmfPkg: switch IA32, IA32X64, X64 to the fw_cfg-only ACPI platform driver Laszlo Ersek
2021-05-27 10:15   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 04/43] OvmfPkg: switch the AmdSev platform " Laszlo Ersek
2021-05-27 10:15   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 05/43] OvmfPkg/README: bump minimum QEMU version to 1.7.1, machine types to 1.7 Laszlo Ersek
2021-05-27  8:24   ` Philippe Mathieu-Daudé
2021-05-27  8:56     ` Laszlo Ersek
2021-05-26 20:14 ` [PATCH 06/43] OvmfPkg/AcpiPlatformDxe: fix header file warts Laszlo Ersek
2021-05-27  8:24   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 07/43] OvmfPkg/AcpiPlatformDxe: sort #includes and [LibraryClasses] Laszlo Ersek
2021-05-27  8:25   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 08/43] OvmfPkg/AcpiPlatformDxe/QemuLoader.h: remove QemuFwCfgLib class dependency Laszlo Ersek
2021-05-27  8:26   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 09/43] OvmfPkg/AcpiPlatformDxe: move "QemuLoader.h" to IndustryStandard Laszlo Ersek
2021-05-27  8:26   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 10/43] OvmfPkg/AcpiPlatformDxe: consolidate #includes and [LibraryClasses] Laszlo Ersek
2021-05-27  8:41   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 11/43] OvmfPkg/XenAcpiPlatformDxe: create from AcpiPlatformDxe Laszlo Ersek
2021-05-27 10:16   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 12/43] OvmfPkg/AcpiPlatformDxe: remove the "AcpiPlatformDxe.inf" driver Laszlo Ersek
2021-05-27 10:17   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 13/43] OvmfPkg/XenAcpiPlatformDxe: remove the QEMU ACPI linker/loader client Laszlo Ersek
2021-05-27  8:38   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 14/43] OvmfPkg/XenAcpiPlatformDxe: remove QEMU fw_cfg dependency Laszlo Ersek
2021-05-27  8:39   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 15/43] OvmfPkg/XenAcpiPlatformDxe: remove the InstallAcpiTable() helper function Laszlo Ersek
2021-05-27  9:39   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 16/43] OvmfPkg/XenAcpiPlatformDxe: remove OVMF's built-in ACPI tables Laszlo Ersek
2021-05-27  8:40   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 17/43] OvmfPkg/Bhyve/AcpiPlatformDxe: fix file path typo in comment Laszlo Ersek
2021-05-26 20:40   ` Rebecca Cran
2021-05-27  8:40   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 18/43] OvmfPkg/AcpiTables: remove unused module Laszlo Ersek
2021-05-27  8:27   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 19/43] OvmfPkg/OvmfXen: make "PcdPciDisableBusEnumeration" Fixed-at-Build Laszlo Ersek
2021-05-27  8:42   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 20/43] OvmfPkg/XenAcpiPlatformDxe: remove delayed ACPI table installation Laszlo Ersek
2021-05-27  8:28   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 21/43] OvmfPkg/PlatformPei: remove Xen support Laszlo Ersek
2021-05-27 10:20   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 22/43] OvmfPkg: drop PcdPciDisableBusEnumeration from the IA32, IA32X64, X64 DSCs Laszlo Ersek
2021-05-27  8:29   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 23/43] OvmfPkg: drop PcdPciDisableBusEnumeration from the AmdSev platform Laszlo Ersek
2021-05-27 10:21   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 24/43] OvmfPkg/Bhyve: make "PcdPciDisableBusEnumeration" Fixed-at-Build Laszlo Ersek
2021-05-26 20:41   ` Rebecca Cran
2021-05-27  8:43   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 25/43] OvmfPkg/OvmfXen: remove IncompatiblePciDeviceSupport DXE driver Laszlo Ersek
2021-05-27  8:29   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 26/43] OvmfPkg/Bhyve: " Laszlo Ersek
2021-05-27 10:23   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 27/43] OvmfPkg/IncompatiblePciDeviceSupportDxe: remove PcdPciDisableBusEnumeration Laszlo Ersek
2021-05-27  8:30   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 28/43] OvmfPkg/PciHostBridgeLib: consolidate #includes and INF file sections Laszlo Ersek
2021-05-27  8:31   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 29/43] OvmfPkg/PciHostBridgeLibScan: create from PciHostBridgeLib Laszlo Ersek
2021-05-31 14:52   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 30/43] OvmfPkg/Bhyve: consume PciHostBridgeLibScan Laszlo Ersek
2021-05-26 22:46   ` Rebecca Cran
2021-05-27  8:31   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 31/43] OvmfPkg/OvmfXen: " Laszlo Ersek
2021-05-27  8:31   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 32/43] OvmfPkg/PciHostBridgeLib: remove Bhyve and Xen support Laszlo Ersek
2021-05-27  8:32   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 33/43] OvmfPkg/PciHostBridgeLibScan: remove QEMU (fw_cfg) support Laszlo Ersek
2021-05-27 10:25   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 34/43] OvmfPkg/PciHostBridgeLibScan: remove PcdOvmfHostBridgePciDevId Laszlo Ersek
2021-05-27  8:33   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 35/43] OvmfPkg/PciHostBridgeLibScan: clean up file names and file-top comments Laszlo Ersek
2021-05-27  8:34   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 36/43] OvmfPkg/SmbiosPlatformDxe: clean up #includes and INF Laszlo Ersek
2021-05-27  8:34   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 37/43] OvmfPkg/SmbiosPlatformDxe: return EFI_NOT_FOUND if there is no SMBIOS data Laszlo Ersek
2021-05-27  8:45   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 38/43] OvmfPkg/SmbiosPlatformDxe: locate SMBIOS protocol in InstallAllStructures() Laszlo Ersek
2021-05-27  8:35   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` Laszlo Ersek [this message]
2021-05-31 14:54   ` [PATCH 39/43] OvmfPkg/SmbiosPlatformDxe: split GetXenSmbiosTables() decl. to new header Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 40/43] OvmfPkg/SmbiosPlatformDxe: declare InstallAllStructures() in header file Laszlo Ersek
2021-05-31 15:00   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 41/43] OvmfPkg/SmbiosPlatformDxe: create Xen-specific module INF file Laszlo Ersek
2021-05-31 14:56   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 42/43] OvmfPkg/SmbiosPlatformDxe: split Xen entry point from QEMU entry point Laszlo Ersek
2021-05-31 15:03   ` Philippe Mathieu-Daudé
2021-05-26 20:14 ` [PATCH 43/43] OvmfPkg: restrict XenPlatformLib to BdsDxe in the IA32, IA32X64, X64 DSCs Laszlo Ersek
2021-05-31 14:58   ` Philippe Mathieu-Daudé
2021-05-27  7:34 ` [PATCH 00/43] OvmfPkg: remove Xen support from OvmfPkg*.dsc, in favor of OvmfXen.dsc Ard Biesheuvel
2021-05-27  8:55   ` Laszlo Ersek
2021-05-31 15:06     ` Philippe Mathieu-Daudé
2021-06-01  7:41       ` Laszlo Ersek
2021-05-27 13:07 ` Leif Lindholm
2021-05-27 13:09   ` Leif Lindholm
2021-05-27 16:30   ` Laszlo Ersek
2021-06-02  8:36 ` [edk2-devel] " Laszlo Ersek
2021-06-04 14:02   ` Anthony PERARD
2021-06-04 14:19     ` Laszlo Ersek
2021-06-04 16:05     ` Laszlo Ersek

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=20210526201446.12554-40-lersek@redhat.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