mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-29 08:34:07 +02:00
OvmfPkg/PciHostBridgeLib: consolidate #includes and INF file sections
- In every C file, list every necessary public #include individually, with an example identifier that's actually consumed. - Place all public #includes first, all module-private #includes second. Separate them with a single empty line. Keep each section sorted in itself. - Sort all sections in the INF file, except [Defines]. - Add unlisted lib classes. - Remove unnecessary #include directives, add unlisted #include directives. 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-29-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
984c93ece3
commit
32fef03563
@ -7,23 +7,17 @@
|
|||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
**/
|
**/
|
||||||
#include <PiDxe.h>
|
#include <IndustryStandard/Pci.h> // PCI_MAX_BUS
|
||||||
|
#include <IndustryStandard/Q35MchIch9.h> // INTEL_Q35_MCH_DEVIC...
|
||||||
|
#include <Library/BaseMemoryLib.h> // ZeroMem()
|
||||||
|
#include <Library/PcdLib.h> // PcdGet64()
|
||||||
|
#include <Library/PciHostBridgeLib.h> // PCI_ROOT_BRIDGE_APE...
|
||||||
|
#include <Library/PciHostBridgeUtilityLib.h> // PciHostBridgeUtilit...
|
||||||
|
#include <Protocol/PciHostBridgeResourceAllocation.h> // EFI_PCI_HOST_BRIDGE...
|
||||||
|
#include <Protocol/PciRootBridgeIo.h> // EFI_PCI_ATTRIBUTE_I...
|
||||||
|
|
||||||
#include <IndustryStandard/Pci.h>
|
|
||||||
#include <IndustryStandard/Q35MchIch9.h>
|
|
||||||
|
|
||||||
#include <Protocol/PciHostBridgeResourceAllocation.h>
|
|
||||||
#include <Protocol/PciRootBridgeIo.h>
|
|
||||||
|
|
||||||
#include <Library/BaseMemoryLib.h>
|
|
||||||
#include <Library/DebugLib.h>
|
|
||||||
#include <Library/MemoryAllocationLib.h>
|
|
||||||
#include <Library/PcdLib.h>
|
|
||||||
#include <Library/PciHostBridgeLib.h>
|
|
||||||
#include <Library/PciHostBridgeUtilityLib.h>
|
|
||||||
#include "PciHostBridge.h"
|
#include "PciHostBridge.h"
|
||||||
|
|
||||||
|
|
||||||
STATIC PCI_ROOT_BRIDGE_APERTURE mNonExistAperture = { MAX_UINT64, 0 };
|
STATIC PCI_ROOT_BRIDGE_APERTURE mNonExistAperture = { MAX_UINT64, 0 };
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
[Sources]
|
[Sources]
|
||||||
|
PciHostBridge.h
|
||||||
PciHostBridgeLib.c
|
PciHostBridgeLib.c
|
||||||
XenSupport.c
|
XenSupport.c
|
||||||
PciHostBridge.h
|
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
@ -35,6 +35,7 @@
|
|||||||
OvmfPkg/OvmfPkg.dec
|
OvmfPkg/OvmfPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
|
BaseLib
|
||||||
BaseMemoryLib
|
BaseMemoryLib
|
||||||
DebugLib
|
DebugLib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
@ -43,11 +44,11 @@
|
|||||||
PciLib
|
PciLib
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration
|
||||||
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciIoBase
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciIoSize
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size
|
gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration
|
|
||||||
|
@ -6,21 +6,19 @@
|
|||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
**/
|
**/
|
||||||
#include <PiDxe.h>
|
|
||||||
|
|
||||||
#include <IndustryStandard/Pci.h>
|
#include <IndustryStandard/Pci.h> // EFI_PCI_COMMAND_IO_SPACE
|
||||||
#include <IndustryStandard/Q35MchIch9.h>
|
#include <IndustryStandard/Q35MchIch9.h> // INTEL_Q35_MCH_DEVICE_ID
|
||||||
|
#include <Library/BaseLib.h> // DisableInterrupts()
|
||||||
|
#include <Library/BaseMemoryLib.h> // ZeroMem()
|
||||||
|
#include <Library/DebugLib.h> // ASSERT()
|
||||||
|
#include <Library/MemoryAllocationLib.h> // ReallocatePool()
|
||||||
|
#include <Library/PcdLib.h> // PcdGet16()
|
||||||
|
#include <Library/PciHostBridgeLib.h> // PCI_ROOT_BRIDGE_APERTURE
|
||||||
|
#include <Library/PciHostBridgeUtilityLib.h> // PciHostBridgeUtilityInitRoot...
|
||||||
|
#include <Library/PciLib.h> // PciRead32()
|
||||||
|
#include <Protocol/PciRootBridgeIo.h> // EFI_PCI_ATTRIBUTE_ISA_IO
|
||||||
|
|
||||||
#include <Protocol/PciHostBridgeResourceAllocation.h>
|
|
||||||
#include <Protocol/PciRootBridgeIo.h>
|
|
||||||
|
|
||||||
#include <Library/BaseMemoryLib.h>
|
|
||||||
#include <Library/DebugLib.h>
|
|
||||||
#include <Library/MemoryAllocationLib.h>
|
|
||||||
#include <Library/PcdLib.h>
|
|
||||||
#include <Library/PciHostBridgeLib.h>
|
|
||||||
#include <Library/PciHostBridgeUtilityLib.h>
|
|
||||||
#include <Library/PciLib.h>
|
|
||||||
#include "PciHostBridge.h"
|
#include "PciHostBridge.h"
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user