https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
53 lines
1.4 KiB
C
53 lines
1.4 KiB
C
/** @file
|
|
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
|
|
**/
|
|
|
|
#ifndef __PCI_CAP_PCI_IO_LIB_H__
|
|
#define __PCI_CAP_PCI_IO_LIB_H__
|
|
|
|
#include <Protocol/PciIo.h>
|
|
|
|
#include <Library/PciCapLib.h>
|
|
|
|
|
|
/**
|
|
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().
|
|
|
|
@param[in] PciIo EFI_PCI_IO_PROTOCOL representation of the PCI device.
|
|
|
|
@param[out] PciDevice The PCI_CAP_DEV object constructed as described above.
|
|
PciDevice can be passed to the PciCapLib APIs.
|
|
|
|
@retval EFI_SUCCESS PciDevice has been constructed and output.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES Memory allocation failed.
|
|
**/
|
|
EFI_STATUS
|
|
EFIAPI
|
|
PciCapPciIoDeviceInit (
|
|
IN EFI_PCI_IO_PROTOCOL *PciIo,
|
|
OUT PCI_CAP_DEV **PciDevice
|
|
);
|
|
|
|
|
|
/**
|
|
Free the resources used by PciDevice.
|
|
|
|
@param[in] PciDevice The PCI_CAP_DEV object to free, originally produced by
|
|
PciCapPciIoDeviceInit().
|
|
**/
|
|
VOID
|
|
EFIAPI
|
|
PciCapPciIoDeviceUninit (
|
|
IN PCI_CAP_DEV *PciDevice
|
|
);
|
|
|
|
#endif // __PCI_CAP_PCI_IO_LIB_H__
|