xref: /openbmc/libcper/include/libcper/sections/cper-section-ccix-per.h (revision ad6c880fc739b6ca750c3ab594e270efd972c2ac)
1 #ifndef CPER_SECTION_CCIX_PER_H
2 #define CPER_SECTION_CCIX_PER_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 CCIX_PER_ERROR_VALID_BITFIELD_NAMES                                    \
13 	(const char *[]){ "ccixSourceIDValid", "ccixPortIDValid",              \
14 			  "ccixPERLogValid" }
15 
16 ///
17 /// CCIX PER Log Error Section
18 ///
19 typedef struct {
20 	UINT32 Length;
21 	UINT64 ValidBits;
22 	UINT8 CcixSourceId;
23 	UINT8 CcixPortId;
24 	UINT16 Reserved;
25 } __attribute__((packed, aligned(1))) EFI_CCIX_PER_LOG_DATA;
26 
27 json_object *cper_section_ccix_per_to_ir(const UINT8 *section, UINT32 size,
28 					 char **desc_string);
29 void ir_section_ccix_per_to_cper(json_object *section, FILE *out);
30 
31 #ifdef __cplusplus
32 }
33 #endif
34 
35 #endif
36