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