Add ARM CPER out, fix struct misalignment.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 041d88c..7fa616d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,4 +31,5 @@
# Link library.
target_link_libraries(CPERParseLibrary json-c b64c)
-target_link_libraries(CPERParseTest CPERParseLibrary)
\ No newline at end of file
+target_link_libraries(CPERParseTest CPERParseLibrary)
+target_compile_options(CPERParseLibrary PRIVATE -Wno-address-of-packed-member)
\ No newline at end of file
diff --git a/cper-utils.c b/cper-utils.c
index db41381..ba8cd63 100644
--- a/cper-utils.c
+++ b/cper-utils.c
@@ -66,6 +66,28 @@
return result;
}
+//Converts a single object containing UINT32s into a uniform struct.
+void ir_to_uniform_struct64(json_object* ir, UINT64* start, int len, const char* names[])
+{
+ UINT64* cur = start;
+ for (int i=0; i<len; i++)
+ {
+ *cur = json_object_get_uint64(json_object_object_get(ir, names[i]));
+ cur++;
+ }
+}
+
+//Converts a single object containing UINT32s into a uniform struct.
+void ir_to_uniform_struct(json_object* ir, UINT32* start, int len, const char* names[])
+{
+ UINT32* cur = start;
+ for (int i=0; i<len; i++)
+ {
+ *cur = (UINT32)json_object_get_uint64(json_object_object_get(ir, names[i]));
+ cur++;
+ }
+}
+
//Converts a single integer value to an object containing a value, and a readable name if possible.
json_object* integer_to_readable_pair(UINT64 value, int len, int keys[], const char* values[], const char* default_value)
{
diff --git a/cper-utils.h b/cper-utils.h
index 2ef9001..1fb17cc 100644
--- a/cper-utils.h
+++ b/cper-utils.h
@@ -7,6 +7,8 @@
json_object* cper_generic_error_status_to_ir(EFI_GENERIC_ERROR_STATUS* error_status);
json_object* uniform_struct_to_ir(UINT32* start, int len, const char* names[]);
json_object* uniform_struct64_to_ir(UINT64* start, int len, const char* names[]);
+void ir_to_uniform_struct(json_object* ir, UINT32* start, int len, const char* names[]);
+void ir_to_uniform_struct64(json_object* ir, UINT64* start, int len, const char* names[]);
json_object* integer_to_readable_pair(UINT64 value, int len, int keys[], const char* values[], const char* default_value);
json_object* integer_to_readable_pair_with_desc(int value, int len, int keys[], const char* values[], const char* descriptions[], const char* default_value);
UINT64 readable_pair_to_integer(json_object* pair);
diff --git a/ir-parse.c b/ir-parse.c
index c2fef1a..80b5986 100644
--- a/ir-parse.c
+++ b/ir-parse.c
@@ -69,8 +69,8 @@
ir_section_ia32x64_to_cper(section, out);
// else if (guid_equal(&descriptors[i]->SectionType, &gEfiIpfProcessorErrorSectionGuid))
// ir_section_ipf_to_cper(section, out);
- // else if (guid_equal(&descriptors[i]->SectionType, &gEfiArmProcessorErrorSectionGuid))
- // ir_section_arm_to_cper(section, out);
+ else if (guid_equal(&descriptors[i]->SectionType, &gEfiArmProcessorErrorSectionGuid))
+ ir_section_arm_to_cper(section, out);
// else if (guid_equal(&descriptors[i]->SectionType, &gEfiPlatformMemoryErrorSectionGuid))
// ir_section_platform_memory_to_cper(section, out);
// else if (guid_equal(&descriptors[i]->SectionType, &gEfiPlatformMemoryError2SectionGuid))
diff --git a/sections/cper-section-arm.c b/sections/cper-section-arm.c
index 1b2180e..5a91235 100644
--- a/sections/cper-section-arm.c
+++ b/sections/cper-section-arm.c
@@ -20,6 +20,18 @@
json_object* cper_arm_misc_register_array_to_ir(EFI_ARM_MISC_CONTEXT_REGISTER* misc_register);
void ir_arm_error_info_to_cper(json_object* error_info, FILE* out);
void ir_arm_context_info_to_cper(json_object* context_info, FILE* out);
+void ir_arm_error_cache_tlb_info_to_cper(json_object* error_information, EFI_ARM_CACHE_ERROR_STRUCTURE* error_info_cper);
+void ir_arm_error_bus_info_to_cper(json_object* error_information, EFI_ARM_BUS_ERROR_STRUCTURE* error_info_cper);
+void ir_arm_aarch32_gpr_to_cper(json_object* registers, FILE* out);
+void ir_arm_aarch32_el1_to_cper(json_object* registers, FILE* out);
+void ir_arm_aarch32_el2_to_cper(json_object* registers, FILE* out);
+void ir_arm_aarch32_secure_to_cper(json_object* registers, FILE* out);
+void ir_arm_aarch64_gpr_to_cper(json_object* registers, FILE* out);
+void ir_arm_aarch64_el1_to_cper(json_object* registers, FILE* out);
+void ir_arm_aarch64_el2_to_cper(json_object* registers, FILE* out);
+void ir_arm_aarch64_el3_to_cper(json_object* registers, FILE* out);
+void ir_arm_misc_registers_to_cper(json_object* registers, FILE* out);
+void ir_arm_unknown_register_to_cper(json_object* registers, EFI_ARM_CONTEXT_INFORMATION_HEADER* header, FILE* out);
//Converts the given processor-generic CPER section into JSON IR.
json_object* cper_section_arm_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor)
@@ -128,13 +140,19 @@
json_object* error_subinfo = NULL;
switch (error_info->Type)
{
- case 0: //Cache
- case 1: //TLB
+ case ARM_ERROR_INFORMATION_TYPE_CACHE: //Cache
+ case ARM_ERROR_INFORMATION_TYPE_TLB: //TLB
error_subinfo = cper_arm_cache_tlb_error_to_ir((EFI_ARM_CACHE_ERROR_STRUCTURE*)&error_info->ErrorInformation, error_info);
break;
- case 2: //Bus
+ case ARM_ERROR_INFORMATION_TYPE_BUS: //Bus
error_subinfo = cper_arm_bus_error_to_ir((EFI_ARM_BUS_ERROR_STRUCTURE*)&error_info->ErrorInformation);
break;
+
+ default:
+ //Unknown/microarch, so can't be made readable. Simply dump as a uint64 data object.
+ error_subinfo = json_object_new_object();
+ json_object_object_add(error_subinfo, "data", json_object_new_uint64(*((UINT64*)&error_info->ErrorInformation)));
+ break;
}
json_object_object_add(error_info_ir, "errorInformation", error_subinfo);
@@ -253,6 +271,9 @@
{
json_object* context_ir = json_object_new_object();
+ //Version.
+ json_object_object_add(context_ir, "version", json_object_new_int(header->Version));
+
//Add the context type.
json_object* context_type = integer_to_readable_pair(header->RegisterContextType, 9,
ARM_PROCESSOR_INFO_REGISTER_CONTEXT_TYPES_KEYS,
@@ -396,7 +417,7 @@
//Version, length.
error_info_cper.Version = json_object_get_int(json_object_object_get(error_info, "version"));
- error_info_cper.Length = json_object_get_int(json_object_object_get(error_info, "version"));
+ error_info_cper.Length = json_object_get_int(json_object_object_get(error_info, "length"));
//Validation bits.
error_info_cper.ValidationBits = ir_to_bitfield(json_object_object_get(error_info, "validationBits"),
@@ -404,14 +425,31 @@
//Type, multiple error.
error_info_cper.Type = (UINT8)readable_pair_to_integer(json_object_object_get(error_info, "type"));
- error_info_cper.Type = (UINT8)readable_pair_to_integer(json_object_object_get(error_info, "multipleError"));
+ error_info_cper.MultipleError = (UINT16)readable_pair_to_integer(json_object_object_get(error_info, "multipleError"));
//Flags object.
- error_info_cper.Flags = ir_to_bitfield(json_object_object_get(error_info, "flags"),
+ error_info_cper.Flags = (UINT8)ir_to_bitfield(json_object_object_get(error_info, "flags"),
4, ARM_ERROR_INFO_ENTRY_FLAGS_NAMES);
//Error information.
- //...
+ json_object* error_info_information = json_object_object_get(error_info, "errorInformation");
+ switch (error_info_cper.Type)
+ {
+ case ARM_ERROR_INFORMATION_TYPE_CACHE:
+ case ARM_ERROR_INFORMATION_TYPE_TLB:
+ ir_arm_error_cache_tlb_info_to_cper(error_info_information, &error_info_cper.ErrorInformation.CacheError);
+ break;
+
+ case ARM_ERROR_INFORMATION_TYPE_BUS:
+ ir_arm_error_bus_info_to_cper(error_info_information, &error_info_cper.ErrorInformation.BusError);
+ break;
+
+ default:
+ //Unknown error information type.
+ *((UINT64*)&error_info_cper.ErrorInformation) =
+ json_object_get_uint64(json_object_object_get(error_info_information, "data"));
+ break;
+ }
//Virtual/physical fault address.
error_info_cper.VirtualFaultAddress = json_object_get_uint64(json_object_object_get(error_info, "virtualFaultAddress"));
@@ -422,8 +460,234 @@
fflush(out);
}
+//Converts a single ARM cache/TLB error information structure into a CPER structure.
+void ir_arm_error_cache_tlb_info_to_cper(json_object* error_information, EFI_ARM_CACHE_ERROR_STRUCTURE* error_info_cper)
+{
+ //Validation bits.
+ error_info_cper->ValidationBits = ir_to_bitfield(json_object_object_get(error_information, "validationBits"),
+ 7, ARM_CACHE_TLB_ERROR_VALID_BITFIELD_NAMES);
+
+ //Miscellaneous value fields.
+ error_info_cper->TransactionType = readable_pair_to_integer(json_object_object_get(error_information, "transactionType"));
+ error_info_cper->Operation = readable_pair_to_integer(json_object_object_get(error_information, "operation"));
+ error_info_cper->Level = json_object_get_uint64(json_object_object_get(error_information, "level"));
+ error_info_cper->ProcessorContextCorrupt =
+ json_object_get_boolean(json_object_object_get(error_information, "processorContextCorrupt"));
+ error_info_cper->Corrected = json_object_get_boolean(json_object_object_get(error_information, "corrected"));
+ error_info_cper->PrecisePC = json_object_get_boolean(json_object_object_get(error_information, "precisePC"));
+ error_info_cper->RestartablePC = json_object_get_boolean(json_object_object_get(error_information, "restartablePC"));
+ error_info_cper->Reserved = 0;
+}
+
+//Converts a single ARM bus error information structure into a CPER structure.
+void ir_arm_error_bus_info_to_cper(json_object* error_information, EFI_ARM_BUS_ERROR_STRUCTURE* error_info_cper)
+{
+ //Validation bits.
+ error_info_cper->ValidationBits = ir_to_bitfield(json_object_object_get(error_information, "validationBits"),
+ 7, ARM_BUS_ERROR_VALID_BITFIELD_NAMES);
+
+ //Miscellaneous value fields.
+ error_info_cper->TransactionType = readable_pair_to_integer(json_object_object_get(error_information, "transactionType"));
+ error_info_cper->Operation = readable_pair_to_integer(json_object_object_get(error_information, "operation"));
+ error_info_cper->Level = json_object_get_uint64(json_object_object_get(error_information, "level"));
+ error_info_cper->ProcessorContextCorrupt =
+ json_object_get_boolean(json_object_object_get(error_information, "processorContextCorrupt"));
+ error_info_cper->Corrected = json_object_get_boolean(json_object_object_get(error_information, "corrected"));
+ error_info_cper->PrecisePC = json_object_get_boolean(json_object_object_get(error_information, "precisePC"));
+ error_info_cper->RestartablePC = json_object_get_boolean(json_object_object_get(error_information, "restartablePC"));
+ error_info_cper->ParticipationType =
+ readable_pair_to_integer(json_object_object_get(error_information, "participationType"));
+ error_info_cper->AddressSpace = readable_pair_to_integer(json_object_object_get(error_information, "addressSpace"));
+ error_info_cper->AccessMode = readable_pair_to_integer(json_object_object_get(error_information, "accessMode"));
+ error_info_cper->MemoryAddressAttributes = json_object_get_uint64(json_object_object_get(error_information, "memoryAttributes"));
+ error_info_cper->Reserved = 0;
+}
+
//Converts a single ARM context information structure into CPER binary, outputting to the given stream.
void ir_arm_context_info_to_cper(json_object* context_info, FILE* out)
{
+ EFI_ARM_CONTEXT_INFORMATION_HEADER info_header;
+ //Version, array size, context type.
+ info_header.Version = json_object_get_int(json_object_object_get(context_info, "version"));
+ info_header.RegisterArraySize = json_object_get_int(json_object_object_get(context_info, "registerArraySize"));
+ info_header.RegisterContextType = readable_pair_to_integer(json_object_object_get(context_info, "registerContextType"));
+
+ //Flush to stream, write the register array itself.
+ fwrite(&info_header, sizeof(EFI_ARM_CONTEXT_INFORMATION_HEADER), 1, out);
+ fflush(out);
+
+ json_object* register_array = json_object_object_get(context_info, "registerArray");
+ switch (info_header.RegisterContextType)
+ {
+ case EFI_ARM_CONTEXT_TYPE_AARCH32_GPR:
+ ir_arm_aarch32_gpr_to_cper(register_array, out);
+ break;
+ case EFI_ARM_CONTEXT_TYPE_AARCH32_EL1:
+ ir_arm_aarch32_el1_to_cper(register_array, out);
+ break;
+ case EFI_ARM_CONTEXT_TYPE_AARCH32_EL2:
+ ir_arm_aarch32_el2_to_cper(register_array, out);
+ break;
+ case EFI_ARM_CONTEXT_TYPE_AARCH32_SECURE:
+ ir_arm_aarch32_secure_to_cper(register_array, out);
+ break;
+ case EFI_ARM_CONTEXT_TYPE_AARCH64_GPR:
+ ir_arm_aarch64_gpr_to_cper(register_array, out);
+ break;
+ case EFI_ARM_CONTEXT_TYPE_AARCH64_EL1:
+ ir_arm_aarch64_el1_to_cper(register_array, out);
+ break;
+ case EFI_ARM_CONTEXT_TYPE_AARCH64_EL2:
+ ir_arm_aarch64_el2_to_cper(register_array, out);
+ break;
+ case EFI_ARM_CONTEXT_TYPE_AARCH64_EL3:
+ ir_arm_aarch64_el3_to_cper(register_array, out);
+ break;
+ case EFI_ARM_CONTEXT_TYPE_MISC:
+ ir_arm_misc_registers_to_cper(register_array, out);
+ break;
+ default:
+ //Unknown register structure.
+ ir_arm_unknown_register_to_cper(register_array, &info_header, out);
+ break;
+ }
+}
+
+//Converts a single AARCH32 GPR CPER-JSON object to CPER binary, outputting to the given stream.
+void ir_arm_aarch32_gpr_to_cper(json_object* registers, FILE* out)
+{
+ //Get uniform register array.
+ EFI_ARM_V8_AARCH32_GPR reg_array;
+ ir_to_uniform_struct(registers, (UINT32*)®_array,
+ sizeof(EFI_ARM_V8_AARCH32_GPR) / sizeof(UINT32), ARM_AARCH32_GPR_NAMES);
+
+ //Flush to stream.
+ fwrite(®_array, sizeof(reg_array), 1, out);
+ fflush(out);
+}
+
+//Converts a single AARCH32 EL1 register set CPER-JSON object to CPER binary, outputting to the given stream.
+void ir_arm_aarch32_el1_to_cper(json_object* registers, FILE* out)
+{
+ //Get uniform register array.
+ EFI_ARM_AARCH32_EL1_CONTEXT_REGISTERS reg_array;
+ ir_to_uniform_struct(registers, (UINT32*)®_array,
+ sizeof(EFI_ARM_AARCH32_EL1_CONTEXT_REGISTERS) / sizeof(UINT32), ARM_AARCH32_EL1_REGISTER_NAMES);
+
+ //Flush to stream.
+ fwrite(®_array, sizeof(reg_array), 1, out);
+ fflush(out);
+}
+
+//Converts a single AARCH32 EL2 register set CPER-JSON object to CPER binary, outputting to the given stream.
+void ir_arm_aarch32_el2_to_cper(json_object* registers, FILE* out)
+{
+ //Get uniform register array.
+ EFI_ARM_AARCH32_EL2_CONTEXT_REGISTERS reg_array;
+ ir_to_uniform_struct(registers, (UINT32*)®_array,
+ sizeof(EFI_ARM_AARCH32_EL2_CONTEXT_REGISTERS) / sizeof(UINT32), ARM_AARCH32_EL2_REGISTER_NAMES);
+
+ //Flush to stream.
+ fwrite(®_array, sizeof(reg_array), 1, out);
+ fflush(out);
+}
+
+//Converts a single AARCH32 secure register set CPER-JSON object to CPER binary, outputting to the given stream.
+void ir_arm_aarch32_secure_to_cper(json_object* registers, FILE* out)
+{
+ //Get uniform register array.
+ EFI_ARM_AARCH32_SECURE_CONTEXT_REGISTERS reg_array;
+ ir_to_uniform_struct(registers, (UINT32*)®_array,
+ sizeof(EFI_ARM_AARCH32_SECURE_CONTEXT_REGISTERS) / sizeof(UINT32), ARM_AARCH32_SECURE_REGISTER_NAMES);
+
+ //Flush to stream.
+ fwrite(®_array, sizeof(reg_array), 1, out);
+ fflush(out);
+}
+
+//Converts a single AARCH64 GPR CPER-JSON object to CPER binary, outputting to the given stream.
+void ir_arm_aarch64_gpr_to_cper(json_object* registers, FILE* out)
+{
+ //Get uniform register array.
+ EFI_ARM_V8_AARCH64_GPR reg_array;
+ ir_to_uniform_struct64(registers, (UINT64*)®_array,
+ sizeof(EFI_ARM_V8_AARCH64_GPR) / sizeof(UINT64), ARM_AARCH64_GPR_NAMES);
+
+ //Flush to stream.
+ fwrite(®_array, sizeof(reg_array), 1, out);
+ fflush(out);
+}
+
+//Converts a single AARCH64 EL1 register set CPER-JSON object to CPER binary, outputting to the given stream.
+void ir_arm_aarch64_el1_to_cper(json_object* registers, FILE* out)
+{
+ //Get uniform register array.
+ EFI_ARM_AARCH64_EL1_CONTEXT_REGISTERS reg_array;
+ ir_to_uniform_struct64(registers, (UINT64*)®_array,
+ sizeof(EFI_ARM_AARCH64_EL1_CONTEXT_REGISTERS) / sizeof(UINT64), ARM_AARCH64_EL1_REGISTER_NAMES);
+
+ //Flush to stream.
+ fwrite(®_array, sizeof(reg_array), 1, out);
+ fflush(out);
+}
+
+//Converts a single AARCH64 EL2 register set CPER-JSON object to CPER binary, outputting to the given stream.
+void ir_arm_aarch64_el2_to_cper(json_object* registers, FILE* out)
+{
+ //Get uniform register array.
+ EFI_ARM_AARCH64_EL2_CONTEXT_REGISTERS reg_array;
+ ir_to_uniform_struct64(registers, (UINT64*)®_array,
+ sizeof(EFI_ARM_AARCH64_EL2_CONTEXT_REGISTERS) / sizeof(UINT64), ARM_AARCH64_EL2_REGISTER_NAMES);
+
+ //Flush to stream.
+ fwrite(®_array, sizeof(reg_array), 1, out);
+ fflush(out);
+}
+
+//Converts a single AARCH64 EL3 register set CPER-JSON object to CPER binary, outputting to the given stream.
+void ir_arm_aarch64_el3_to_cper(json_object* registers, FILE* out)
+{
+ //Get uniform register array.
+ EFI_ARM_AARCH64_EL3_CONTEXT_REGISTERS reg_array;
+ ir_to_uniform_struct64(registers, (UINT64*)®_array,
+ sizeof(EFI_ARM_AARCH64_EL3_CONTEXT_REGISTERS) / sizeof(UINT64), ARM_AARCH64_EL3_REGISTER_NAMES);
+
+ //Flush to stream.
+ fwrite(®_array, sizeof(reg_array), 1, out);
+ fflush(out);
+}
+
+//Converts a single ARM miscellaneous register set CPER-JSON object to CPER binary, outputting to the given stream.
+void ir_arm_misc_registers_to_cper(json_object* registers, FILE* out)
+{
+ EFI_ARM_MISC_CONTEXT_REGISTER reg_array;
+
+ //MRS encoding information.
+ json_object* mrs_encoding = json_object_object_get(registers, "mrsEncoding");
+ reg_array.MrsOp2 = json_object_get_uint64(json_object_object_get(mrs_encoding, "op2"));
+ reg_array.MrsCrm = json_object_get_uint64(json_object_object_get(mrs_encoding, "crm"));
+ reg_array.MrsCrn = json_object_get_uint64(json_object_object_get(mrs_encoding, "crn"));
+ reg_array.MrsOp1 = json_object_get_uint64(json_object_object_get(mrs_encoding, "op1"));
+ reg_array.MrsO0 = json_object_get_uint64(json_object_object_get(mrs_encoding, "o0"));
+
+ //Actual register value.
+ reg_array.Value = json_object_get_uint64(json_object_object_get(registers, "value"));
+
+ //Flush to stream.
+ fwrite(®_array, sizeof(reg_array), 1, out);
+ fflush(out);
+}
+
+//Converts a single ARM unknown register CPER-JSON object to CPER binary, outputting to the given stream.
+void ir_arm_unknown_register_to_cper(json_object* registers, EFI_ARM_CONTEXT_INFORMATION_HEADER* header, FILE* out)
+{
+ //Get base64 represented data.
+ json_object* encoded = json_object_object_get(registers, "data");
+ UINT8* decoded = b64_decode(json_object_get_string(encoded), json_object_get_string_len(encoded));
+
+ //Flush out to stream.
+ fwrite(&decoded, header->RegisterArraySize, 1, out);
+ fflush(out);
+ free(decoded);
}
\ No newline at end of file
diff --git a/sections/cper-section-arm.h b/sections/cper-section-arm.h
index a579366..19d516c 100644
--- a/sections/cper-section-arm.h
+++ b/sections/cper-section-arm.h
@@ -78,6 +78,11 @@
///
/// ARM Processor Error Information Structure
///
+#define ARM_ERROR_INFORMATION_TYPE_CACHE 0
+#define ARM_ERROR_INFORMATION_TYPE_TLB 1
+#define ARM_ERROR_INFORMATION_TYPE_BUS 2
+#define ARM_ERROR_INFORMATION_TYPE_MICROARCH 3
+
typedef struct {
UINT64 ValidationBits : 16;
UINT64 TransactionType : 2;
@@ -135,7 +140,7 @@
EFI_ARM_ERROR_INFORMATION_STRUCTURE ErrorInformation;
UINT64 VirtualFaultAddress;
UINT64 PhysicalFaultAddress;
-} EFI_ARM_ERROR_INFORMATION_ENTRY;
+} __attribute__((packed, aligned(1))) EFI_ARM_ERROR_INFORMATION_ENTRY;
///
/// ARM Processor Context Information Structure
diff --git a/specification/document/cper-json-specification.tex b/specification/document/cper-json-specification.tex
index bafc1b6..3b261a5 100644
--- a/specification/document/cper-json-specification.tex
+++ b/specification/document/cper-json-specification.tex
@@ -754,7 +754,7 @@
\hline
flags & object & An ARM Processor Error Info Flags structure as defined in Subsection \ref{subsection:armprocessorerrorinfoflagsstructure}.\\
\hline
-errorInformation & object & An error information structure, as defined in one of Subsections \ref{subsection:armprocessorerrorinfoerrorinformationcachetlbstructure} or \ref{subsection:armprocessorerrorinfoerrorinformationbusstructure}. Which structure this is depends on the \texttt{errorType.value} field.\\
+errorInformation & object & An error information structure, as defined in one of Subsections \ref{subsection:armprocessorerrorinfoerrorinformationcachetlbstructure} or \ref{subsection:armprocessorerrorinfoerrorinformationbusstructure}, or . Which structure this is depends on the \texttt{errorType.value} field.\\
\hline
virtualFaultAddress & uint64 & Indicates a virtual fault address associated with the error, such as when an error occurs in virtually indexed cache.\\
\hline
@@ -794,7 +794,7 @@
% ARM Processor Error Info Error Information (Cache/TLB) structure
\subsection{ARM Processor Error Info Cache/TLB Information Structure}
\label{subsection:armprocessorerrorinfoerrorinformationcachetlbstructure}
-This structure describes cache/TLB error information for a single ARM Processor Error Info structure (\ref{subsection:armprocessorerrorinfostructure}).
+This structure describes cache/TLB error information for a single ARM Processor Error Info structure (\ref{subsection:armprocessorerrorinfostructure}). This structure is used when the \texttt{type} field of that structure has the value 0 or 1.
\jsontable{table:armprocessorerrorinfoerrorinformationcachetlbstructure}
validationBits & object & An ARM Processor Info Cache/TLB Validation structure as defined in Subsection \ref{subsection:armprocessorerrorinfocachetlbvalidationstructure}.\\
\hline
@@ -838,7 +838,7 @@
% ARM Processor Error Info Error Information (Bus) structure
\subsection{ARM Processor Error Info Bus Information Structure}
\label{subsection:armprocessorerrorinfoerrorinformationbusstructure}
-This structure describes bus error information for a single ARM Processor Error Info structure (\ref{subsection:armprocessorerrorinfostructure}).
+This structure describes bus error information for a single ARM Processor Error Info structure (\ref{subsection:armprocessorerrorinfostructure}). This structure is used when the \texttt{type} field of that structure has the value 2.
\jsontable{table:armprocessorerrorinfoerrorinformationbusstructure}
validationBits & object & An ARM Processor Info Bus Validation structure as defined in Subsection \ref{subsection:armprocessorerrorinfobusvalidationstructure}.\\
\hline
@@ -902,11 +902,21 @@
accessModeValid & boolean & Whether the "accessMode" field in the ARM Processor Info Bus Information structure (\ref{subsection:armprocessorerrorinfoerrorinformationbusstructure}) is valid.\\
\jsontableend{ARM Processor Error Info Bus validation structure field table.}
+% ARM Processor Error Info Error Information (Microarchitecture/Undefined) structure
+\subsection{ARM Processor Error Info Microarchitecture/Undefined Information Structure}
+\label{subsection:armprocessorerrorinfoerrorinformationmicroarchundefinedstructure}
+This structure describes microarchitecture/other undefined error information for a single ARM Processor Error Info structure (\ref{subsection:armprocessorerrorinfostructure}). This structure is used when the \texttt{type} field of that structure has a value other than 0-2 (inclusive).
+\jsontable{table:armprocessorerrorinfoerrorinformationmicroarchundefinedstructure}
+data & uint64 & The unformatted data represented in the error information structure.\\
+\jsontableend{ARM Processor Error Info Microarchitecture/Undefined Information structure field table.}
+
% ARM Processor Context Info structure
\subsection{ARM Processor Context Info Structure}
\label{subsection:armprocessorcontextinfostructure}
This structure describes a single ARM Processor Context Info structure, as part of a whole ARM Processor Error structure (\ref{section:armprocessorerrorsection}).
\jsontable{table:armprocessorcontextinfostructure}
+version & int & The version of the structure. In the referenced UEFI specification, this is 0.\\
+\hline
registerContextType.value & uint64 & The raw value of the type of processor context state being reported.\\
registerContextType.name & string & The human readable name, if available, of the type of processor context state being reported.\\
\hline
diff --git a/specification/json/sections/cper-arm-processor.json b/specification/json/sections/cper-arm-processor.json
index ccad75b..b6c5255 100644
--- a/specification/json/sections/cper-arm-processor.json
+++ b/specification/json/sections/cper-arm-processor.json
@@ -274,6 +274,16 @@
"type": "integer"
}
}
+ },
+ {
+ "type": "object",
+ "requried": ["data"],
+ "additionalProperties": false,
+ "properties": {
+ "data": {
+ "type": "integer"
+ }
+ }
}
]
},
@@ -290,9 +300,13 @@
"type": "array",
"items": {
"type": "object",
- "required": ["registerContextType", "registerArraySize", "registerArray"],
+ "required": ["version", "registerContextType", "registerArraySize", "registerArray"],
"additionalProperties": false,
"properties": {
+ "version": {
+ "type": "integer",
+ "minimum": 0
+ },
"registerContextType": {
"type": "object",
"$ref": "./common/cper-json-nvp.json"