Home | History | Annotate | Download | only in PciHostBridgeLib
      1 /** @file
      2   Header file of OVMF instance of PciHostBridgeLib.
      3 
      4   Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
      5 
      6   This program and the accompanying materials are licensed and made available
      7   under the terms and conditions of the BSD License which accompanies this
      8   distribution.  The full text of the license may be found at
      9   http://opensource.org/licenses/bsd-license.php.
     10 
     11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
     12   WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     13 
     14 **/
     15 
     16 PCI_ROOT_BRIDGE *
     17 ScanForRootBridges (
     18   UINTN      *NumberOfRootBridges
     19 );
     20 
     21 /**
     22   Initialize a PCI_ROOT_BRIDGE structure.
     23 
     24   @param[in]  Supports         Supported attributes.
     25 
     26   @param[in]  Attributes       Initial attributes.
     27 
     28   @param[in]  AllocAttributes  Allocation attributes.
     29 
     30   @param[in]  RootBusNumber    The bus number to store in RootBus.
     31 
     32   @param[in]  MaxSubBusNumber  The inclusive maximum bus number that can be
     33                                assigned to any subordinate bus found behind any
     34                                PCI bridge hanging off this root bus.
     35 
     36                                The caller is repsonsible for ensuring that
     37                                RootBusNumber <= MaxSubBusNumber. If
     38                                RootBusNumber equals MaxSubBusNumber, then the
     39                                root bus has no room for subordinate buses.
     40 
     41   @param[in]  Io               IO aperture.
     42 
     43   @param[in]  Mem              MMIO aperture.
     44 
     45   @param[in]  MemAbove4G       MMIO aperture above 4G.
     46 
     47   @param[in]  PMem             Prefetchable MMIO aperture.
     48 
     49   @param[in]  PMemAbove4G      Prefetchable MMIO aperture above 4G.
     50 
     51   @param[out] RootBus          The PCI_ROOT_BRIDGE structure (allocated by the
     52                                caller) that should be filled in by this
     53                                function.
     54 
     55   @retval EFI_SUCCESS           Initialization successful. A device path
     56                                 consisting of an ACPI device path node, with
     57                                 UID = RootBusNumber, has been allocated and
     58                                 linked into RootBus.
     59 
     60   @retval EFI_OUT_OF_RESOURCES  Memory allocation failed.
     61 **/
     62 EFI_STATUS
     63 InitRootBridge (
     64   IN  UINT64                   Supports,
     65   IN  UINT64                   Attributes,
     66   IN  UINT64                   AllocAttributes,
     67   IN  UINT8                    RootBusNumber,
     68   IN  UINT8                    MaxSubBusNumber,
     69   IN  PCI_ROOT_BRIDGE_APERTURE *Io,
     70   IN  PCI_ROOT_BRIDGE_APERTURE *Mem,
     71   IN  PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
     72   IN  PCI_ROOT_BRIDGE_APERTURE *PMem,
     73   IN  PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G,
     74   OUT PCI_ROOT_BRIDGE          *RootBus
     75   );
     76