efi/cper: Add NVIDIA CPER section support
PATCH 1/1 efi/cper: Add NVIDIA CPER section support
Add support for decoding NVIDIA-specific error sections in UEFI CPER records. NVIDIA hardware generates vendor-specific CPER sections containing error signatures and diagnostic register dumps. This implementation decodes these sections and prints error details to the kernel log.
The NVIDIA CPER section contains a fixed header with error metadata (signature, error type, severity, socket) followed by variable-length register address-value pairs for hardware diagnostics.
This work is based on libcper [0].
Example output:
Hardware error from APEI Generic Hardware Error Source: 816 event severity: info
imprecise tstamp: 2025-11-17 07:57:38
Error 0, type: info
section_type: NVIDIA, error_data_length: 224
signature: HSS-IDLE
error_type: 0
error_instance: 0
severity: 0
socket: 255
number_regs: 12
instance_base: 0x0000000000000000
register[0]: address=0x0000000004f10008 value=0x0000000000002019 register[1]: address=0x0000000000000000 value=0x0000000000000000
[0] https://github.com/openbmc/libcper/commit/683e055061ce
--- drivers/firmware/efi/Kconfig | 16 ++++++ drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/cper-nvidia.c | 79 ++++++++++++++++++++++++++++++ drivers/firmware/efi/cper-nvidia.h | 33 +++++++++++++ drivers/firmware/efi/cper.c | 3 ++ include/linux/cper.h | 4 ++ 6 files changed, 136 insertions(+) create mode 100644 drivers/firmware/efi/cper-nvidia.c create mode 100644 drivers/firmware/efi/cper-nvidia.h
drivers/firmware/efi/Kconfig +16 -0
@@ -329,6 +329,22 @@ config UEFI_CPER_X86 depends on UEFI_CPER && X86 default y +config UEFI_CPER_NVIDIA + bool "UEFI CPER NVIDIA support" + depends on UEFI_CPER + help + This option enables support for decoding NVIDIA-specific error + sections in UEFI Common Platform Error Records (CPER). These + sections contain additional diagnostic information for errors + occurring in NVIDIA hardware such as GPUs, switches, and other + devices. + + The NVIDIA CPER sections include error signatures (e.g., PCIe-DPC, + DCC-ECC, GPU-STATUS) and diagnostic registers that provide detailed + information about hardware errors for debugging and analysis. + + If unsure, say N. + config TEE_STMM_EFI tristate "TEE-based EFI runtime variable service driver" depends on EFI && OPTEE
drivers/firmware/efi/Makefile +1 -0
@@ -42,5 +42,6 @@ obj-$(CONFIG_EFI_CAPSULE_LOADER) += capsule-loader.o obj-$(CONFIG_EFI_EARLYCON) += earlycon.o obj-$(CONFIG_UEFI_CPER_ARM) += cper-arm.o obj-$(CONFIG_UEFI_CPER_X86) += cper-x86.o +obj-$(CONFIG_UEFI_CPER_NVIDIA) += cper-nvidia.o obj-$(CONFIG_UNACCEPTED_MEMORY) += unaccepted_memory.o obj-$(CONFIG_TEE_STMM_EFI) += stmm/tee_stmm_efi.o
drivers/firmware/efi/cper-nvidia.c new file +79 -0
79 lines not on this page · raw message
drivers/firmware/efi/cper-nvidia.h new file +33 -0
@@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* UEFI Common Platform Error Record (CPER) support for NVIDIA sections +* +* Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +*/ + +#ifndef LINUX_CPER_NVIDIA_H +#define LINUX_CPER_NVIDIA_H + +#include <linux/cper.h> + +struct cper_sec_nvidia { +char signature[16 ]; +__le16 error_type; +__le16 error_instance; +u8 severity; +u8 socket; +u8 number_regs; +u8 reserved; +__le64 instance_base; +} __packed; + +#ifdef CONFIG_UEFI_CPER_NVIDIA +struct acpi_hest_generic_data ; +void cper_estatus_print_nvidia (const char *pfx, +const struct acpi_hest_generic_data *gdata); +#else +static inline void cper_estatus_print_nvidia (const char *pfx, +const struct acpi_hest_generic_data *gdata) { } +#endif + +#endif
drivers/firmware/efi/cper.c +3 -0
@@ -26,6 +26,7 @@#include <acpi/ghes.h> #include <ras/ras_event.h> #include <cxl/event.h> +#include "cper-nvidia.h" /* * CPER record ID need to be unique even after reboot, because record
@@ -697,6 +698,8 @@ cper_estatus_print_section(const char *pfx, struct acpi_hest_generic_data *gdatacxl_cper_print_prot_err (newpfx, prot_err); else goto err_section_too_small; + }else if (guid_equal (sec_type, &CPER_SEC_NVIDIA )) { +cper_estatus_print_nvidia (newpfx, gdata); }else {const void *err =acpi_hest_get_payload (gdata);
include/linux/cper.h +4 -0
@@ -224,6 +224,10 @@ enum {#define CPER_SEC_DMAR_IOMMU \ GUID_INIT(0x036F84E1, 0x7F37, 0x428c, 0xA7, 0x9E, 0x57, 0x5F, \ 0xDF, 0xAA, 0x84, 0xEC) +/* NVIDIA Error Section */ +#define CPER_SEC_NVIDIA \ + GUID_INIT(0x6d5244f2, 0x2712, 0x11ec, 0xbe, 0xa7, 0xcb, 0x3f, \ + 0xdb, 0x95, 0xc7, 0x86)#define CPER_PROC_VALID_TYPE 0x0001#define CPER_PROC_VALID_ISA 0x0002
Signature · 1 line
2.43.0
Quoted 84 lines
-----Original Message-----
From: Kai-Heng Feng <[email protected]>
Sent: 23 February 2026 06:49
To: [email protected]
Cc: Kai-Heng Feng <[email protected]>; Rafael J. Wysocki <[email protected]>; Tony Luck <[email protected]>; Borislav Petkov <[email protected]>; Guohanjun (Hanjun Guo) <[email protected]>; Mauro Carvalho Chehab <[email protected]>; Shuai Xue <[email protected]>; Jonathan Cameron <[email protected]>; Morduan Zang <[email protected]>; [email protected]; linux- [email protected]; [email protected]
Subject: [PATCH] efi/cper: Add NVIDIA CPER section supportAdd support for decoding NVIDIA-specific error sections in UEFI CPER records. NVIDIA hardware generates vendor-specific CPER sections containing error signatures and diagnostic register dumps. This implementation decodes these sections and prints error details to the kernel log.
The NVIDIA CPER section contains a fixed header with error metadata (signature, error type, severity, socket) followed by variable-length register address-value pairs for hardware diagnostics.
This work is based on libcper [0].
Example output:
Hardware error from APEI Generic Hardware Error Source: 816 event severity:
info imprecise tstamp: 2025-11-17 07:57:38 Error 0, type: info
section_type: NVIDIA,error_data_length: 224
signature: HSS-IDLE
error_type: 0
error_instance: 0
severity: 0
socket: 255
number_regs: 12
instance_base:0x0000000000000000
register[0]: address=0x0000000004f10008 value=0x0000000000002019 register[1]: address=0x0000000000000000 value=0x0000000000000000[0] https://github.com/openbmc/libcper/commit/683e055061ce
Signed-off-by Kai-Heng Feng <[email protected]>---
drivers/firmware/efi/Kconfig | 16 ++++++ drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/cper-nvidia.c | 79 ++++++++++++++++++++++++++++++ drivers/firmware/efi/cper-nvidia.h | 33 +++++++++++++ drivers/firmware/efi/cper.c | 3 ++ include/linux/cper.h | 4 ++ 6 files changed, 136 insertions(+)create mode 100644
drivers/firmware/efi/cper-nvidia.ccreate mode 100644drivers/firmware/efi/cper-nvidia.hdrivers/firmware/efi/Kconfig index renamed from drivers/firmware/efi/Kconfig +0
-0
29e0729299f5..ed1f53b8e878100644drivers/firmware/efi/Kconfig +16
-0@@ -329,6 +329,22 @@ config UEFI_CPER_X86 depends on UEFI_CPER && X86 default y +config UEFI_CPER_NVIDIA + bool "UEFI CPER NVIDIA support" + depends on UEFI_CPER + help + This option enables support for decoding NVIDIA-specific error + sections in UEFI Common Platform Error Records (CPER). These + sections contain additional diagnostic information for errors + occurring in NVIDIA hardware such as GPUs, switches, and other + devices. + + The NVIDIA CPER sections include error signatures (e.g., PCIe-DPC, + DCC-ECC, GPU-STATUS) and diagnostic registers that provide detailed + information about hardware errors for debugging and analysis. + + If unsure, say N. +config
TEE_STMM_EFItristate "TEE-based EFI runtime variable service driver" depends on EFI && OPTEEdrivers/firmware/efi/Makefile index renamed from drivers/firmware/efi/Makefile +0
-0
8efbcf699e4f..a571b6086860100644drivers/firmware/efi/Makefile +0
-0@@ -42,5 +42,6 @@ obj-$(CONFIG_EFI_CAPSULE_LOADER) += capsule-
Quoted 5 lines
loader.o
obj-$(CONFIG_EFI_EARLYCON) += earlycon.o
obj-$(CONFIG_UEFI_CPER_ARM) += cper-arm.o
obj-$(CONFIG_UEFI_CPER_X86) += cper-x86.o
+obj-$(CONFIG_UEFI_CPER_NVIDIA) += cper-nvidia.o
Hi,
Is drivers/firmware/efi/cper.c the right place to log vendor-specific errors, given that so far drivers/firmware/efi/ only logs CPER information defined by the standards? Vendor-specific errors are currently logged and recorded in rasdaemon.
https://github.com/mchehab/rasdaemon
https://github.com/mchehab/rasdaemon/blob/master/ras-non-standard-handler.c#L52
If some kernel-level recovery action or logging is required, we can also register with acpi/apei/ghes using ghes_register_vendor_record_notifier() to receive a callback.
https://elixir.bootlin.com/linux/v6.19.3/source/drivers/acpi/apei/ghes.c#L652
[...]
Quoted 11 lines
drivers/firmware/efi/Makefile +2
-0+/* NVIDIA Error Section */ +#define CPER_SEC_NVIDIA\drivers/firmware/efi/Makefile +2
-0+ GUID_INIT(0x6d5244f2, 0x2712, 0x11ec, 0xbe, 0xa7, 0xcb, 0x3f, \ + 0xdb, 0x95, 0xc7, 0x86)#define
CPER_PROC_VALID_TYPE0x0001
#defineCPER_PROC_VALID_ISA0x0002
--
2.43.0
Thanks,
Shiju
Hi Shiju,
Quoted 101 lines · Shiju Jose
External email: Use caution opening links or attachments
Quoted 85 lines
-----Original Message-----
From: Kai-Heng Feng <[email protected]>
Sent: 23 February 2026 06:49
To: [email protected]
Cc: Kai-Heng Feng <[email protected]>; Rafael J. Wysocki <[email protected]>; Tony Luck <[email protected]>; Borislav Petkov <[email protected]>; Guohanjun (Hanjun Guo) <[email protected]>; Mauro Carvalho Chehab <[email protected]>; Shuai Xue <[email protected]>; Jonathan Cameron <[email protected]>; Morduan Zang <[email protected]>; [email protected]; linux- [email protected]; [email protected]
Subject: [PATCH] efi/cper: Add NVIDIA CPER section supportAdd support for decoding NVIDIA-specific error sections in UEFI CPER records. NVIDIA hardware generates vendor-specific CPER sections containing error signatures and diagnostic register dumps. This implementation decodes these sections and prints error details to the kernel log.
The NVIDIA CPER section contains a fixed header with error metadata (signature, error type, severity, socket) followed by variable-length register address-value pairs for hardware diagnostics.
This work is based on libcper [0].
Example output:
Hardware error from APEI Generic Hardware Error Source: 816 event severity:
info imprecise tstamp: 2025-11-17 07:57:38 Error 0, type: info
section_type: NVIDIA,error_data_length: 224
signature: HSS-IDLE
error_type: 0
error_instance: 0
severity: 0
socket: 255
number_regs: 12
instance_base:0x0000000000000000
register[0]: address=0x0000000004f10008 value=0x0000000000002019 register[1]: address=0x0000000000000000 value=0x0000000000000000[0] https://github.com/openbmc/libcper/commit/683e055061ce
Signed-off-by Kai-Heng Feng <[email protected]>---
drivers/firmware/efi/Kconfig | 16 ++++++ drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/cper-nvidia.c | 79 ++++++++++++++++++++++++++++++ drivers/firmware/efi/cper-nvidia.h | 33 +++++++++++++ drivers/firmware/efi/cper.c | 3 ++ include/linux/cper.h | 4 ++ 6 files changed, 136 insertions(+)create mode 100644
drivers/firmware/efi/cper-nvidia.ccreate mode 100644drivers/firmware/efi/cper-nvidia.hdrivers/firmware/efi/Kconfig index renamed from drivers/firmware/efi/Kconfig +0
-0
29e0729299f5..ed1f53b8e878100644drivers/firmware/efi/Kconfig +16
-0@@ -329,6 +329,22 @@ config UEFI_CPER_X86 depends on UEFI_CPER && X86 default y +config UEFI_CPER_NVIDIA + bool "UEFI CPER NVIDIA support" + depends on UEFI_CPER + help + This option enables support for decoding NVIDIA-specific error + sections in UEFI Common Platform Error Records (CPER). These + sections contain additional diagnostic information for errors + occurring in NVIDIA hardware such as GPUs, switches, and other + devices. + + The NVIDIA CPER sections include error signatures (e.g., PCIe-DPC, + DCC-ECC, GPU-STATUS) and diagnostic registers that provide detailed + information about hardware errors for debugging and analysis. + + If unsure, say N. +config
TEE_STMM_EFI
tristate "TEE-based EFI runtime variable service driver" depends on EFI && OPTEEdrivers/firmware/efi/Makefile index renamed from drivers/firmware/efi/Makefile +0
-0
8efbcf699e4f..a571b6086860100644drivers/firmware/efi/Makefile +0
-0@@ -42,5 +42,6 @@ obj-$(CONFIG_EFI_CAPSULE_LOADER) += capsule-loader.o
Quoted 4 lines
obj-$(CONFIG_EFI_EARLYCON) += earlycon.o obj-$(CONFIG_UEFI_CPER_ARM) += cper-arm.o obj-$(CONFIG_UEFI_CPER_X86) += cper-x86.o+obj-$(CONFIG_UEFI_CPER_NVIDIA) += cper-nvidia.o
Hi,
Is
drivers/firmware/efi/cper.cthe right place to log vendor-specific errors, given that so fardrivers/firmware/efi/only logs CPER information defined by the standards? Vendor-specific errors are currently logged and recorded in rasdaemon.
https://github.com/mchehab/rasdaemon
https://github.com/mchehab/rasdaemon/blob/master/ras-non-standard-handler.c#L52
Quoted 3 lines
If some kernel-level recovery action or logging is required, we can also register with acpi/apei/ghes using
ghes_register_vendor_record_notifier()to receive a callback.
https://elixir.bootlin.com/linux/v6.19.3/source/drivers/acpi/apei/ghes.c#L652
Thank you for the info. There's indeed an ACPI node for CPER purpose. I'll see if that ACPI HID can be used for implementing using ghes_register_vendor_record_notifier().
Kai-Heng
Quoted 16 lines
[...]
Quoted 11 lines
drivers/firmware/efi/Makefile +4
-0+/* NVIDIA Error Section */ +#define CPER_SEC_NVIDIA \ + GUID_INIT(0x6d5244f2, 0x2712, 0x11ec, 0xbe, 0xa7, 0xcb, 0x3f, \ + 0xdb, 0x95, 0xc7, 0x86)#define
CPER_PROC_VALID_TYPE0x0001
#defineCPER_PROC_VALID_ISA0x0002
--
2.43.0Thanks,
Shiju