xref: /openbmc/libcper/include/libcper/sections/cper-section-pci-bus.h (revision c97c041e571841f0ce67292208e083f6d858cf5c)
1  #ifndef CPER_SECTION_PCI_BUS_H
2  #define CPER_SECTION_PCI_BUS_H
3  
4  #ifdef __cplusplus
5  extern "C" {
6  #endif
7  
8  #include <stdio.h>
9  #include <json.h>
10  #include <libcper/Cper.h>
11  
12  #define PCI_BUS_ERROR_VALID_BITFIELD_NAMES                                     \
13  	(const char *[]){ "errorStatusValid", "errorTypeValid",                \
14  			  "busIDValid",	      "busAddressValid",               \
15  			  "busDataValid",     "commandValid",                  \
16  			  "requestorIDValid", "completerIDValid",              \
17  			  "targetIDValid" }
18  #define PCI_BUS_ERROR_TYPES_KEYS (int[]){ 0, 1, 2, 3, 4, 5, 6, 7 }
19  #define PCI_BUS_ERROR_TYPES_VALUES                                             \
20  	(const char *[]){ "Unknown/OEM Specific Error",                        \
21  			  "Data Parity Error",                                 \
22  			  "System Error",                                      \
23  			  "Master Abort",                                      \
24  			  "Bus Timeout/No Device Present (No DEVSEL#)",        \
25  			  "Master Data Parity Error",                          \
26  			  "Address Parity Error",                              \
27  			  "Command Parity Error" }
28  
29  json_object *cper_section_pci_bus_to_ir(void *section);
30  void ir_section_pci_bus_to_cper(json_object *section, FILE *out);
31  
32  #ifdef __cplusplus
33  }
34  #endif
35  
36  #endif
37