mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
ras: acpi / apei: generate trace event for unrecognized CPER section
The UEFI spec includes non-standard section type support in the Common Platform Error Record. This is defined in section N.2.3 of UEFI version 2.5. Currently if the CPER section's type (UUID) does not match any section type that the kernel knows how to parse, a trace event is not generated. Generate a trace event which contains the raw error data for non-standard section type error records. Signed-off-by: Tyler Baicar <tbaicar@codeaurora.org> CC: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org> Tested-by: Shiju Jose <shiju.jose@huawei.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
parent
0fc300f414
commit
297b64c743
5 changed files with 87 additions and 2 deletions
|
@ -161,6 +161,51 @@ TRACE_EVENT(mc_event,
|
|||
__get_str(driver_detail))
|
||||
);
|
||||
|
||||
/*
|
||||
* Non-Standard Section Report
|
||||
*
|
||||
* This event is generated when hardware detected a hardware
|
||||
* error event, which may be of non-standard section as defined
|
||||
* in UEFI spec appendix "Common Platform Error Record", or may
|
||||
* be of sections for which TRACE_EVENT is not defined.
|
||||
*
|
||||
*/
|
||||
TRACE_EVENT(non_standard_event,
|
||||
|
||||
TP_PROTO(const uuid_le *sec_type,
|
||||
const uuid_le *fru_id,
|
||||
const char *fru_text,
|
||||
const u8 sev,
|
||||
const u8 *err,
|
||||
const u32 len),
|
||||
|
||||
TP_ARGS(sec_type, fru_id, fru_text, sev, err, len),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__array(char, sec_type, UUID_SIZE)
|
||||
__array(char, fru_id, UUID_SIZE)
|
||||
__string(fru_text, fru_text)
|
||||
__field(u8, sev)
|
||||
__field(u32, len)
|
||||
__dynamic_array(u8, buf, len)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
memcpy(__entry->sec_type, sec_type, UUID_SIZE);
|
||||
memcpy(__entry->fru_id, fru_id, UUID_SIZE);
|
||||
__assign_str(fru_text, fru_text);
|
||||
__entry->sev = sev;
|
||||
__entry->len = len;
|
||||
memcpy(__get_dynamic_array(buf), err, len);
|
||||
),
|
||||
|
||||
TP_printk("severity: %d; sec type:%pU; FRU: %pU %s; data len:%d; raw data:%s",
|
||||
__entry->sev, __entry->sec_type,
|
||||
__entry->fru_id, __get_str(fru_text),
|
||||
__entry->len,
|
||||
__print_hex(__get_dynamic_array(buf), __entry->len))
|
||||
);
|
||||
|
||||
/*
|
||||
* PCIe AER Trace event
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue