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