Add affinity3 field to json output
Affinity3 in arm processor errors is used to determine the
socket number generating the error. This is critical
information that needs to be presented to the end-user
Change-Id: I66c7d29407bb610625087b0f46e18ff868f7da64
Signed-off-by: Aushim Nagarkatti <anagarkatti@nvidia.com>
diff --git a/sections/cper-section-arm.c b/sections/cper-section-arm.c
index 119b30a..b07c829 100644
--- a/sections/cper-section-arm.c
+++ b/sections/cper-section-arm.c
@@ -73,8 +73,15 @@
json_object_object_add(section_ir, "errorAffinity", error_affinity);
//Processor ID (MPIDR_EL1) and chip ID (MIDR_EL1).
+ uint64_t sock;
+ uint64_t mpidr_eli1 = record->MPIDR_EL1;
json_object_object_add(section_ir, "mpidrEl1",
- json_object_new_uint64(record->MPIDR_EL1));
+ json_object_new_uint64(mpidr_eli1));
+ //Arm Processor socket info
+ sock = (mpidr_eli1 & ARM_SOCK_MASK) >> 32;
+ json_object_object_add(section_ir, "affinity3",
+ json_object_new_uint64(sock));
+
json_object_object_add(section_ir, "midrEl1",
json_object_new_uint64(record->MIDR_EL1));