acpi, apei, APEI supporting infrastructure
PATCH 1/4 acpi, apei, APEI supporting infrastructure
APEI stands for ACPI Platform Error Interface, which allows to report errors (for example from the chipset) to the operating system. This improves NMI handling especially. In addition it supports error serialization and error injection.
For more information about APEI, please refer to ACPI Specification version 4.0, chapter 17.
This patch provides some common functions used by more than one APEI tables. Including,
- Framework of interpreter for EINJ and ERST
A machine readable language is defined for EINJ and ERST for OS to execute, and so to drive the firmware to fulfill the corresponding functions. The machine language for EINJ and ERST is compatible, so a common framework is defined for them.
- IO memory pre-mapping and atomic accessing
APEI ERST operations may be used for permanent storage in hardware error handler. That is, it may be called in atomic contexts such as IRQ or NMI, etc. And, ERST/EINJ implement their operations via IO memory/port accessing. But the IO memory accessing method provided by ACPI (acpi_read/acpi_write) maps the IO memory during it is accessed, so it can not be used in atomic context. To solve the issue, the IO memory should be pre-mapped during EINJ/ERST initializing. A linked list is used to record which memory area has been mapped, when memory is accessed in hardware error handler, search the linked list for the mapped virtual address from the given physical address.
--- drivers/acpi/Kconfig | 2 drivers/acpi/Makefile | 2 drivers/acpi/apei/Kconfig | 9 drivers/acpi/apei/Makefile | 3 drivers/acpi/apei/apei-base.c | 899 ++++++++++++++++++++++++++++++++++++++ drivers/acpi/apei/apei-internal.h | 101 ++++ 6 files changed, 1016 insertions(+) create mode 100644 drivers/acpi/apei/Kconfig create mode 100644 drivers/acpi/apei/Makefile create mode 100644 drivers/acpi/apei/apei-base.c create mode 100644 drivers/acpi/apei/apei-internal.h
drivers/acpi/Kconfig +2 -0
@@ -360,4 +360,6 @@ config ACPI_SBS To compile this driver as a module, choose M here: the modules will be called sbs and sbshc. +source "drivers/acpi/apei/Kconfig" + endif # ACPI
drivers/acpi/Makefile +2 -0
@@ -64,3 +64,5 @@ processor-y += processor_idle.o proces processor-$(CONFIG_CPU_FREQ) += processor_perflib.o obj-$(CONFIG_ACPI_PROCESSOR_AGGREGATOR) += acpi_pad.o + +obj-$(CONFIG_ACPI_APEI) += apei/
drivers/acpi/apei/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +config ACPI_APEI + tristate "ACPI Platform Error Interface (APEI)" + depends on X86 + help + APEI allows to report errors (for example from the chipset) + to the operating system. This improves NMI handling + especially. In addition it supports error serialization and + error injection. +
drivers/acpi/apei/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-$(CONFIG_ACPI_APEI) += apei.o + +apei-y := apei-base.o
drivers/acpi/apei/apei-base.c new file +899 -0
899 lines not on this page · raw message
drivers/acpi/apei/apei-internal.h new file +101 -0
101 lines not on this page · raw message