APEI (ACPI Platform Error Interface) EINJ provides a hardware error injection mechanism. It is very useful for debugging and testing APEI and RAS features in general.
An error injection example:
1 2 3 4 5 6 7 8 9
# 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 # echo 0x12345000 > param1 # Set memory address for injection # echo $((-1 << 12)) > param2 # Mask 0xfffffffffffff000 - anywhere in this page # echo 0x8 > error_type # Choose correctable memory error # echo 1 > error_inject # Inject now