@@ -59,6 +59,9 @@ The following files belong to it:
5959 0x00000200 Platform Correctable
6060 0x00000400 Platform Uncorrectable non-fatal
6161 0x00000800 Platform Uncorrectable fatal
62+ V2_0x00000001 EINJV2 Processor Error
63+ V2_0x00000002 EINJV2 Memory Error
64+ V2_0x00000004 EINJV2 PCI Express Error
6265 ================ ===================================
6366
6467 The format of the file contents are as above, except present are only
@@ -88,6 +91,8 @@ The following files belong to it:
8891 Memory address and mask valid (param1 and param2).
8992 Bit 2
9093 PCIe (seg,bus,dev,fn) valid (see param4 below).
94+ Bit 3
95+ EINJv2 extension structure is valid
9196
9297 If set to zero, legacy behavior is mimicked where the type of
9398 injection specifies just one bit set, and param1 is multiplexed.
@@ -122,6 +127,13 @@ The following files belong to it:
122127 this actually works depends on what operations the BIOS actually
123128 includes in the trigger phase.
124129
130+ - component_id0 .. component_idN, component_syndrome0 .. component_syndromeN
131+
132+ These files are used to set the "Component Array" field
133+ of the EINJv2 Extension Structure. Each holds a 128-bit
134+ hex value. Writing just a newline to any of these files
135+ sets an invalid (all-ones) value.
136+
125137CXL error types are supported from ACPI 6.5 onwards (given a CXL port
126138is present). The EINJ user interface for CXL error types is at
127139<debugfs mount point>/cxl. The following files belong to it:
@@ -194,6 +206,27 @@ An error injection example::
194206 # echo 0x8 > error_type # Choose correctable memory error
195207 # echo 1 > error_inject # Inject now
196208
209+ An EINJv2 error injection example::
210+
211+ # cd /sys/kernel/debug/apei/einj
212+ # cat available_error_type # See which errors can be injected
213+ 0x00000002 Processor Uncorrectable non-fatal
214+ 0x00000008 Memory Correctable
215+ 0x00000010 Memory Uncorrectable non-fatal
216+ V2_0x00000001 EINJV2 Processor Error
217+ V2_0x00000002 EINJV2 Memory Error
218+
219+ # echo 0x12345000 > param1 # Set memory address for injection
220+ # echo 0xfffffffffffff000 > param2 # Range - anywhere in this page
221+ # echo 0x1 > component_id0 # First device ID
222+ # echo 0x4 > component_syndrome0 # First error syndrome
223+ # echo 0x2 > component_id1 # Second device ID
224+ # echo 0x4 > component_syndrome1 # Second error syndrome
225+ # echo '' > component_id2 # Mark id2 invalid to terminate list
226+ # echo V2_0x2 > error_type # Choose EINJv2 memory error
227+ # echo 0xa > flags # set flags to indicate EINJv2
228+ # echo 1 > error_inject # Inject now
229+
197230You should see something like this in dmesg::
198231
199232 [22715.830801] EDAC sbridge MC3: HANDLING MCE MEMORY ERROR
0 commit comments