17f21db6cSLawrence Tang #ifndef CPER_SECTION_ARM_H
27f21db6cSLawrence Tang #define CPER_SECTION_ARM_H
37f21db6cSLawrence Tang 
47f21db6cSLawrence Tang #include "json.h"
57f21db6cSLawrence Tang #include "../edk/Cper.h"
67f21db6cSLawrence Tang 
77f21db6cSLawrence Tang #define MEMORY_ERROR_VALID_BITFIELD_NAMES (const char*[]) \
87f21db6cSLawrence Tang     {"errorStatusValid", "physicalAddressValid", "physicalAddressMaskValid", "nodeValid", "cardValid", "moduleValid", \
97f21db6cSLawrence Tang     "bankValid", "deviceValid", "rowValid", "columnValid", "bitPositionValid", "platformRequestorIDValid", \
107f21db6cSLawrence Tang     "platformResponderIDValid", "memoryPlatformTargetValid", "memoryErrorTypeValid", "rankNumberValid", \
117f21db6cSLawrence Tang     "cardHandleValid", "moduleHandleValid", "extendedRowBitsValid", "bankGroupValid", "bankAddressValid", \
127f21db6cSLawrence Tang     "chipIdentificationValid"}
13*a0865e38SLawrence Tang #define MEMORY_ERROR_TYPES_KEYS (int []){0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
14*a0865e38SLawrence Tang #define MEMORY_ERROR_TYPES_VALUES (const char*[]){"Unknown", "No Error", "Single-bit ECC", \
15*a0865e38SLawrence Tang     "Multi-bit ECC", "Single-symbol ChipKill ECC", "Multi-symbol ChipKill ECC", "Master Abort", \
16*a0865e38SLawrence Tang     "Target Abort", "Parity Error", "Watchdog Timeout", "Invalid Address", "Mirror Broken", \
17*a0865e38SLawrence Tang     "Memory Sparing", "Scrub Corrected Error", "Scrub Uncorrected Error", "Physical Memory Map-out Event"}
187f21db6cSLawrence Tang 
19*a0865e38SLawrence Tang json_object* cper_section_platform_memory_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
20*a0865e38SLawrence Tang json_object* cper_section_platform_memory2_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
217f21db6cSLawrence Tang 
227f21db6cSLawrence Tang #endif