1 #ifndef CPER_SECTION_PCIE_H 2 #define CPER_SECTION_PCIE_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 PCIE_ERROR_VALID_BITFIELD_NAMES \ 13 (const char *[]){ "portTypeValid", \ 14 "versionValid", \ 15 "commandStatusValid", \ 16 "deviceIDValid", \ 17 "deviceSerialNumberValid", \ 18 "bridgeControlStatusValid", \ 19 "capabilityStructureStatusValid", \ 20 "aerInfoValid" } 21 #define PCIE_ERROR_PORT_TYPES_KEYS (int[]){ 0, 1, 4, 5, 6, 7, 8, 9, 10 } 22 #define PCIE_ERROR_PORT_TYPES_VALUES \ 23 (const char *[]){ "PCI Express End Point", \ 24 "Legacy PCI End Point Device", \ 25 "Root Port", \ 26 "Upstream Switch Port", \ 27 "Downstream Switch Port", \ 28 "PCI Express to PCI/PCI-X Bridge", \ 29 "PCI/PCI-X Bridge to PCI Express Bridge", \ 30 "Root Complex Integrated Endpoint Device", \ 31 "Root Complex Event Collector" } 32 33 json_object *cper_section_pcie_to_ir(void *section); 34 void ir_section_pcie_to_cper(json_object *section, FILE *out); 35 36 #ifdef __cplusplus 37 } 38 #endif 39 40 #endif 41