channel, csrow);
}
+
+ if (e->vdata_len) {
+ uint64_t smca_config = e->vdata[2];
+
+ /*
+ * BIT 9 of the CONFIG register of a few SMCA Bank types indicates
+ * presence of FRU Text in SYND 1 / 2 registers
+ */
+ if (smca_config & BIT(9))
+ memcpy(e->frutext, e->vdata, 16);
+ }
+
}
int parse_amd_smca_event(struct ras_events *ras, struct mce_event *e)
trace_seq_printf(s, ", apicid= %x", e->apicid);
+ if (!e->vdata_len)
+ return;
+
+ if (strlen(e->frutext)) {
+ trace_seq_printf(s, ", FRU Text= %s", e->frutext);
+ trace_seq_printf(s, ", Vendor Data= ");
+ for (int i = 2; i < e->vdata_len/8; i++) {
+ trace_seq_printf(s, "0x%lx", e->vdata[i]);
+ trace_seq_printf(s, " ");
+ }
+ } else {
+ trace_seq_printf(s, ", Vendor Data= ");
+ for (int i = 0; i < e->vdata_len/8; i ++) {
+ trace_seq_printf(s, "0x%lx", e->vdata[i]);
+ trace_seq_printf(s, " ");
+ }
+ }
+
/*
* FIXME: The original mcelog userspace tool uses DMI to map from
* address to DIMM. From the comments there, the code there doesn't
return -1;
e.ipid = val;
+ /* Get Vendor-specfic Data, if any */
+ e.vdata = tep_get_field_raw(s, event, "v_data", record, &e.vdata_len, 1);
+
switch (mce->cputype) {
case CPU_GENERIC:
break;