diff options
author | Chen, Gong <gong.chen@linux.intel.com> | 2013-10-18 17:30:21 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2013-10-23 13:10:38 -0400 |
commit | fbeef85fd2ccdd61568c86fe33d6ad6b79851a53 (patch) | |
tree | 5ab8b04db760f8b5c84b4d5cbea3c47715d93ba5 | |
parent | 147de14772ed897727dba7353916b02d1e0f17f4 (diff) |
ACPI, APEI, CPER: Enhance memory reporting capability
After H/W error happens under FFM enabled mode, lots of information
are shown but new fields added by UEFI 2.4 (e.g. DIMM location) need to
be added.
Original-author: Tony Luck <tony.luck@intel.com>
Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Acked-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r-- | drivers/acpi/apei/cper.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/acpi/apei/cper.c b/drivers/acpi/apei/cper.c index 946ef520186f..b1a8a55915d9 100644 --- a/drivers/acpi/apei/cper.c +++ b/drivers/acpi/apei/cper.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/time.h> | 29 | #include <linux/time.h> |
30 | #include <linux/cper.h> | 30 | #include <linux/cper.h> |
31 | #include <linux/dmi.h> | ||
31 | #include <linux/acpi.h> | 32 | #include <linux/acpi.h> |
32 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
33 | #include <linux/aer.h> | 34 | #include <linux/aer.h> |
@@ -210,6 +211,8 @@ static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem) | |||
210 | printk("%s""card: %d\n", pfx, mem->card); | 211 | printk("%s""card: %d\n", pfx, mem->card); |
211 | if (mem->validation_bits & CPER_MEM_VALID_MODULE) | 212 | if (mem->validation_bits & CPER_MEM_VALID_MODULE) |
212 | printk("%s""module: %d\n", pfx, mem->module); | 213 | printk("%s""module: %d\n", pfx, mem->module); |
214 | if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) | ||
215 | printk("%s""rank: %d\n", pfx, mem->rank); | ||
213 | if (mem->validation_bits & CPER_MEM_VALID_BANK) | 216 | if (mem->validation_bits & CPER_MEM_VALID_BANK) |
214 | printk("%s""bank: %d\n", pfx, mem->bank); | 217 | printk("%s""bank: %d\n", pfx, mem->bank); |
215 | if (mem->validation_bits & CPER_MEM_VALID_DEVICE) | 218 | if (mem->validation_bits & CPER_MEM_VALID_DEVICE) |
@@ -232,6 +235,15 @@ static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem) | |||
232 | etype < ARRAY_SIZE(cper_mem_err_type_strs) ? | 235 | etype < ARRAY_SIZE(cper_mem_err_type_strs) ? |
233 | cper_mem_err_type_strs[etype] : "unknown"); | 236 | cper_mem_err_type_strs[etype] : "unknown"); |
234 | } | 237 | } |
238 | if (mem->validation_bits & CPER_MEM_VALID_MODULE_HANDLE) { | ||
239 | const char *bank = NULL, *device = NULL; | ||
240 | dmi_memdev_name(mem->mem_dev_handle, &bank, &device); | ||
241 | if (bank != NULL && device != NULL) | ||
242 | printk("%s""DIMM location: %s %s", pfx, bank, device); | ||
243 | else | ||
244 | printk("%s""DIMM DMI handle: 0x%.4x", | ||
245 | pfx, mem->mem_dev_handle); | ||
246 | } | ||
235 | } | 247 | } |
236 | 248 | ||
237 | static const char *cper_pcie_port_type_strs[] = { | 249 | static const char *cper_pcie_port_type_strs[] = { |