Skip to content

Commit d7171eb

Browse files
yghannamardbiesheuvel
authored andcommitted
efi/cper: Print correctable AER information
Currently, cper_print_pcie() only logs Uncorrectable Error Status, Mask and Severity registers along with the TLP header. If a correctable error is received immediately preceding or following an Uncorrectable Fatal Error, its information is lost since Correctable Error Status and Mask registers are not logged. As such, to avoid skipping any possible error information, Correctable Error Status and Mask registers should also be logged. Additionally, ensure that AER information is also available through cper_print_pcie() for Correctable and Uncorrectable Non-Fatal Errors. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Tested-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 parent 21b91d4 commit d7171eb

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/firmware/efi/cper.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,17 @@ static void cper_print_pcie(const char *pfx, const struct cper_sec_pcie *pcie,
434434
"%s""bridge: secondary_status: 0x%04x, control: 0x%04x\n",
435435
pfx, pcie->bridge.secondary_status, pcie->bridge.control);
436436

437-
/* Fatal errors call __ghes_panic() before AER handler prints this */
438-
if ((pcie->validation_bits & CPER_PCIE_VALID_AER_INFO) &&
439-
(gdata->error_severity & CPER_SEV_FATAL)) {
437+
/*
438+
* Print all valid AER info. Record may be from BERT (boot-time) or GHES (run-time).
439+
*
440+
* Fatal errors call __ghes_panic() before AER handler prints this.
441+
*/
442+
if (pcie->validation_bits & CPER_PCIE_VALID_AER_INFO) {
440443
struct aer_capability_regs *aer;
441444

442445
aer = (struct aer_capability_regs *)pcie->aer_info;
446+
printk("%saer_cor_status: 0x%08x, aer_cor_mask: 0x%08x\n",
447+
pfx, aer->cor_status, aer->cor_mask);
443448
printk("%saer_uncor_status: 0x%08x, aer_uncor_mask: 0x%08x\n",
444449
pfx, aer->uncor_status, aer->uncor_mask);
445450
printk("%saer_uncor_severity: 0x%08x\n",

0 commit comments

Comments
 (0)