TianoCore EDK2 master
Loading...
Searching...
No Matches
PciConfigSpaceParser.h
Go to the documentation of this file.
1
15#ifndef PCI_CONFIG_SPACE_PARSER_H_
16#define PCI_CONFIG_SPACE_PARSER_H_
17
26#define READ_BITS(ADDR, OFF, LEN) (((ADDR) >> (OFF)) & ((1<<(LEN))-1))
27
28/* Pci address attributes.
29*/
31#define READ_PCI_N(ADDR) READ_BITS((ADDR), 31, 1)
33#define READ_PCI_P(ADDR) READ_BITS((ADDR), 30, 1)
35#define READ_PCI_T(ADDR) READ_BITS((ADDR), 29, 1)
36
44#define READ_PCI_SS(ADDR) READ_BITS((ADDR), 24, 2)
46#define READ_PCI_BBBBBBBB(ADDR) READ_BITS((ADDR), 16, 8)
48#define READ_PCI_DDDDD(ADDR) READ_BITS((ADDR), 11, 5)
49
55#define PCI_ADDRESS_CELLS 3U
56#define PCI_SIZE_CELLS 2U
57#define PCI_INTERRUPTS_CELLS 1U
58
65#define DT_PCI_IRQ_FLAGS(x) (((x) & 0xF) == BIT0)
66
69typedef enum PciMappingTable {
74
75#pragma pack(1)
76
84typedef struct PciParserTable {
87
92
93#pragma pack()
94
137EFIAPI
139 IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle,
140 IN INT32 FdtBranch
141 );
142
143#endif // PCI_CONFIG_SPACE_PARSER_H_
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
enum PciMappingTable PCI_MAPPING_TABLE
struct PciParserTable PCI_PARSER_TABLE
PciMappingTable
@ PciMappingTableMax
2 - Max
@ PciMappingTableInterrupt
1 - Interrupt mapping
@ PciMappingTableAddress
0 - Address mapping
EFI_STATUS EFIAPI PciConfigInfoParser(IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle, IN INT32 FdtBranch)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO PciConfigSpaceInfo
PCI Configuration Space Info.
CM_OBJ_DESCRIPTOR Mapping[PciMappingTableMax]