TianoCore EDK2 master
|
#include "PciBus.h"
Go to the source code of this file.
Functions | |
VOID EFIAPI | PciHPCInitialized (IN EFI_EVENT Event, IN VOID *Context) |
BOOLEAN | EfiCompareDevicePath (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath1, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2) |
EFI_STATUS | InitializeHotPlugSupport (VOID) |
BOOLEAN | IsRootPciHotPlugBus (IN EFI_DEVICE_PATH_PROTOCOL *HpbDevicePath, OUT UINTN *HpIndex OPTIONAL) |
BOOLEAN | IsRootPciHotPlugController (IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath, OUT UINTN *HpIndex) |
EFI_STATUS | CreateEventForHpc (IN UINTN HpIndex, OUT EFI_EVENT *Event) |
EFI_STATUS | AllRootHPCInitialized (IN UINTN TimeoutInMicroSeconds) |
BOOLEAN | IsSHPC (IN PCI_IO_DEVICE *PciIoDevice) |
BOOLEAN | SupportsPcieHotplug (IN PCI_IO_DEVICE *PciIoDevice) |
VOID | GetResourcePaddingForHpb (IN PCI_IO_DEVICE *PciIoDevice) |
BOOLEAN | IsPciHotPlugBus (PCI_IO_DEVICE *PciIoDevice) |
Variables | |
EFI_PCI_HOT_PLUG_INIT_PROTOCOL * | gPciHotPlugInit = NULL |
EFI_HPC_LOCATION * | gPciRootHpcPool = NULL |
UINTN | gPciRootHpcCount = 0 |
ROOT_HPC_DATA * | gPciRootHpcData = NULL |
PCI Hot Plug support functions implementation for PCI Bus module..
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PciHotPlugSupport.c.
EFI_STATUS AllRootHPCInitialized | ( | IN UINTN | TimeoutInMicroSeconds | ) |
Wait for all root PCI Hot Plug controller finished initializing.
TimeoutInMicroSeconds | Microseconds to wait for all root HPCs' initialization. |
EFI_SUCCESS | All HPCs initialization finished. |
EFI_TIMEOUT | Not ALL HPCs initialization finished in Microseconds. |
Definition at line 233 of file PciHotPlugSupport.c.
EFI_STATUS CreateEventForHpc | ( | IN UINTN | HpIndex, |
OUT EFI_EVENT * | Event | ||
) |
Creating event object for PCI Hot Plug controller.
HpIndex | Index of hot plug device in global array. |
Event | The returned event that invoke this function. |
Definition at line 201 of file PciHotPlugSupport.c.
BOOLEAN EfiCompareDevicePath | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath1, |
IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath2 | ||
) |
Compare two device paths to check if they are exactly same.
DevicePath1 | A pointer to the first device path data structure. |
DevicePath2 | A pointer to the second device path data structure. |
TRUE | They are same. |
FALSE | They are not same. |
Definition at line 47 of file PciHotPlugSupport.c.
VOID GetResourcePaddingForHpb | ( | IN PCI_IO_DEVICE * | PciIoDevice | ) |
Get resource padding if the specified PCI bridge is a hot plug bus.
PciIoDevice | PCI bridge instance. |
Definition at line 402 of file PciHotPlugSupport.c.
EFI_STATUS InitializeHotPlugSupport | ( | VOID | ) |
Check hot plug support and initialize root hot plug private data.
If Hot Plug is supported by the platform, call PCI Hot Plug Init protocol to get PCI Hot Plug controller's information and constructor the root hot plug private data structure.
EFI_SUCCESS | They are same. |
EFI_UNSUPPORTED | No PCI Hot Plug controller on the platform. |
EFI_OUT_OF_RESOURCES | No memory to constructor root hot plug private data structure. |
Definition at line 83 of file PciHotPlugSupport.c.
BOOLEAN IsPciHotPlugBus | ( | PCI_IO_DEVICE * | PciIoDevice | ) |
Test whether PCI device is hot plug bus.
PciIoDevice | PCI device instance. |
TRUE | PCI device is a hot plug bus. |
FALSE | PCI device is not a hot plug bus. |
Definition at line 449 of file PciHotPlugSupport.c.
BOOLEAN IsRootPciHotPlugBus | ( | IN EFI_DEVICE_PATH_PROTOCOL * | HpbDevicePath, |
OUT UINTN *HpIndex | OPTIONAL | ||
) |
Test whether device path is for root pci hot plug bus.
HpbDevicePath | A pointer to device path data structure to be tested. |
HpIndex | If HpIndex is not NULL, return the index of root hot plug in global array when TRUE is returned. |
TRUE | The device path is for root pci hot plug bus. |
FALSE | The device path is not for root pci hot plug bus. |
Definition at line 139 of file PciHotPlugSupport.c.
BOOLEAN IsRootPciHotPlugController | ( | IN EFI_DEVICE_PATH_PROTOCOL * | HpcDevicePath, |
OUT UINTN * | HpIndex | ||
) |
Test whether device path is for root pci hot plug controller.
HpcDevicePath | A pointer to device path data structure to be tested. |
HpIndex | If HpIndex is not NULL, return the index of root hot plug in global array when TRUE is returned. |
TRUE | The device path is for root pci hot plug controller. |
FALSE | The device path is not for root pci hot plug controller. |
Definition at line 171 of file PciHotPlugSupport.c.
BOOLEAN IsSHPC | ( | IN PCI_IO_DEVICE * | PciIoDevice | ) |
Check whether PCI-PCI bridge has PCI Hot Plug capability register block.
PciIoDevice | A Pointer to the PCI-PCI bridge. |
TRUE | PCI device is HPC. |
FALSE | PCI device is not HPC. |
Definition at line 274 of file PciHotPlugSupport.c.
Event notification function to set Hot Plug controller status.
Event | The event that invoke this function. |
Context | The calling context, pointer to ROOT_HPC_DATA. |
Definition at line 25 of file PciHotPlugSupport.c.
BOOLEAN SupportsPcieHotplug | ( | IN PCI_IO_DEVICE * | PciIoDevice | ) |
Check whether PciIoDevice supports PCIe hotplug.
This is equivalent to the following condition:
[in] | PciIoDevice | The device being checked. |
TRUE | PciIoDevice is a PCIe port that accepts a hot-plugged device. |
FALSE | Otherwise. |
Definition at line 321 of file PciHotPlugSupport.c.
EFI_PCI_HOT_PLUG_INIT_PROTOCOL* gPciHotPlugInit = NULL |
Definition at line 11 of file PciHotPlugSupport.c.
UINTN gPciRootHpcCount = 0 |
Definition at line 13 of file PciHotPlugSupport.c.
ROOT_HPC_DATA* gPciRootHpcData = NULL |
Definition at line 14 of file PciHotPlugSupport.c.
EFI_HPC_LOCATION* gPciRootHpcPool = NULL |
Definition at line 12 of file PciHotPlugSupport.c.