1 #ifndef CPER_SECTION_MEMORY_H 2 #define CPER_SECTION_MEMORY_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #include <json.h> 9 #include <libcper/Cper.h> 10 11 #define MEMORY_ERROR_VALID_BITFIELD_NAMES \ 12 (const char *[]) \ 13 { \ 14 "errorStatusValid", "physicalAddressValid", \ 15 "physicalAddressMaskValid", "nodeValid", "cardValid", \ 16 "moduleValid", "bankValid", "deviceValid", "rowValid", \ 17 "columnValid", "bitPositionValid", \ 18 "platformRequestorIDValid", \ 19 "platformResponderIDValid", \ 20 "memoryPlatformTargetValid", "memoryErrorTypeValid", \ 21 "rankNumberValid", "cardHandleValid", \ 22 "moduleHandleValid", "extendedRowBitsValid", \ 23 "bankGroupValid", "bankAddressValid", \ 24 "chipIdentificationValid" \ 25 } 26 #define MEMORY_ERROR_TYPES_KEYS \ 27 (int[]) \ 28 { \ 29 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 \ 30 } 31 #define MEMORY_ERROR_TYPES_VALUES \ 32 (const char *[]) \ 33 { \ 34 "Unknown", "No Error", "Single-bit ECC", "Multi-bit ECC", \ 35 "Single-symbol ChipKill ECC", \ 36 "Multi-symbol ChipKill ECC", "Master Abort", \ 37 "Target Abort", "Parity Error", "Watchdog Timeout", \ 38 "Invalid Address", "Mirror Broken", "Memory Sparing", \ 39 "Scrub Corrected Error", "Scrub Uncorrected Error", \ 40 "Physical Memory Map-out Event" \ 41 } 42 #define MEMORY_ERROR_2_VALID_BITFIELD_NAMES \ 43 (const char *[]) \ 44 { \ 45 "errorStatusValid", "physicalAddressValid", \ 46 "physicalAddressMaskValid", "nodeValid", "cardValid", \ 47 "moduleValid", "bankValid", "deviceValid", "rowValid", \ 48 "columnValid", "rankValid", "bitPositionValid", \ 49 "chipIDValid", "memoryErrorTypeValid", "statusValid", \ 50 "requestorIDValid", "responderIDValid", \ 51 "targetIDValid", "cardHandleValid", \ 52 "moduleHandleValid", "bankGroupValid", \ 53 "bankAddressValid" \ 54 } 55 56 json_object *cper_section_platform_memory_to_ir(void *section); 57 json_object *cper_section_platform_memory2_to_ir(void *section); 58 void ir_section_memory_to_cper(json_object *section, FILE *out); 59 void ir_section_memory2_to_cper(json_object *section, FILE *out); 60 61 #ifdef __cplusplus 62 } 63 #endif 64 65 #endif 66