-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ACPI, APEI, Generic Hardware Error Source memory error support
Generic Hardware Error Source provides a way to report platform hardware errors (such as that from chipset). It works in so called "Firmware First" mode, that is, hardware errors are reported to firmware firstly, then reported to Linux by firmware. This way, some non-standard hardware error registers or non-standard hardware link can be checked by firmware to produce more valuable hardware error information for Linux. Now, only SCI notification type and memory errors are supported. More notification type and hardware error type will be added later. These memory errors are reported to user space through /dev/mcelog via faking a corrected Machine Check, so that the error memory page can be offlined by /sbin/mcelog if the error count for one page is beyond the threshold. On some machines, Machine Check can not report physical address for some corrected memory errors, but GHES can do that. So this simplified GHES is implemented firstly. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
- Loading branch information
Huang Ying
authored and
Len Brown
committed
May 20, 2010
1 parent
06d65de
commit d334a49
Showing
6 changed files
with
504 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Bridge between MCE and APEI | ||
* | ||
* On some machine, corrected memory errors are reported via APEI | ||
* generic hardware error source (GHES) instead of corrected Machine | ||
* Check. These corrected memory errors can be reported to user space | ||
* through /dev/mcelog via faking a corrected Machine Check, so that | ||
* the error memory page can be offlined by /sbin/mcelog if the error | ||
* count for one page is beyond the threshold. | ||
* | ||
* Copyright 2010 Intel Corp. | ||
* Author: Huang Ying <ying.huang@intel.com> | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License version | ||
* 2 as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/acpi.h> | ||
#include <linux/cper.h> | ||
#include <acpi/apei.h> | ||
#include <asm/mce.h> | ||
|
||
#include "mce-internal.h" | ||
|
||
void apei_mce_report_mem_error(int corrected, struct cper_sec_mem_err *mem_err) | ||
{ | ||
struct mce m; | ||
|
||
/* Only corrected MC is reported */ | ||
if (!corrected) | ||
return; | ||
|
||
mce_setup(&m); | ||
m.bank = 1; | ||
/* Fake a memory read corrected error with unknown channel */ | ||
m.status = MCI_STATUS_VAL | MCI_STATUS_EN | MCI_STATUS_ADDRV | 0x9f; | ||
m.addr = mem_err->physical_addr; | ||
mce_log(&m); | ||
mce_notify_irq(); | ||
} | ||
EXPORT_SYMBOL_GPL(apei_mce_report_mem_error); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
obj-$(CONFIG_ACPI_APEI) += apei.o | ||
obj-$(CONFIG_ACPI_APEI_GHES) += ghes.o | ||
obj-$(CONFIG_ACPI_APEI_EINJ) += einj.o | ||
|
||
apei-y := apei-base.o hest.o cper.o |
Oops, something went wrong.