TianoCore EDK2 master
|
#include "PciBus.h"
Go to the source code of this file.
Variables | |
LIST_ENTRY | mPciDevicePool |
Supporting functions implementation for PCI devices management.
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
(C) Copyright 2018 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PciDeviceSupport.c.
PCI_IO_DEVICE * CreateRootBridge | ( | IN EFI_HANDLE | RootBridgeHandle | ) |
Create root bridge device.
RootBridgeHandle | Specified root bridge handle. |
Definition at line 811 of file PciDeviceSupport.c.
EFI_STATUS DeRegisterPciDevice | ( | IN EFI_HANDLE | Controller, |
IN EFI_HANDLE | Handle | ||
) |
This function is used to de-register the PCI IO device.
That includes un-installing PciIo protocol from the specified PCI device handle.
Controller | An EFI handle for the PCI bus controller. |
Handle | PCI device handle. |
EFI_SUCCESS | The PCI device is successfully de-registered. |
other | An error occurred when de-registering the PCI device. |
Definition at line 448 of file PciDeviceSupport.c.
VOID DestroyPciDeviceTree | ( | IN PCI_IO_DEVICE * | Bridge | ) |
Destroy all the pci device node under the bridge. Bridge itself is not included.
Bridge | A pointer to the PCI_IO_DEVICE. |
Definition at line 118 of file PciDeviceSupport.c.
VOID DestroyRootBridge | ( | IN PCI_IO_DEVICE * | RootBridge | ) |
Destroy root bridge and remove it from device tree.
RootBridge | The bridge want to be removed. |
Definition at line 69 of file PciDeviceSupport.c.
EFI_STATUS DestroyRootBridgeByHandle | ( | IN EFI_HANDLE | Controller | ) |
Destroy all device nodes under the root bridge specified by Controller.
The root bridge itself is also included.
Controller | Root bridge handle. |
EFI_SUCCESS | Destroy all device nodes successfully. |
EFI_NOT_FOUND | Cannot find any PCI device under specified root bridge. |
Definition at line 157 of file PciDeviceSupport.c.
VOID FreePciDevice | ( | IN PCI_IO_DEVICE * | PciIoDevice | ) |
Destroy a pci device node.
All direct or indirect allocated resource for this node will be freed.
PciIoDevice | A pointer to the PCI_IO_DEVICE to be destroyed. |
Definition at line 87 of file PciDeviceSupport.c.
PCI_IO_DEVICE * GetRootBridgeByHandle | ( | EFI_HANDLE | RootBridgeHandle | ) |
Get root bridge device instance by specific root bridge handle.
RootBridgeHandle | Given root bridge handle. |
Definition at line 894 of file PciDeviceSupport.c.
VOID InitializePciDevicePool | ( | VOID | ) |
Initialize the PCI devices pool.
Definition at line 23 of file PciDeviceSupport.c.
VOID InsertPciDevice | ( | IN PCI_IO_DEVICE * | Bridge, |
IN PCI_IO_DEVICE * | PciDeviceNode | ||
) |
This function is used to insert a PCI device node under a bridge.
Bridge | The PCI bridge. |
PciDeviceNode | The PCI device needs inserting. |
Definition at line 53 of file PciDeviceSupport.c.
VOID InsertRootBridge | ( | IN PCI_IO_DEVICE * | RootBridge | ) |
Insert a root bridge into PCI device pool.
RootBridge | A pointer to the PCI_IO_DEVICE. |
Definition at line 37 of file PciDeviceSupport.c.
PCI_IO_DEVICE * LocateVgaDevice | ( | IN PCI_IO_DEVICE * | Bridge | ) |
Locate the active VGA device under the bridge.
Bridge | PCI IO instance for the bridge. |
Definition at line 999 of file PciDeviceSupport.c.
PCI_IO_DEVICE * LocateVgaDeviceOnHostBridge | ( | IN EFI_HANDLE | HostBridgeHandle | ) |
Get the active VGA device on the specified Host Bridge.
HostBridgeHandle | Host Bridge handle. |
Definition at line 964 of file PciDeviceSupport.c.
BOOLEAN PciDeviceExisted | ( | IN PCI_IO_DEVICE * | Bridge, |
IN PCI_IO_DEVICE * | PciIoDevice | ||
) |
Judge whether Pci device existed.
Bridge | Parent bridge instance. |
PciIoDevice | Device instance. |
TRUE | Pci device existed. |
FALSE | Pci device did not exist. |
Definition at line 926 of file PciDeviceSupport.c.
EFI_STATUS RegisterPciDevice | ( | IN EFI_HANDLE | Controller, |
IN PCI_IO_DEVICE * | PciIoDevice, | ||
OUT EFI_HANDLE *Handle | OPTIONAL | ||
) |
This function registers the PCI IO device.
It creates a handle for this PCI IO device (if the handle does not exist), attaches appropriate protocols onto the handle, does necessary initialization, and sets up parent/child relationship with its bus controller.
Controller | An EFI handle for the PCI bus controller. |
PciIoDevice | A PCI_IO_DEVICE pointer to the PCI IO device to be registered. |
Handle | A pointer to hold the returned EFI handle for the PCI IO device. |
EFI_SUCCESS | The PCI device is successfully registered. |
other | An error occurred when registering the PCI device. |
Definition at line 201 of file PciDeviceSupport.c.
VOID RemoveAllPciDeviceOnBridge | ( | EFI_HANDLE | RootBridgeHandle, |
PCI_IO_DEVICE * | Bridge | ||
) |
This function is used to remove the whole PCI devices on the specified bridge from the root bridge.
RootBridgeHandle | The root bridge device handle. |
Bridge | The bridge device to be removed. |
Definition at line 401 of file PciDeviceSupport.c.
EFI_STATUS StartPciDevices | ( | IN EFI_HANDLE | Controller | ) |
Start to manage all the PCI devices it found previously under the entire host bridge.
Controller | The root bridge handle. |
EFI_NOT_READY | Device is not allocated. |
EFI_SUCCESS | Success to start Pci device on host bridge. |
Definition at line 766 of file PciDeviceSupport.c.
EFI_STATUS StartPciDevicesOnBridge | ( | IN EFI_HANDLE | Controller, |
IN PCI_IO_DEVICE * | RootBridge, | ||
IN EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath, | ||
IN OUT UINT8 * | NumberOfChildren, | ||
IN OUT EFI_HANDLE * | ChildHandleBuffer | ||
) |
Start to manage the PCI device on the specified root bridge or PCI-PCI Bridge.
Controller | The root bridge handle. |
RootBridge | A pointer to the PCI_IO_DEVICE. |
RemainingDevicePath | A pointer to the EFI_DEVICE_PATH_PROTOCOL. |
NumberOfChildren | Children number. |
ChildHandleBuffer | A pointer to the child handle buffer. |
EFI_NOT_READY | Device is not allocated. |
EFI_UNSUPPORTED | Device only support PCI-PCI bridge. |
EFI_NOT_FOUND | Can not find the specific device. |
EFI_SUCCESS | Success to start Pci devices on bridge. |
Definition at line 606 of file PciDeviceSupport.c.
LIST_ENTRY mPciDevicePool |
Definition at line 16 of file PciDeviceSupport.c.