Commit f2f3dca1 authored by Borislav Petkov's avatar Borislav Petkov

EDAC, mce_amd_inj: Cleanup and simplify README

Save us an indentation level, widen to 80 cols, make the text more
succinct and slender. Use i as the bank variable, same as what the
documentation uses.
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
parent 6f2b6422
...@@ -253,37 +253,41 @@ MCE_INJECT_GET(bank); ...@@ -253,37 +253,41 @@ MCE_INJECT_GET(bank);
DEFINE_SIMPLE_ATTRIBUTE(bank_fops, inj_bank_get, inj_bank_set, "%llu\n"); DEFINE_SIMPLE_ATTRIBUTE(bank_fops, inj_bank_get, inj_bank_set, "%llu\n");
static const char readme_msg[] = static const char readme_msg[] =
"\nDescription of the files and their usages:\n\n" "Description of the files and their usages:\n"
"status: Set a value to be programmed into MCx_STATUS(bank)\n" "\n"
"\t The status bits provide insight into the type of\n" "Note1: i refers to the bank number below.\n"
"\t error that caused the MCE.\n\n" "Note2: See respective BKDGs for the exact bit definitions of the files below\n"
"misc: Set value of MCx_MISC(bank)\n" "as they mirror the hardware registers.\n"
"\t misc register provides auxiliary info about the error. This\n" "\n"
"\t register is typically used for error thresholding purpose and\n" "status:\t Set MCi_STATUS: the bits in that MSR control the error type and\n"
"\t validity of the register is indicated by MCx_STATUS[MiscV]\n\n" "\t attributes of the error which caused the MCE.\n"
"addr: Error address value to be written to MCx_ADDR(bank)\n" "\n"
"\t This register is used to log address information associated\n" "misc:\t Set MCi_MISC: provide auxiliary info about the error. It is mostly\n"
"\t with the error.\n\n" "\t used for error thresholding purposes and its validity is indicated by\n"
"Note: See respective BKDGs for the exact bit definitions of the\n" "\t MCi_STATUS[MiscV].\n"
"\t above registers as they mirror the MCi_[STATUS | MISC | ADDR]\n" "\n"
"\t hardware registers.\n\n" "addr:\t Error address value to be written to MCi_ADDR. Log address information\n"
"bank: Specify the bank you want to inject the error into.\n" "\t associated with the error.\n"
"\t The number of banks in a processor varies and is family/model\n" "\n"
"\t dependent. So, a sanity check performed while writing.\n" "cpu:\t The CPU to inject the error on.\n"
"\t Writing to this file will trigger a #MC or APIC interrupts or\n" "\n"
"\t invoke the error decoder routines for AMD processors. The value\n" "bank:\t Specify the bank you want to inject the error into: the number of\n"
"\t in 'flags' file decides which of above actions is triggered.\n\n" "\t banks in a processor varies and is family/model-specific, therefore, the\n"
"flags: Write to this file to speficy the error injection policy.\n" "\t supplied value is sanity-checked. Setting the bank value also triggers the\n"
"\t Allowed values:\n" "\t injection.\n"
"\t\t\"sw\" - SW error injection, Only calls error decoder\n" "\n"
"\t\t\troutines to print error info in human readable format\n" "flags:\t Injection type to be performed. Writing to this file will trigger a\n"
"\t\t\"hw\" - HW error injection, Forces a #MC,\n" "\t real machine check, an APIC interrupt or invoke the error decoder routines\n"
"\t\t\tcauses exception handler to handle the error\n" "\t for AMD processors.\n"
"\t\t\tif UC or poll handler catches it if CE\n" "\n"
"\t\t\tWarning: Might cause system panic if MCx_STATUS[PCC]\n" "\t Allowed error injection types:\n"
"\t\t\tis set. For debug purposes, consider setting\n" "\t - \"sw\": Software error injection. Decode error to a human-readable \n"
"\t\t\t/<debugfs_mountpoint>/mce/fake_panic\n" "\t format only. Safe to use.\n"
"cpu: The cpu to inject the error on.\n\n"; "\t - \"hw\": Hardware error injection. Causes the #MC exception handler to \n"
"\t handle the error. Be warned: might cause system panic if MCi_STATUS[PCC] \n"
"\t is set. Therefore, consider setting (debugfs_mountpoint)/mce/fake_panic \n"
"\t before injecting.\n"
"\n";
static ssize_t static ssize_t
inj_readme_read(struct file *filp, char __user *ubuf, inj_readme_read(struct file *filp, char __user *ubuf,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment