TianoCore EDK2 master
Loading...
Searching...
No Matches
PciCfg2.h
Go to the documentation of this file.
1
15#ifndef __PEI_PCI_CFG2_H__
16#define __PEI_PCI_CFG2_H__
17
18#include <Library/BaseLib.h>
19
20#define EFI_PEI_PCI_CFG2_PPI_GUID \
21 { 0x57a449a, 0x1fdc, 0x4c06, { 0xbf, 0xc9, 0xf5, 0x3f, 0x6a, 0x99, 0xbb, 0x92 } }
22
24
25#define EFI_PEI_PCI_CFG_ADDRESS(bus, dev, func, reg) \
26 (UINT64) ( \
27 (((UINTN) bus) << 24) | \
28 (((UINTN) dev) << 16) | \
29 (((UINTN) func) << 8) | \
30 (((UINTN) (reg)) < 256 ? ((UINTN) (reg)) : (UINT64) (LShiftU64 ((UINT64) (reg), 32))))
31
35typedef enum {
52 EfiPeiPciCfgWidthMaximum
54
58typedef struct {
63 UINT8 Register;
68 UINT8 Function;
72 UINT8 Device;
76 UINT8 Bus;
84
109typedef
112 IN CONST EFI_PEI_SERVICES **PeiServices,
115 IN UINT64 Address,
116 IN OUT VOID *Buffer
117 );
118
149typedef
152 IN CONST EFI_PEI_SERVICES **PeiServices,
155 IN UINT64 Address,
156 IN VOID *SetBits,
157 IN VOID *ClearBits
158 );
159
171 UINT16 Segment;
172};
173
174extern EFI_GUID gEfiPciCfg2PpiGuid;
175
176#endif
STATIC VOID ClearBits(IN EFI_PHYSICAL_ADDRESS Address, IN UINTN BitNumber, IN UINT64 *BitMap)
Definition: HeapGuard.c:113
STATIC VOID SetBits(IN EFI_PHYSICAL_ADDRESS Address, IN UINTN BitNumber, IN UINT64 *BitMap)
Definition: HeapGuard.c:57
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_PEI_PCI_CFG_PPI_WIDTH
Definition: PciCfg2.h:35
@ EfiPeiPciCfgWidthUint64
Definition: PciCfg2.h:51
@ EfiPeiPciCfgWidthUint8
Definition: PciCfg2.h:39
@ EfiPeiPciCfgWidthUint16
Definition: PciCfg2.h:43
@ EfiPeiPciCfgWidthUint32
Definition: PciCfg2.h:47
EFI_STATUS(EFIAPI * EFI_PEI_PCI_CFG2_PPI_RW)(IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PCI_CFG2_PPI *This, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN VOID *SetBits, IN VOID *ClearBits)
Definition: PciCfg2.h:151
EFI_STATUS(EFIAPI * EFI_PEI_PCI_CFG2_PPI_IO)(IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PCI_CFG2_PPI *This, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN OUT VOID *Buffer)
Definition: PciCfg2.h:111
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
Definition: Base.h:213