From a8ab14424eb50c31a932b5eef909f4d882990301 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 26 May 2021 22:14:42 +0200 Subject: [PATCH] OvmfPkg/SmbiosPlatformDxe: split GetXenSmbiosTables() decl. to new header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Cc: Leif Lindholm Cc: Michael D Kinney Cc: Philippe Mathieu-Daudé Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122 Signed-off-by: Laszlo Ersek Message-Id: <20210526201446.12554-40-lersek@redhat.com> Reviewed-by: Ard Biesheuvel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Leif Lindholm --- Maintainers.txt | 2 +- OvmfPkg/SmbiosPlatformDxe/ArmXen.c | 2 +- OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 1 + OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h | 14 ---------- .../SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 1 + OvmfPkg/SmbiosPlatformDxe/X86Xen.c | 2 +- .../SmbiosPlatformDxe/XenSmbiosPlatformDxe.h | 28 +++++++++++++++++++ 7 files changed, 33 insertions(+), 17 deletions(-) create mode 100644 OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.h diff --git a/Maintainers.txt b/Maintainers.txt index 0a98227587..a359919fef 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -493,7 +493,7 @@ 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/ diff --git a/OvmfPkg/SmbiosPlatformDxe/ArmXen.c b/OvmfPkg/SmbiosPlatformDxe/ArmXen.c index c2847f9053..3dd849bbc0 100644 --- a/OvmfPkg/SmbiosPlatformDxe/ArmXen.c +++ b/OvmfPkg/SmbiosPlatformDxe/ArmXen.c @@ -8,7 +8,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#include "SmbiosPlatformDxe.h" +#include "XenSmbiosPlatformDxe.h" /** Locates the Xen SMBIOS data if it exists diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c index 757bec879e..f280a1852d 100644 --- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c +++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c @@ -15,6 +15,7 @@ #include // EFI_SMBIOS_PROTOCOL #include "SmbiosPlatformDxe.h" +#include "XenSmbiosPlatformDxe.h" #define TYPE0_STRINGS \ "EFI Development Kit II / OVMF\0" /* Vendor */ \ diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h index ad42a32641..7a0bdbb291 100644 --- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h +++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h @@ -11,20 +11,6 @@ #ifndef SMBIOS_PLATFORM_DXE_H_ #define SMBIOS_PLATFORM_DXE_H_ -#include // 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 diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf index 6063c0c9f6..140fa16ac1 100644 --- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf +++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf @@ -27,6 +27,7 @@ Qemu.c SmbiosPlatformDxe.c SmbiosPlatformDxe.h + XenSmbiosPlatformDxe.h [Sources.IA32, Sources.X64] X86Xen.c diff --git a/OvmfPkg/SmbiosPlatformDxe/X86Xen.c b/OvmfPkg/SmbiosPlatformDxe/X86Xen.c index e0b1b29f80..0acedf8995 100644 --- a/OvmfPkg/SmbiosPlatformDxe/X86Xen.c +++ b/OvmfPkg/SmbiosPlatformDxe/X86Xen.c @@ -12,7 +12,7 @@ #include // GetFirstGuidHob() #include // EFI_HOB_GUID_TYPE -#include "SmbiosPlatformDxe.h" +#include "XenSmbiosPlatformDxe.h" #define XEN_SMBIOS_PHYSICAL_ADDRESS 0x000EB000 #define XEN_SMBIOS_PHYSICAL_END 0x000F0000 diff --git a/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.h b/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.h new file mode 100644 index 0000000000..850a8b662c --- /dev/null +++ b/OvmfPkg/SmbiosPlatformDxe/XenSmbiosPlatformDxe.h @@ -0,0 +1,28 @@ +/** @file + This driver installs SMBIOS information for OVMF on Xen + + Copyright (C) 2021, Red Hat, Inc. + Copyright (c) 2011, Bei Guan + Copyright (c) 2011, Intel Corporation. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef XEN_SMBIOS_PLATFORM_DXE_H_ +#define XEN_SMBIOS_PLATFORM_DXE_H_ + +#include // 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 + ); + +#endif