Skip to content

Commit 8bcda62

Browse files
committed
Merge branches 'acpi-apei', 'acpi-dptf' and 'acpi-debug' into linux-next
* acpi-apei: ACPI: APEI: EINJ: Update the documentation for EINJv2 support ACPI: APEI: EINJ: Enable EINJv2 error injections ACPI: APEI: EINJ: Create debugfs files to enter device id and syndrome ACPI: APEI: EINJ: Discover EINJv2 parameters ACPI: APEI: EINJ: Add einjv2 extension struct ACPI: APEI: EINJ: Enable the discovery of EINJv2 capabilities ACPI: APEI: EINJ: Fix kernel test sparse warnings * acpi-dptf: ACPI: DPTF: Support for Wildcat Lake * acpi-debug: ACPI: Enable CONFIG_ACPI_DEBUG by default
4 parents 30a2a0b + 8b148a9 + 9cf4575 + 814eca1 commit 8bcda62

10 files changed

Lines changed: 355 additions & 69 deletions

File tree

Documentation/firmware-guide/acpi/apei/einj.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
125137
CXL error types are supported from ACPI 6.5 onwards (given a CXL port
126138
is 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+
197230
You should see something like this in dmesg::
198231

199232
[22715.830801] EDAC sbridge MC3: HANDLING MCE MEMORY ERROR

drivers/acpi/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ config ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD
394394

395395
config ACPI_DEBUG
396396
bool "Debug Statements"
397+
default y
397398
help
398399
The ACPI subsystem can produce debug output. Saying Y enables this
399400
output and increases the kernel size by around 50K.

drivers/acpi/apei/apei-internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static inline u32 cper_estatus_len(struct acpi_hest_generic_status *estatus)
131131

132132
int apei_osc_setup(void);
133133

134-
int einj_get_available_error_type(u32 *type);
134+
int einj_get_available_error_type(u32 *type, int einj_action);
135135
int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2, u64 param3,
136136
u64 param4);
137137
int einj_cxl_rch_error_inject(u32 type, u32 flags, u64 param1, u64 param2,

0 commit comments

Comments
 (0)