blob: b0042c5176115b52b3c99b95c6a8c77c006aec09 [file] [log] [blame]
Lawrence Tang4dbe3d72022-07-06 13:51:01 +01001#ifndef CPER_SECTION_PCIE_H
2#define CPER_SECTION_PCIE_H
3
Lawrence Tang5202bbb2022-08-12 14:54:36 +01004#include <json.h>
Lawrence Tang4dbe3d72022-07-06 13:51:01 +01005#include "../edk/Cper.h"
6
John Chungf8fc7052024-05-03 20:05:29 +08007#define PCIE_ERROR_VALID_BITFIELD_NAMES \
8 (const char *[]) \
9 { \
10 "portTypeValid", "versionValid", "commandStatusValid", \
11 "deviceIDValid", "deviceSerialNumberValid", \
12 "bridgeControlStatusValid", \
13 "capabilityStructureStatusValid", "aerInfoValid" \
14 }
15#define PCIE_ERROR_PORT_TYPES_KEYS \
16 (int[]) \
17 { \
18 0, 1, 4, 5, 6, 7, 8, 9, 10 \
19 }
20#define PCIE_ERROR_PORT_TYPES_VALUES \
21 (const char *[]) \
22 { \
23 "PCI Express End Point", "Legacy PCI End Point Device", \
24 "Root Port", "Upstream Switch Port", \
25 "Downstream Switch Port", \
26 "PCI Express to PCI/PCI-X Bridge", \
27 "PCI/PCI-X Bridge to PCI Express Bridge", \
28 "Root Complex Integrated Endpoint Device", \
29 "Root Complex Event Collector" \
30 }
Lawrence Tang4dbe3d72022-07-06 13:51:01 +010031
John Chungf8fc7052024-05-03 20:05:29 +080032json_object *cper_section_pcie_to_ir(void *section);
33void ir_section_pcie_to_cper(json_object *section, FILE *out);
Lawrence Tang4dbe3d72022-07-06 13:51:01 +010034
John Chungf8fc7052024-05-03 20:05:29 +080035#endif