X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FBus%2FPci%2FPciBusDxe%2FPciEnumeratorSupport.h;h=7daa6e020d09eefe9df89723bb3c6221f39e94db;hb=cb8349f01ae05cce46213fc98308ee524adf257b;hp=b51a8705bb3b4d3bbae1e22e3493882419a2c4c6;hpb=fcdfcdbfc2e5dc6a96ce550a1f46edb4007f35a9;p=mirror_edk2.git diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.h b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.h index b51a8705bb..7daa6e020d 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.h +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.h @@ -1,14 +1,8 @@ /** @file PCI enumeration support functions declaration for PCI Bus module. -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -30,11 +24,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ EFI_STATUS PciDevicePresent ( - IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo, - OUT PCI_TYPE00 *Pci, - IN UINT8 Bus, - IN UINT8 Device, - IN UINT8 Func + IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo, + OUT PCI_TYPE00 *Pci, + IN UINT8 Bus, + IN UINT8 Device, + IN UINT8 Func ); /** @@ -52,8 +46,8 @@ PciDevicePresent ( **/ EFI_STATUS PciPciDeviceInfoCollector ( - IN PCI_IO_DEVICE *Bridge, - IN UINT8 StartBusNumber + IN PCI_IO_DEVICE *Bridge, + IN UINT8 StartBusNumber ); /** @@ -72,12 +66,12 @@ PciPciDeviceInfoCollector ( **/ EFI_STATUS PciSearchDevice ( - IN PCI_IO_DEVICE *Bridge, - IN PCI_TYPE00 *Pci, - IN UINT8 Bus, - IN UINT8 Device, - IN UINT8 Func, - OUT PCI_IO_DEVICE **PciDevice + IN PCI_IO_DEVICE *Bridge, + IN PCI_TYPE00 *Pci, + IN UINT8 Bus, + IN UINT8 Device, + IN UINT8 Func, + OUT PCI_IO_DEVICE **PciDevice ); /** @@ -94,11 +88,11 @@ PciSearchDevice ( **/ PCI_IO_DEVICE * GatherDeviceInfo ( - IN PCI_IO_DEVICE *Bridge, - IN PCI_TYPE00 *Pci, - IN UINT8 Bus, - IN UINT8 Device, - IN UINT8 Func + IN PCI_IO_DEVICE *Bridge, + IN PCI_TYPE00 *Pci, + IN UINT8 Bus, + IN UINT8 Device, + IN UINT8 Func ); /** @@ -115,11 +109,11 @@ GatherDeviceInfo ( **/ PCI_IO_DEVICE * GatherPpbInfo ( - IN PCI_IO_DEVICE *Bridge, - IN PCI_TYPE00 *Pci, - IN UINT8 Bus, - IN UINT8 Device, - IN UINT8 Func + IN PCI_IO_DEVICE *Bridge, + IN PCI_TYPE00 *Pci, + IN UINT8 Bus, + IN UINT8 Device, + IN UINT8 Func ); /** @@ -136,11 +130,11 @@ GatherPpbInfo ( **/ PCI_IO_DEVICE * GatherP2CInfo ( - IN PCI_IO_DEVICE *Bridge, - IN PCI_TYPE00 *Pci, - IN UINT8 Bus, - IN UINT8 Device, - IN UINT8 Func + IN PCI_IO_DEVICE *Bridge, + IN PCI_TYPE00 *Pci, + IN UINT8 Bus, + IN UINT8 Device, + IN UINT8 Func ); /** @@ -154,8 +148,8 @@ GatherP2CInfo ( **/ EFI_DEVICE_PATH_PROTOCOL * CreatePciDevicePath ( - IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath, - IN PCI_IO_DEVICE *PciIoDevice + IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath, + IN PCI_IO_DEVICE *PciIoDevice ); /** @@ -172,10 +166,10 @@ CreatePciDevicePath ( **/ EFI_STATUS VfBarExisted ( - IN PCI_IO_DEVICE *PciIoDevice, - IN UINTN Offset, - OUT UINT32 *BarLengthValue, - OUT UINT32 *OriginalBarValue + IN PCI_IO_DEVICE *PciIoDevice, + IN UINTN Offset, + OUT UINT32 *BarLengthValue, + OUT UINT32 *OriginalBarValue ); /** @@ -192,10 +186,10 @@ VfBarExisted ( **/ EFI_STATUS BarExisted ( - IN PCI_IO_DEVICE *PciIoDevice, - IN UINTN Offset, - OUT UINT32 *BarLengthValue, - OUT UINT32 *OriginalBarValue + IN PCI_IO_DEVICE *PciIoDevice, + IN UINTN Offset, + OUT UINT32 *BarLengthValue, + OUT UINT32 *OriginalBarValue ); /** @@ -212,11 +206,11 @@ BarExisted ( **/ VOID PciTestSupportedAttribute ( - IN PCI_IO_DEVICE *PciIoDevice, - IN OUT UINT16 *Command, - IN OUT UINT16 *BridgeControl, - OUT UINT16 *OldCommand, - OUT UINT16 *OldBridgeControl + IN PCI_IO_DEVICE *PciIoDevice, + IN OUT UINT16 *Command, + IN OUT UINT16 *BridgeControl, + OUT UINT16 *OldCommand, + OUT UINT16 *OldBridgeControl ); /** @@ -230,10 +224,10 @@ PciTestSupportedAttribute ( **/ VOID PciSetDeviceAttribute ( - IN PCI_IO_DEVICE *PciIoDevice, - IN UINT16 Command, - IN UINT16 BridgeControl, - IN UINTN Option + IN PCI_IO_DEVICE *PciIoDevice, + IN UINT16 Command, + IN UINT16 BridgeControl, + IN UINTN Option ); /** @@ -248,8 +242,8 @@ PciSetDeviceAttribute ( **/ EFI_STATUS GetFastBackToBackSupport ( - IN PCI_IO_DEVICE *PciIoDevice, - IN UINT8 StatusIndex + IN PCI_IO_DEVICE *PciIoDevice, + IN UINT8 StatusIndex ); /** @@ -260,7 +254,7 @@ GetFastBackToBackSupport ( **/ EFI_STATUS DetermineDeviceAttribute ( - IN PCI_IO_DEVICE *PciIoDevice + IN PCI_IO_DEVICE *PciIoDevice ); /** @@ -268,6 +262,7 @@ DetermineDeviceAttribute ( @param PciIoDevice Input Pci device instance. Output Pci device instance with updated Bar information. + @param IgnoreOptionRom Output If the option rom of incompatible device need to be ignored. @retval EFI_SUCCESS Successfully updated bar information. @retval EFI_UNSUPPORTED Given PCI device doesn't belong to incompatible PCI device list. @@ -275,7 +270,8 @@ DetermineDeviceAttribute ( **/ EFI_STATUS UpdatePciInfo ( - IN OUT PCI_IO_DEVICE *PciIoDevice + IN OUT PCI_IO_DEVICE *PciIoDevice, + OUT BOOLEAN *IgnoreOptionRom ); /** @@ -287,8 +283,8 @@ UpdatePciInfo ( **/ VOID SetNewAlign ( - IN OUT UINT64 *Alignment, - IN UINT64 NewAlignment + IN OUT UINT64 *Alignment, + IN UINT64 NewAlignment ); /** @@ -335,7 +331,7 @@ PciIovParseVfBar ( **/ VOID InitializePciDevice ( - IN PCI_IO_DEVICE *PciIoDevice + IN PCI_IO_DEVICE *PciIoDevice ); /** @@ -346,7 +342,7 @@ InitializePciDevice ( **/ VOID InitializePpb ( - IN PCI_IO_DEVICE *PciIoDevice + IN PCI_IO_DEVICE *PciIoDevice ); /** @@ -357,7 +353,7 @@ InitializePpb ( **/ VOID InitializeP2C ( - IN PCI_IO_DEVICE *PciIoDevice + IN PCI_IO_DEVICE *PciIoDevice ); /** @@ -375,11 +371,11 @@ InitializeP2C ( **/ PCI_IO_DEVICE * CreatePciIoDevice ( - IN PCI_IO_DEVICE *Bridge, - IN PCI_TYPE00 *Pci, - IN UINT8 Bus, - IN UINT8 Device, - IN UINT8 Func + IN PCI_IO_DEVICE *Bridge, + IN PCI_TYPE00 *Pci, + IN UINT8 Bus, + IN UINT8 Device, + IN UINT8 Func ); /** @@ -396,7 +392,7 @@ CreatePciIoDevice ( **/ EFI_STATUS PciEnumeratorLight ( - IN EFI_HANDLE Controller + IN EFI_HANDLE Controller ); /** @@ -430,7 +426,7 @@ PciGetBusRange ( **/ EFI_STATUS StartManagingRootBridge ( - IN PCI_IO_DEVICE *RootBridgeDev + IN PCI_IO_DEVICE *RootBridgeDev ); /** @@ -444,7 +440,7 @@ StartManagingRootBridge ( **/ BOOLEAN IsPciDeviceRejected ( - IN PCI_IO_DEVICE *PciIoDevice + IN PCI_IO_DEVICE *PciIoDevice ); /** @@ -456,8 +452,8 @@ IsPciDeviceRejected ( **/ VOID ResetAllPpbBusNumber ( - IN PCI_IO_DEVICE *Bridge, - IN UINT8 StartBusNumber + IN PCI_IO_DEVICE *Bridge, + IN UINT8 StartBusNumber ); /** @@ -469,8 +465,18 @@ ResetAllPpbBusNumber ( **/ VOID DumpPpbPaddingResource ( - IN PCI_IO_DEVICE *PciIoDevice, - IN PCI_BAR_TYPE ResourceType + IN PCI_IO_DEVICE *PciIoDevice, + IN PCI_BAR_TYPE ResourceType + ); + +/** + Dump the PCI BAR information. + + @param PciIoDevice PCI IO instance. +**/ +VOID +DumpPciBars ( + IN PCI_IO_DEVICE *PciIoDevice ); #endif