Lawrence Tang | 214a154 | 2022-07-06 14:11:28 +0100 | [diff] [blame] | 1 | #ifndef CPER_SECTION_PCI_BUS_H |
| 2 | #define CPER_SECTION_PCI_BUS_H |
| 3 | |
Karthik Rajagopalan | 255bd81 | 2024-09-06 14:36:34 -0700 | [diff] [blame] | 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
Lawrence Tang | 5202bbb | 2022-08-12 14:54:36 +0100 | [diff] [blame] | 8 | #include <json.h> |
Lawrence Tang | 214a154 | 2022-07-06 14:11:28 +0100 | [diff] [blame] | 9 | #include "../edk/Cper.h" |
| 10 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 11 | #define PCI_BUS_ERROR_VALID_BITFIELD_NAMES \ |
| 12 | (const char *[]) \ |
| 13 | { \ |
| 14 | "errorStatusValid", "errorTypeValid", "busIDValid", \ |
| 15 | "busAddressValid", "busDataValid", "commandValid", \ |
| 16 | "requestorIDValid", "completerIDValid", \ |
| 17 | "targetIDValid" \ |
| 18 | } |
| 19 | #define PCI_BUS_ERROR_TYPES_KEYS \ |
| 20 | (int[]) \ |
| 21 | { \ |
| 22 | 0, 1, 2, 3, 4, 5, 6, 7 \ |
| 23 | } |
| 24 | #define PCI_BUS_ERROR_TYPES_VALUES \ |
| 25 | (const char *[]) \ |
| 26 | { \ |
| 27 | "Unknown/OEM Specific Error", "Data Parity Error", \ |
| 28 | "System Error", "Master Abort", \ |
| 29 | "Bus Timeout/No Device Present (No DEVSEL#)", \ |
| 30 | "Master Data Parity Error", "Address Parity Error", \ |
| 31 | "Command Parity Error" \ |
| 32 | } |
Lawrence Tang | 214a154 | 2022-07-06 14:11:28 +0100 | [diff] [blame] | 33 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 34 | json_object *cper_section_pci_bus_to_ir(void *section); |
| 35 | void ir_section_pci_bus_to_cper(json_object *section, FILE *out); |
Lawrence Tang | 214a154 | 2022-07-06 14:11:28 +0100 | [diff] [blame] | 36 | |
Karthik Rajagopalan | 255bd81 | 2024-09-06 14:36:34 -0700 | [diff] [blame] | 37 | #ifdef __cplusplus |
| 38 | } |
| 39 | #endif |
| 40 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 41 | #endif |