]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Include/Library/PciCapPciIoLib.h
OvmfPkg: Apply uncrustify changes
[mirror_edk2.git] / OvmfPkg / Include / Library / PciCapPciIoLib.h
CommitLineData
02b9a834
LE
1/** @file\r
2 Library class layered on top of PciCapLib that allows clients to plug an\r
3 EFI_PCI_IO_PROTOCOL backend into PciCapLib, for config space access.\r
4\r
5 Copyright (C) 2018, Red Hat, Inc.\r
6\r
b26f0cf9 7 SPDX-License-Identifier: BSD-2-Clause-Patent\r
02b9a834
LE
8**/\r
9\r
10#ifndef __PCI_CAP_PCI_IO_LIB_H__\r
11#define __PCI_CAP_PCI_IO_LIB_H__\r
12\r
13#include <Protocol/PciIo.h>\r
14\r
15#include <Library/PciCapLib.h>\r
16\r
02b9a834
LE
17/**\r
18 Create a PCI_CAP_DEV object from an EFI_PCI_IO_PROTOCOL instance. The config\r
19 space accessors are based upon EFI_PCI_IO_PROTOCOL.Pci.Read() and\r
20 EFI_PCI_IO_PROTOCOL.Pci.Write().\r
21\r
22 @param[in] PciIo EFI_PCI_IO_PROTOCOL representation of the PCI device.\r
23\r
24 @param[out] PciDevice The PCI_CAP_DEV object constructed as described above.\r
25 PciDevice can be passed to the PciCapLib APIs.\r
26\r
27 @retval EFI_SUCCESS PciDevice has been constructed and output.\r
28\r
29 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.\r
30**/\r
31EFI_STATUS\r
32EFIAPI\r
33PciCapPciIoDeviceInit (\r
ac0a286f
MK
34 IN EFI_PCI_IO_PROTOCOL *PciIo,\r
35 OUT PCI_CAP_DEV **PciDevice\r
02b9a834
LE
36 );\r
37\r
02b9a834
LE
38/**\r
39 Free the resources used by PciDevice.\r
40\r
41 @param[in] PciDevice The PCI_CAP_DEV object to free, originally produced by\r
42 PciCapPciIoDeviceInit().\r
43**/\r
44VOID\r
45EFIAPI\r
46PciCapPciIoDeviceUninit (\r
ac0a286f 47 IN PCI_CAP_DEV *PciDevice\r
02b9a834
LE
48 );\r
49\r
50#endif // __PCI_CAP_PCI_IO_LIB_H__\r