[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250403231339.23708-10-zaidal@os.amperecomputing.com>
Date: Thu, 3 Apr 2025 16:13:39 -0700
From: Zaid Alali <zaidal@...amperecomputing.com>
To: rafael@...nel.org,
lenb@...nel.org,
james.morse@....com,
tony.luck@...el.com,
bp@...en8.de,
robert.moore@...el.com,
dan.j.williams@...el.com,
zaidal@...amperecomputing.com,
Jonathan.Cameron@...wei.com,
Benjamin.Cheatham@....com,
Avadhut.Naik@....com,
viro@...iv.linux.org.uk,
arnd@...db.de,
ira.weiny@...el.com,
dave.jiang@...el.com,
sthanneeru.opensrc@...ron.com,
linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org,
acpica-devel@...ts.linux.dev
Subject: [PATCH v5 9/9] ACPI: APEI: EINJ: Update the documentation for EINJv2 support
Add documentation for the updated ACPI specs for EINJv2(1)(2)
(1) https://github.com/tianocore/edk2/issues/9449
(2) https://github.com/tianocore/edk2/issues/9017
Signed-off-by: Zaid Alali <zaidal@...amperecomputing.com>
---
.../firmware-guide/acpi/apei/einj.rst | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/Documentation/firmware-guide/acpi/apei/einj.rst b/Documentation/firmware-guide/acpi/apei/einj.rst
index c52b9da08fa9..edf3a2165e75 100644
--- a/Documentation/firmware-guide/acpi/apei/einj.rst
+++ b/Documentation/firmware-guide/acpi/apei/einj.rst
@@ -59,6 +59,9 @@ The following files belong to it:
0x00000200 Platform Correctable
0x00000400 Platform Uncorrectable non-fatal
0x00000800 Platform Uncorrectable fatal
+ V2_0x00000001 EINJV2 Processor Error
+ V2_0x00000002 EINJV2 Memory Error
+ V2_0x00000004 EINJV2 PCI Express Error
================ ===================================
The format of the file contents are as above, except present are only
@@ -88,6 +91,8 @@ The following files belong to it:
Memory address and mask valid (param1 and param2).
Bit 2
PCIe (seg,bus,dev,fn) valid (see param4 below).
+ Bit 3
+ EINJv2 extension structure is valid
If set to zero, legacy behavior is mimicked where the type of
injection specifies just one bit set, and param1 is multiplexed.
@@ -122,6 +127,13 @@ The following files belong to it:
this actually works depends on what operations the BIOS actually
includes in the trigger phase.
+- einjv2_component_array
+
+ The contents of this file are used to set the "Component Array" field
+ of the EINJv2 Extension Structure. The expected format is hex values
+ for component id and syndrome separated by space, and multiple
+ components are separated by new line.
+
CXL error types are supported from ACPI 6.5 onwards (given a CXL port
is present). The EINJ user interface for CXL error types is at
<debugfs mount point>/cxl. The following files belong to it:
@@ -194,6 +206,26 @@ An error injection example::
# echo 0x8 > error_type # Choose correctable memory error
# echo 1 > error_inject # Inject now
+An EINJv2 error injection example::
+
+ # cd /sys/kernel/debug/apei/einj
+ # cat available_error_type # See which errors can be injected
+ 0x00000002 Processor Uncorrectable non-fatal
+ 0x00000008 Memory Correctable
+ 0x00000010 Memory Uncorrectable non-fatal
+ V2_0x00000001 EINJV2 Processor Error
+ V2_0x00000002 EINJV2 Memory Error
+
+ # echo 0x12345000 > param1 # Set memory address for injection
+ # echo 0xfffffffffffff000 > param2 # Range - anywhere in this page
+ # comp_arr="0x1 0x2 # Fill in the component array
+ >0x1 0x4
+ >0x2 0x4"
+ # echo "$comp_arr" > einjv2_component_array
+ # echo V2_0x2 > error_type # Choose EINJv2 memory error
+ # echo 0xa > flags # set flags to indicate EINJv2
+ # echo 1 > error_inject # Inject now
+
You should see something like this in dmesg::
[22715.830801] EDAC sbridge MC3: HANDLING MCE MEMORY ERROR
--
2.43.0
Powered by blists - more mailing lists