OvmfPkg/AcpiPlatformDxe: consolidate #includes and [LibraryClasses]
- #include only such public headers in "AcpiPlatform.h" that are required by the function declarations and type definitions introduced in "AcpiPlatform.h". Don't use "AcpiPlatform.h" as a convenience #include file. - In every file, list every necessary public #include individually, with an example identifier that's actually consumed. - Remove unnecessary lib classes, add unlisted lib classes. - Remove unnecessary #include directives, add unlisted #include directives. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jordan Justen <jordan.l.justen@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> Message-Id: <20210526201446.12554-11-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
747b1ef725
commit
cc302b799e
@ -6,6 +6,11 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
#include <Library/DebugLib.h> // ASSERT_EFI_ERROR()
|
||||||
|
#include <Library/UefiBootServicesTableLib.h> // gBS
|
||||||
|
#include <Library/XenPlatformLib.h> // XenDetected()
|
||||||
|
#include <Protocol/FirmwareVolume2.h> // gEfiFirmwareVolume2Protocol...
|
||||||
|
|
||||||
#include "AcpiPlatform.h"
|
#include "AcpiPlatform.h"
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -9,16 +9,8 @@
|
|||||||
#ifndef ACPI_PLATFORM_H_
|
#ifndef ACPI_PLATFORM_H_
|
||||||
#define ACPI_PLATFORM_H_
|
#define ACPI_PLATFORM_H_
|
||||||
|
|
||||||
#include <IndustryStandard/Acpi.h>
|
#include <Protocol/AcpiTable.h> // EFI_ACPI_TABLE_PROTOCOL
|
||||||
#include <Library/BaseLib.h>
|
#include <Protocol/PciIo.h> // EFI_PCI_IO_PROTOCOL
|
||||||
#include <Library/DebugLib.h>
|
|
||||||
#include <Library/PcdLib.h>
|
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
|
||||||
#include <Library/XenPlatformLib.h>
|
|
||||||
#include <PiDxe.h>
|
|
||||||
#include <Protocol/AcpiTable.h>
|
|
||||||
#include <Protocol/FirmwareVolume2.h>
|
|
||||||
#include <Protocol/PciIo.h>
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||||
|
@ -48,7 +48,6 @@
|
|||||||
QemuFwCfgS3Lib
|
QemuFwCfgS3Lib
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
UefiLib
|
|
||||||
XenPlatformLib
|
XenPlatformLib
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
|
@ -7,9 +7,10 @@
|
|||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/BaseLib.h> // CpuDeadLoop()
|
||||||
#include <Library/QemuFwCfgLib.h>
|
#include <Library/DebugLib.h> // DEBUG()
|
||||||
#include <Library/QemuFwCfgS3Lib.h>
|
#include <Library/MemoryAllocationLib.h> // AllocatePool()
|
||||||
|
#include <Library/QemuFwCfgS3Lib.h> // QemuFwCfgS3ScriptSkipBytes()
|
||||||
|
|
||||||
#include "AcpiPlatform.h"
|
#include "AcpiPlatform.h"
|
||||||
|
|
||||||
|
@ -7,7 +7,11 @@
|
|||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <Guid/RootBridgesConnectedEventGroup.h>
|
#include <Guid/RootBridgesConnectedEventGroup.h> // gRootBridgesConnectedEve...
|
||||||
|
#include <Library/DebugLib.h> // DEBUG()
|
||||||
|
#include <Library/PcdLib.h> // PcdGetBool()
|
||||||
|
#include <Library/UefiBootServicesTableLib.h> // gBS
|
||||||
|
#include <Protocol/AcpiTable.h> // EFI_ACPI_TABLE_PROTOCOL
|
||||||
|
|
||||||
#include "AcpiPlatform.h"
|
#include "AcpiPlatform.h"
|
||||||
|
|
||||||
|
@ -7,7 +7,9 @@
|
|||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/DebugLib.h> // DEBUG()
|
||||||
|
#include <Library/MemoryAllocationLib.h> // AllocatePool()
|
||||||
|
#include <Library/UefiBootServicesTableLib.h> // gBS
|
||||||
|
|
||||||
#include "AcpiPlatform.h"
|
#include "AcpiPlatform.h"
|
||||||
|
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <IndustryStandard/Acpi.h>
|
#include <IndustryStandard/Acpi.h> // EFI_ACPI_1_0_IO_APIC_STRUCTURE
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h> // CopyMem()
|
||||||
#include <Library/DxeServicesTableLib.h>
|
#include <Library/DebugLib.h> // DEBUG()
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/DxeServicesTableLib.h> // gDS
|
||||||
#include <Library/OrderedCollectionLib.h>
|
#include <Library/MemoryAllocationLib.h> // AllocatePool()
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h> // PcdGet16()
|
||||||
#include <Library/QemuFwCfgLib.h>
|
#include <Library/QemuFwCfgLib.h> // QemuFwCfgIsAvailable()
|
||||||
|
|
||||||
#include "AcpiPlatform.h"
|
#include "AcpiPlatform.h"
|
||||||
|
|
||||||
|
@ -8,15 +8,16 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <IndustryStandard/Acpi.h>
|
#include <IndustryStandard/Acpi.h> // EFI_ACPI_DESCRIPTION_HEADER
|
||||||
#include <IndustryStandard/QemuLoader.h>
|
#include <IndustryStandard/QemuLoader.h> // QEMU_LOADER_FNAME_SIZE
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseLib.h> // AsciiStrCmp()
|
||||||
#include <Library/DxeServicesTableLib.h>
|
#include <Library/BaseMemoryLib.h> // CopyMem()
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/DebugLib.h> // DEBUG()
|
||||||
#include <Library/OrderedCollectionLib.h>
|
#include <Library/MemoryAllocationLib.h> // AllocatePool()
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/OrderedCollectionLib.h> // OrderedCollectionMin()
|
||||||
#include <Library/QemuFwCfgLib.h>
|
#include <Library/QemuFwCfgLib.h> // QemuFwCfgFindFile()
|
||||||
#include <Library/QemuFwCfgS3Lib.h>
|
#include <Library/QemuFwCfgS3Lib.h> // QemuFwCfgS3Enabled()
|
||||||
|
#include <Library/UefiBootServicesTableLib.h> // gBS
|
||||||
|
|
||||||
#include "AcpiPlatform.h"
|
#include "AcpiPlatform.h"
|
||||||
|
|
||||||
|
@ -35,9 +35,11 @@
|
|||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
BaseLib
|
BaseLib
|
||||||
|
BaseMemoryLib
|
||||||
DebugLib
|
DebugLib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
OrderedCollectionLib
|
OrderedCollectionLib
|
||||||
|
PcdLib
|
||||||
QemuFwCfgLib
|
QemuFwCfgLib
|
||||||
QemuFwCfgS3Lib
|
QemuFwCfgS3Lib
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h> // CpuDeadLoop()
|
||||||
|
#include <Library/DebugLib.h> // DEBUG()
|
||||||
|
#include <Library/XenPlatformLib.h> // XenGetInfoHOB()
|
||||||
|
|
||||||
#include "AcpiPlatform.h"
|
#include "AcpiPlatform.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user