TianoCore EDK2 master
Loading...
Searching...
No Matches
PciCapPciIoLib.h File Reference
#include <Protocol/PciIo.h>
#include <Library/PciCapLib.h>

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI PciCapPciIoDeviceInit (IN EFI_PCI_IO_PROTOCOL *PciIo, OUT PCI_CAP_DEV **PciDevice)
 
VOID EFIAPI PciCapPciIoDeviceUninit (IN PCI_CAP_DEV *PciDevice)
 

Detailed Description

Library class layered on top of PciCapLib that allows clients to plug an EFI_PCI_IO_PROTOCOL backend into PciCapLib, for config space access.

Copyright (C) 2018, Red Hat, Inc.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PciCapPciIoLib.h.

Function Documentation

◆ PciCapPciIoDeviceInit()

EFI_STATUS EFIAPI PciCapPciIoDeviceInit ( IN EFI_PCI_IO_PROTOCOL PciIo,
OUT PCI_CAP_DEV **  PciDevice 
)

Create a PCI_CAP_DEV object from an EFI_PCI_IO_PROTOCOL instance. The config space accessors are based upon EFI_PCI_IO_PROTOCOL.Pci.Read() and EFI_PCI_IO_PROTOCOL.Pci.Write().

Parameters
[in]PciIoEFI_PCI_IO_PROTOCOL representation of the PCI device.
[out]PciDeviceThe PCI_CAP_DEV object constructed as described above. PciDevice can be passed to the PciCapLib APIs.
Return values
EFI_SUCCESSPciDevice has been constructed and output.
EFI_OUT_OF_RESOURCESMemory allocation failed.

Definition at line 208 of file UefiPciCapPciIoLib.c.

◆ PciCapPciIoDeviceUninit()

VOID EFIAPI PciCapPciIoDeviceUninit ( IN PCI_CAP_DEV PciDevice)

Free the resources used by PciDevice.

Parameters
[in]PciDeviceThe PCI_CAP_DEV object to free, originally produced by PciCapPciIoDeviceInit().

Definition at line 237 of file UefiPciCapPciIoLib.c.