]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.h
OvmfPkg: introduce PciCapPciIoLib
[mirror_edk2.git] / OvmfPkg / Library / UefiPciCapPciIoLib / UefiPciCapPciIoLib.h
CommitLineData
02b9a834
LE
1/** @file\r
2 Plug an EFI_PCI_IO_PROTOCOL backend into PciCapLib, for config space access\r
3 -- internal macro and type definitions.\r
4\r
5 Copyright (C) 2018, Red Hat, Inc.\r
6\r
7 This program and the accompanying materials are licensed and made available\r
8 under the terms and conditions of the BSD License which accompanies this\r
9 distribution. The full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php\r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
13 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14**/\r
15\r
16#ifndef __UEFI_PCI_CAP_PCI_IO_LIB_H__\r
17#define __UEFI_PCI_CAP_PCI_IO_LIB_H__\r
18\r
19#include <Library/DebugLib.h>\r
20\r
21#include <Library/PciCapPciIoLib.h>\r
22\r
23#define PROTO_DEV_SIG SIGNATURE_64 ('P', 'C', 'P', 'I', 'O', 'P', 'R', 'T')\r
24\r
25typedef struct {\r
26 //\r
27 // Signature identifying the derived class.\r
28 //\r
29 UINT64 Signature;\r
30 //\r
31 // Members added by the derived class, specific to the use of\r
32 // EFI_PCI_IO_PROTOCOL.\r
33 //\r
34 EFI_PCI_IO_PROTOCOL *PciIo;\r
35 //\r
36 // Base class.\r
37 //\r
38 PCI_CAP_DEV BaseDevice;\r
39} PROTO_DEV;\r
40\r
41#define PROTO_DEV_FROM_PCI_CAP_DEV(PciDevice) \\r
42 CR (PciDevice, PROTO_DEV, BaseDevice, PROTO_DEV_SIG)\r
43\r
44#endif // __UEFI_PCI_CAP_PCI_IO_LIB_H__\r