1 #ifndef CPER_SECTION_GENERIC_H
2 #define CPER_SECTION_GENERIC_H
3 
4 #include <json.h>
5 #include "../edk/Cper.h"
6 
7 #define GENERIC_PROC_TYPES_KEYS                                                \
8 	(int[])                                                                \
9 	{                                                                      \
10 		0, 1, 2                                                        \
11 	}
12 #define GENERIC_PROC_TYPES_VALUES                                              \
13 	(const char *[])                                                       \
14 	{                                                                      \
15 		"IA32/X64", "IA64", "ARM"                                      \
16 	}
17 #define GENERIC_ISA_TYPES_KEYS                                                 \
18 	(int[])                                                                \
19 	{                                                                      \
20 		0, 1, 2, 3, 4                                                  \
21 	}
22 #define GENERIC_ISA_TYPES_VALUES                                               \
23 	(const char *[])                                                       \
24 	{                                                                      \
25 		"IA32", "IA64", "X64", "ARM A32/T32", "ARM A64"                \
26 	}
27 #define GENERIC_ERROR_TYPES_KEYS                                               \
28 	(int[])                                                                \
29 	{                                                                      \
30 		0, 1, 2, 4, 8                                                  \
31 	}
32 #define GENERIC_ERROR_TYPES_VALUES                                             \
33 	(const char *[])                                                       \
34 	{                                                                      \
35 		"Unknown", "Cache Error", "TLB Error", "Bus Error",            \
36 			"Micro-Architectural Error"                            \
37 	}
38 #define GENERIC_OPERATION_TYPES_KEYS                                           \
39 	(int[])                                                                \
40 	{                                                                      \
41 		0, 1, 2, 3                                                     \
42 	}
43 #define GENERIC_OPERATION_TYPES_VALUES                                         \
44 	(const char *[])                                                       \
45 	{                                                                      \
46 		"Unknown or Generic", "Data Read", "Data Write",               \
47 			"Instruction Execution"                                \
48 	}
49 #define GENERIC_VALIDATION_BITFIELD_NAMES                                      \
50 	(const char *[])                                                       \
51 	{                                                                      \
52 		"processorTypeValid", "processorISAValid",                     \
53 			"processorErrorTypeValid", "operationValid",           \
54 			"flagsValid", "levelValid", "cpuVersionValid",         \
55 			"cpuBrandInfoValid", "cpuIDValid",                     \
56 			"targetAddressValid", "requestorIDValid",              \
57 			"responderIDValid", "instructionIPValid"               \
58 	}
59 #define GENERIC_FLAGS_BITFIELD_NAMES                                           \
60 	(const char *[])                                                       \
61 	{                                                                      \
62 		"restartable", "preciseIP", "overflow", "corrected"            \
63 	}
64 
65 json_object *cper_section_generic_to_ir(void *section);
66 void ir_section_generic_to_cper(json_object *section, FILE *out);
67 
68 #endif
69