1214a1542SLawrence Tang #ifndef CPER_SECTION_PCI_BUS_H 2214a1542SLawrence Tang #define CPER_SECTION_PCI_BUS_H 3214a1542SLawrence Tang 45202bbb4SLawrence Tang #include <json.h> 5214a1542SLawrence Tang #include "../edk/Cper.h" 6214a1542SLawrence Tang 7*f8fc7052SJohn Chung #define PCI_BUS_ERROR_VALID_BITFIELD_NAMES \ 8*f8fc7052SJohn Chung (const char *[]) \ 9*f8fc7052SJohn Chung { \ 10*f8fc7052SJohn Chung "errorStatusValid", "errorTypeValid", "busIDValid", \ 11*f8fc7052SJohn Chung "busAddressValid", "busDataValid", "commandValid", \ 12*f8fc7052SJohn Chung "requestorIDValid", "completerIDValid", \ 13*f8fc7052SJohn Chung "targetIDValid" \ 14*f8fc7052SJohn Chung } 15*f8fc7052SJohn Chung #define PCI_BUS_ERROR_TYPES_KEYS \ 16*f8fc7052SJohn Chung (int[]) \ 17*f8fc7052SJohn Chung { \ 18*f8fc7052SJohn Chung 0, 1, 2, 3, 4, 5, 6, 7 \ 19*f8fc7052SJohn Chung } 20*f8fc7052SJohn Chung #define PCI_BUS_ERROR_TYPES_VALUES \ 21*f8fc7052SJohn Chung (const char *[]) \ 22*f8fc7052SJohn Chung { \ 23*f8fc7052SJohn Chung "Unknown/OEM Specific Error", "Data Parity Error", \ 24*f8fc7052SJohn Chung "System Error", "Master Abort", \ 25*f8fc7052SJohn Chung "Bus Timeout/No Device Present (No DEVSEL#)", \ 26*f8fc7052SJohn Chung "Master Data Parity Error", "Address Parity Error", \ 27*f8fc7052SJohn Chung "Command Parity Error" \ 28*f8fc7052SJohn Chung } 29214a1542SLawrence Tang 30*f8fc7052SJohn Chung json_object *cper_section_pci_bus_to_ir(void *section); 31205dd1d7SLawrence Tang void ir_section_pci_bus_to_cper(json_object *section, FILE *out); 32214a1542SLawrence Tang 33214a1542SLawrence Tang #endif 34