PciHostBridge.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /** @file
  2. Header file of OVMF instance of PciHostBridgeLib.
  3. Copyright (c) 2019 Intel Corporation. All rights reserved. <BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. PCI_ROOT_BRIDGE *
  7. ScanForRootBridges (
  8. UINTN *NumberOfRootBridges
  9. );
  10. /**
  11. Initialize a PCI_ROOT_BRIDGE structure.
  12. @param[in] Supports Supported attributes.
  13. @param[in] Attributes Initial attributes.
  14. @param[in] AllocAttributes Allocation attributes.
  15. @param[in] RootBusNumber The bus number to store in RootBus.
  16. @param[in] MaxSubBusNumber The inclusive maximum bus number that can be
  17. assigned to any subordinate bus found behind any
  18. PCI bridge hanging off this root bus.
  19. The caller is repsonsible for ensuring that
  20. RootBusNumber <= MaxSubBusNumber. If
  21. RootBusNumber equals MaxSubBusNumber, then the
  22. root bus has no room for subordinate buses.
  23. @param[in] Io IO aperture.
  24. @param[in] Mem MMIO aperture.
  25. @param[in] MemAbove4G MMIO aperture above 4G.
  26. @param[in] PMem Prefetchable MMIO aperture.
  27. @param[in] PMemAbove4G Prefetchable MMIO aperture above 4G.
  28. @param[out] RootBus The PCI_ROOT_BRIDGE structure (allocated by the
  29. caller) that should be filled in by this
  30. function.
  31. @retval EFI_SUCCESS Initialization successful. A device path
  32. consisting of an ACPI device path node, with
  33. UID = RootBusNumber, has been allocated and
  34. linked into RootBus.
  35. @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
  36. **/
  37. EFI_STATUS
  38. InitRootBridge (
  39. IN UINT64 Supports,
  40. IN UINT64 Attributes,
  41. IN UINT64 AllocAttributes,
  42. IN UINT8 RootBusNumber,
  43. IN UINT8 MaxSubBusNumber,
  44. IN PCI_ROOT_BRIDGE_APERTURE *Io,
  45. IN PCI_ROOT_BRIDGE_APERTURE *Mem,
  46. IN PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
  47. IN PCI_ROOT_BRIDGE_APERTURE *PMem,
  48. IN PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G,
  49. OUT PCI_ROOT_BRIDGE *RootBus
  50. );