xref: /openbmc/libcper/include/libcper/sections/cper-section-nvidia.h (revision ad6c880fc739b6ca750c3ab594e270efd972c2ac)
1 #ifndef CPER_SECTION_NVIDIA_H
2 #define CPER_SECTION_NVIDIA_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 static const char *channel_disable_reason_dict[] = {
13 	"Alias Checker Failed",		     // 0x0
14 	"Training at POR frequency failed",  // 0x1
15 	"Training at boot frequency failed", // 0x2
16 	"Threshold of bad pages exceeded"    // 0x3
17 };
18 
19 static const size_t channel_disable_reason_dict_size =
20 	sizeof(channel_disable_reason_dict) /
21 	sizeof(channel_disable_reason_dict[0]);
22 
23 json_object *cper_section_nvidia_to_ir(const UINT8 *section, UINT32 size,
24 				       char **desc_string);
25 void ir_section_nvidia_to_cper(json_object *section, FILE *out);
26 
27 #ifdef __cplusplus
28 }
29 #endif
30 
31 #endif
32