Skip to contentSkip to conversation

ACPI, APEI, APEI basic support

PATCH In review Huang Ying 3 participants 18 messages Dec 28, 2009 – Jan 7, 2010

Subsystems (5)
lore
Share & tools
lore

Huang Ying

author
#0 lore raw

cover ACPI, APEI, APEI basic support

APEI stands for ACPI Platform Error Interface, which allows to report errors (for example from chipset) to the operating system. This improves NMI handling especially. In addition it supports error serialization and error injection.

This patchset provides basic support for APEI, some important parts such as ERST, HEST generic error source and BEST are still missing because they are not finalized yet.

The HEST tabling parsing code will be used by PCIE AER intialization code to prevent touching PCIE root port in firmware first mode. EINJ can be used to test some RAS related code such as MCE and PCIE AER.

v3:

- Use acpi_os_read/write_port.

- Fix error message for firmware bug.

- Remove hest_exit.

v2:

- Separate pre-map + atomic read/write into atomicio.c from apei-base.c and in separated patch.

author
#1 lore raw

PATCH 1/5 ACPI, IO memory pre-mapping and atomic accessing

Some ACPI IO accessing need to be done in atomic context. For example, 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/Makefile   |    1 +
 drivers/acpi/atomicio.c |  360 +++++++++++++++++++++++++++++++++++++++++++++++
 include/acpi/atomicio.h |   10 ++
 3 files changed, 371 insertions(+), 0 deletions(-)
 create mode 100644 drivers/acpi/atomicio.c
 create mode 100644 include/acpi/atomicio.h
drivers/acpi/Makefile +1 -0
index 66cc3f3..3b53767 100644
@@ -19,6 +19,7 @@ obj-y				+= acpi.o \
 
 # All the builtin files are in the "acpi." module_param namespace.
 acpi-y				+= osl.o utils.o reboot.o
+acpi-y				+= atomicio.o
 acpi-y				+= hest.o
 
 # sleep related files
drivers/acpi/atomicio.c new file +360 -0

360 lines not on this page · raw message

include/acpi/atomicio.h new file +10 -0
new file mode 100644
index 0000000..8b9fb4b
@@ -0,0 +1,10 @@
+#ifndef ACPI_ATOMIC_IO_H
+#define ACPI_ATOMIC_IO_H
+
+int acpi_pre_map_gar(struct acpi_generic_address *reg);
+int acpi_post_unmap_gar(struct acpi_generic_address *reg);
+
+int acpi_atomic_read(u64 *val, struct acpi_generic_address *reg);
+int acpi_atomic_write(u64 val, struct acpi_generic_address *reg);
+
+#endif
Signature · 1 line
1.6.5
author
#2 lore raw

PATCH 2/5 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, mainly 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.

---
 drivers/acpi/Kconfig              |    2 +
 drivers/acpi/Makefile             |    2 +
 drivers/acpi/apei/Kconfig         |    9 +
 drivers/acpi/apei/Makefile        |    3 +
 drivers/acpi/apei/apei-base.c     |  572 +++++++++++++++++++++++++++++++++++++
 drivers/acpi/apei/apei-internal.h |   95 ++++++
 6 files changed, 683 insertions(+), 0 deletions(-)
 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
index 93d2c79..191cf2b 100644
@@ -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
index 3b53767..c00d683 100644
@@ -67,3 +67,5 @@ processor-y			+= processor_idle.o processor_thermal.o
 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
new file mode 100644
index 0000000..4085bdd
@@ -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
new file mode 100644
index 0000000..6f41dfc
@@ -0,0 +1,3 @@
+obj-$(CONFIG_ACPI_APEI)		+= apei.o
+
+apei-y := apei-base.o
drivers/acpi/apei/apei-base.c new file +572 -0

572 lines not on this page · raw message

drivers/acpi/apei/apei-internal.h new file +95 -0

95 lines not on this page · raw message

Signature · 1 line
1.6.5
author
#3 lore raw

PATCH 3/5 ACPI, APEI, HEST table parsing

HEST describes error sources in detail; communicating operational parameters (i.e. severity levels, masking bits, and threshold values) to OS as necessary. It also allows the platform to report error sources for which OS would typically not implement support (for example, chipset-specific error registers).

HEST information may be needed by other subsystems. For example, HEST PCIE AER error source information describes whether a PCIE root port works in "firmware first" mode, this is needed by general PCIE AER error subsystem. So a public HEST tabling parsing interface is provided.

---
 drivers/acpi/apei/Makefile        |    2 +-
 drivers/acpi/apei/apei-base.c     |   17 ++++
 drivers/acpi/apei/apei-internal.h |    2 +
 drivers/acpi/apei/hest.c          |  147 +++++++++++++++++++++++++++++++++++++
 include/acpi/apei.h               |   13 +++
 5 files changed, 180 insertions(+), 1 deletions(-)
 create mode 100644 drivers/acpi/apei/hest.c
 create mode 100644 include/acpi/apei.h
drivers/acpi/apei/Makefile +1 -1
index 6f41dfc..a883292 100644
@@ -1,3 +1,3 @@
 obj-$(CONFIG_ACPI_APEI)		+= apei.o
 
-apei-y := apei-base.o
+apei-y := apei-base.o hest.o
drivers/acpi/apei/apei-base.c +17 -0
index d13871b..c35fec7 100644
@@ -48,6 +48,9 @@
 struct dentry *apei_debug_dir;
 EXPORT_SYMBOL_GPL(apei_debug_dir);
 
+int hest_disable;
+EXPORT_SYMBOL(hest_disable);
+
 /*
  * APEI ERST (Error Record Serialization Table) and EINJ (Error
  * INJection) interpreter framework.
@@ -552,9 +555,21 @@ EXPORT_SYMBOL_GPL(apei_exec_collect_resources);
 
 static int __init apei_init(void)
 {
+	int rc;
+
 	apei_debug_dir = debugfs_create_dir("apei", NULL);
 	if (!apei_debug_dir)
 		return -ENOMEM;
+	if (!hest_disable) {
+		rc = hest_init();
+		if (rc) {
+			hest_disable = 1;
+			if (rc != -ENODEV)
+				pr_err(
+				"ACPI: APEI: Failed to initialize Hardware "
+				"Error Source Table (HEST) subsystem\n");
+		}
+	}
 
 	return 0;
 }
@@ -567,6 +582,8 @@ static void __exit apei_exit(void)
 module_init(apei_init);
 module_exit(apei_exit);
 
+module_param(hest_disable, int, 0444);
+
 MODULE_AUTHOR("Huang Ying");
 MODULE_DESCRIPTION("ACPI Platform Error Interface support");
 MODULE_LICENSE("GPL");
drivers/acpi/apei/apei-internal.h +2 -0
index 9fcf128..1ab6598 100644
@@ -6,6 +6,8 @@
 #ifndef APEI_INTERNAL_H
 #define APEI_INTERNAL_H
 
+int hest_init(void);
+
 struct apei_exec_context;
 
 typedef int (*apei_exec_ins_func_t)(struct apei_exec_context *ctx,
drivers/acpi/apei/hest.c new file +147 -0

147 lines not on this page · raw message

include/acpi/apei.h new file +13 -0
new file mode 100644
index 0000000..631a1ad
@@ -0,0 +1,13 @@
+/*
+ * apei.h - ACPI Platform Error Interface
+ */
+
+#ifndef ACPI_APEI_H
+#define ACPI_APEI_H
+
+extern int hest_disable;
+
+typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data);
+int apei_hest_parse(apei_hest_func_t func, void *data);
+
+#endif
Signature · 1 line
1.6.5
author
#4 lore raw

PATCH 4/5 ACPI, APEI, EINJ support

EINJ provides a hardware error injection mechanism, this is useful for debugging and testing of other APEI and RAS features.

---
 drivers/acpi/apei/Kconfig  |    7 +
 drivers/acpi/apei/Makefile |    1 +
 drivers/acpi/apei/einj.c   |  471 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 479 insertions(+), 0 deletions(-)
 create mode 100644 drivers/acpi/apei/einj.c
drivers/acpi/apei/Kconfig +7 -0
index 4085bdd..22791e4 100644
@@ -7,3 +7,10 @@ config ACPI_APEI
 	  especially. In addition it supports error serialization and
 	  error injection.
 
+config ACPI_APEI_EINJ
+	tristate "APEI Error INJection (EINJ)"
+	depends on ACPI_APEI && DEBUG_FS
+	help
+	  EINJ provides a hardware error injection mechanism, it is
+	  mainly used for debugging and testing the other parts of
+	  APEI and some other RAS features.
drivers/acpi/apei/Makefile +1 -0
index a883292..fea86a9 100644
@@ -1,3 +1,4 @@
 obj-$(CONFIG_ACPI_APEI)		+= apei.o
+obj-$(CONFIG_ACPI_APEI_EINJ)	+= einj.o
 
 apei-y := apei-base.o hest.o
drivers/acpi/apei/einj.c new file +471 -0

471 lines not on this page · raw message

Signature · 1 line
1.6.5
author
#5 lore raw

PATCH 5/5 ACPI, APEI, Document for APEI

Add document for APEI, including kernel parameters and EINJ debug file sytem interface.

---
 Documentation/acpi/apei/einj.txt    |   49 +++++++++++++++++++++++++++++++++++
 Documentation/kernel-parameters.txt |    5 +++
 2 files changed, 54 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/acpi/apei/einj.txt
Documentation/acpi/apei/einj.txt new file +49 -0
new file mode 100644
index 0000000..438ef33
@@ -0,0 +1,49 @@
+			APEI Error INJection
+			~~~~~~~~~~~~~~~~~~~~
+
+EINJ provides a hardware error injection mechanism, it is very useful
+for debugging and testing of other APEI and RAS features.
+
+To use EINJ, make the following is enabled in your kernel
+configuration:
+
+CONFIG_DEBUG_FS
+CONFIG_ACPI_APEI
+CONFIG_ACPI_APEI_EINJ
+
+The user interface of EINJ is in debug file system, under the
+directory apei/einj. The following files are provided.
+
+- available_error_type
+  Read this file will return the error injection capability of the
+  platform, that is, which error types are supported. The error type
+  definition is as follow, the left field is the error type value, the
+  right field is error description.
+
+    0x00000001	Processor Correctable
+    0x00000002	Processor Uncorrectable non-fatal
+    0x00000004	Processor Uncorrectable fatal
+    0x00000008  Memory Correctable
+    0x00000010  Memory Uncorrectable non-fatal
+    0x00000020  Memory Uncorrectable fatal
+    0x00000040	PCI Express Correctable
+    0x00000080	PCI Express Uncorrectable fatal
+    0x00000100	PCI Express Uncorrectable non-fatal
+    0x00000200	Platform Correctable
+    0x00000400	Platform Uncorrectable non-fatal
+    0x00000800	Platform Uncorrectable fatal
+
+  The format of file contents are as above, except there are only the
+  available error type lines.
+
+- error_type
+  This file is used to set the error type value. The error type value
+  is defined in "available_error_type" description.
+
+- error_inject
+  Write any integer to this file to trigger the error
+  injection. Before this, please specify all necessary error
+  parameters.
+
+For more information about EINJ, please refer to ACPI specification
+version 4.0, section 17.5.
Documentation/kernel-parameters.txt +5 -0
index 5ba4d9d..7077cbb 100644
@@ -338,6 +338,11 @@ and is between 256 and 4096 characters. It is defined in the file
 			not play well with APC CPU idle - disable it if you have
 			APC and your system crashes randomly.
 
+	apei.hest_disable= [ACPI]
+			Disable Hardware Error Source Table (HEST) support,
+			corresponding firmware-first mode error processing
+			logic will be disabled.
+
 	apic=		[APIC,X86-32] Advanced Programmable Interrupt Controller
 			Change the output verbosity whilst booting
 			Format: { quiet (default) | verbose | debug }
Signature · 1 line
1.6.5
#6 lore raw

Re: [PATCH 5/5] ACPI, APEI, Document for APEI

Quoted 53 lines · Huang Ying

Add document for APEI, including kernel parameters and EINJ debug file sytem interface.

---
 Documentation/acpi/apei/einj.txt    |   49 +++++++++++++++++++++++++++++++++++
 Documentation/kernel-parameters.txt |    5 +++
 2 files changed, 54 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/acpi/apei/einj.txt
Documentation/acpi/apei/einj.txt new file +37 -0
new file mode 100644
index 0000000..438ef33
@@ -0,0 +1,49 @@
+			APEI Error INJection
+			~~~~~~~~~~~~~~~~~~~~
+
+EINJ provides a hardware error injection mechanism, it is very useful
+for debugging and testing of other APEI and RAS features.
+
+To use EINJ, make the following is enabled in your kernel
+configuration:
+
+CONFIG_DEBUG_FS
+CONFIG_ACPI_APEI
+CONFIG_ACPI_APEI_EINJ
+
+The user interface of EINJ is in debug file system, under the
+directory apei/einj. The following files are provided.
+
+- available_error_type
+  Read this file will return the error injection capability of the
+  platform, that is, which error types are supported. The error type
+  definition is as follow, the left field is the error type value, the
+  right field is error description.
+
+    0x00000001	Processor Correctable
+    0x00000002	Processor Uncorrectable non-fatal
+    0x00000004	Processor Uncorrectable fatal
+    0x00000008  Memory Correctable
+    0x00000010  Memory Uncorrectable non-fatal
+    0x00000020  Memory Uncorrectable fatal
+    0x00000040	PCI Express Correctable
+    0x00000080	PCI Express Uncorrectable fatal
+    0x00000100	PCI Express Uncorrectable non-fatal
+    0x00000200	Platform Correctable
+    0x00000400	Platform Uncorrectable non-fatal
+    0x00000800	Platform Uncorrectable fatal
+
+  The format of file contents are as above, except there are only the
+  available error type lines.
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#7 lore raw

Re: [PATCH 5/5] ACPI, APEI, Document for APEI

Quoted 17 lines
Quoted 17 lines
Documentation/acpi/apei/einj.txt new file +16 -0
+The user interface of EINJ is in debug file system, under the
+directory apei/einj. The following files are provided.
+
+- available_error_type
+  Read this file will return the error injection capability of the
+  platform, that is, which error types are supported. The error type
+  definition is as follow, the left field is the error type value, the
+  right field is error description.
+
+    0x00000001	Processor Correctable
+    0x00000002	Processor Uncorrectable non-fatal
+    0x00000004	Processor Uncorrectable fatal
+    0x00000008  Memory Correctable
+    0x00000010  Memory Uncorrectable non-fatal
+    0x00000020  Memory Uncorrectable fatal
+    0x00000040	PCI Express Correctable
Quoted 8 lines

Documentation/acpi/apei/einj.txt line 37

Quoted 8 lines
Documentation/acpi/apei/einj.txt new file +8 -0
+    0x00000080	PCI Express Uncorrectable fatal
+    0x00000100	PCI Express Uncorrectable non-fatal
+    0x00000200	Platform Correctable
+    0x00000400	Platform Uncorrectable non-fatal
+    0x00000800	Platform Uncorrectable fatal
+
+  The format of file contents are as above, except there are only the
+  available error type lines.

Strange interface. Why not simply pass single integer -- the bit mask? Bit meanings are not going to change, anyway.

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author
#8 lore raw

Re: [PATCH 5/5] ACPI, APEI, Document for APEI

Quoted 19 lines · Pavel Machek
Quoted 19 lines
Quoted 19 lines
Documentation/acpi/apei/einj.txt new file +19 -0
+The user interface of EINJ is in debug file system, under the
+directory apei/einj. The following files are provided.
+
+- available_error_type
+  Read this file will return the error injection capability of the
+  platform, that is, which error types are supported. The error type
+  definition is as follow, the left field is the error type value, the
+  right field is error description.
+
+    0x00000001	Processor Correctable
+    0x00000002	Processor Uncorrectable non-fatal
+    0x00000004	Processor Uncorrectable fatal
+    0x00000008  Memory Correctable
+    0x00000010  Memory Uncorrectable non-fatal
+    0x00000020  Memory Uncorrectable fatal
+    0x00000040	PCI Express Correctable
+    0x00000080	PCI Express Uncorrectable fatal
+    0x00000100	PCI Express Uncorrectable non-fatal
+    0x00000200	Platform Correctable
Quoted 8 lines
Quoted 5 lines

Documentation/acpi/apei/einj.txt line 37

Quoted 5 lines
Documentation/acpi/apei/einj.txt new file +5 -0
+    0x00000400	Platform Uncorrectable non-fatal
+    0x00000800	Platform Uncorrectable fatal
+
+  The format of file contents are as above, except there are only the
+  available error type lines.

Strange interface. Why not simply pass single integer -- the bit mask? Bit meanings are not going to change, anyway.

I have used bit mask in previous versions. But I think this version has better readability.

Best Regards,
Huang Ying

#9 lore raw

Re: [PATCH 5/5] ACPI, APEI, Document for APEI

Quoted 29 lines · Huang Ying
Quoted 19 lines · Pavel Machek
Quoted 19 lines
Quoted 19 lines
Documentation/acpi/apei/einj.txt new file +19 -0
+The user interface of EINJ is in debug file system, under the
+directory apei/einj. The following files are provided.
+
+- available_error_type
+  Read this file will return the error injection capability of the
+  platform, that is, which error types are supported. The error type
+  definition is as follow, the left field is the error type value, the
+  right field is error description.
+
+    0x00000001	Processor Correctable
+    0x00000002	Processor Uncorrectable non-fatal
+    0x00000004	Processor Uncorrectable fatal
+    0x00000008  Memory Correctable
+    0x00000010  Memory Uncorrectable non-fatal
+    0x00000020  Memory Uncorrectable fatal
+    0x00000040	PCI Express Correctable
+    0x00000080	PCI Express Uncorrectable fatal
+    0x00000100	PCI Express Uncorrectable non-fatal
+    0x00000200	Platform Correctable
Quoted 8 lines
Quoted 5 lines

Documentation/acpi/apei/einj.txt line 37

Quoted 5 lines
Documentation/acpi/apei/einj.txt new file +5 -0
+    0x00000400	Platform Uncorrectable non-fatal
+    0x00000800	Platform Uncorrectable fatal
+
+  The format of file contents are as above, except there are only the
+  available error type lines.

Strange interface. Why not simply pass single integer -- the bit mask? Bit meanings are not going to change, anyway.

Quoted 2 lines

I have used bit mask in previous versions. But I think this version has better readability.

Better usability for humans, but kernel interfaces are not for humans. Please revert to bit mask.

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author
#10 lore raw

Re: [PATCH 5/5] ACPI, APEI, Document for APEI

Quoted 30 lines · Pavel Machek
Quoted 29 lines · Huang Ying
Quoted 27 lines · Pavel Machek
Quoted 16 lines
Quoted 16 lines
Documentation/acpi/apei/einj.txt new file +16 -0
+The user interface of EINJ is in debug file system, under the
+directory apei/einj. The following files are provided.
+
+- available_error_type
+  Read this file will return the error injection capability of the
+  platform, that is, which error types are supported. The error type
+  definition is as follow, the left field is the error type value, the
+  right field is error description.
+
+    0x00000001	Processor Correctable
+    0x00000002	Processor Uncorrectable non-fatal
+    0x00000004	Processor Uncorrectable fatal
+    0x00000008  Memory Correctable
+    0x00000010  Memory Uncorrectable non-fatal
+    0x00000020  Memory Uncorrectable fatal
+    0x00000040	PCI Express Correctable
Quoted 8 lines

Documentation/acpi/apei/einj.txt line 37

Quoted 8 lines
Documentation/acpi/apei/einj.txt new file +8 -0
+    0x00000080	PCI Express Uncorrectable fatal
+    0x00000100	PCI Express Uncorrectable non-fatal
+    0x00000200	Platform Correctable
+    0x00000400	Platform Uncorrectable non-fatal
+    0x00000800	Platform Uncorrectable fatal
+
+  The format of file contents are as above, except there are only the
+  available error type lines.

Strange interface. Why not simply pass single integer -- the bit mask? Bit meanings are not going to change, anyway.

Quoted 5 lines
Quoted 2 lines

I have used bit mask in previous versions. But I think this version has better readability.

Better usability for humans, but kernel interfaces are not for humans. Please revert to bit mask.

I think this interface is for humans too. Maybe we can provide both bit mask and human readable explanation as now.

Best Regards,
Huang Ying

#11 lore raw

Re: [PATCH 5/5] ACPI, APEI, Document for APEI

Quoted 32 lines · Pavel Machek
Quoted 30 lines · Huang Ying
Quoted 29 lines · Pavel Machek
Quoted 27 lines
Quoted 16 lines
Quoted 16 lines
Documentation/acpi/apei/einj.txt new file +16 -0
+The user interface of EINJ is in debug file system, under the
+directory apei/einj. The following files are provided.
+
+- available_error_type
+  Read this file will return the error injection capability of the
+  platform, that is, which error types are supported. The error type
+  definition is as follow, the left field is the error type value, the
+  right field is error description.
+
+    0x00000001	Processor Correctable
+    0x00000002	Processor Uncorrectable non-fatal
+    0x00000004	Processor Uncorrectable fatal
+    0x00000008  Memory Correctable
+    0x00000010  Memory Uncorrectable non-fatal
+    0x00000020  Memory Uncorrectable fatal
+    0x00000040	PCI Express Correctable
Quoted 8 lines

Documentation/acpi/apei/einj.txt line 37

Quoted 8 lines
Documentation/acpi/apei/einj.txt new file +8 -0
+    0x00000080	PCI Express Uncorrectable fatal
+    0x00000100	PCI Express Uncorrectable non-fatal
+    0x00000200	Platform Correctable
+    0x00000400	Platform Uncorrectable non-fatal
+    0x00000800	Platform Uncorrectable fatal
+
+  The format of file contents are as above, except there are only the
+  available error type lines.

Strange interface. Why not simply pass single integer -- the bit mask? Bit meanings are not going to change, anyway.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I have used bit mask in previous versions. But I think this version has better readability.

Better usability for humans, but kernel interfaces are not for humans. Please revert to bit mask.

I think this interface is for humans too. Maybe we can provide both bit mask and human readable explanation as now.

It sucks as a kernel interface. If you want nice interface for humans, create a script.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#12 lore raw

Re: [PATCH 4/5] ACPI, APEI, EINJ support

In reply to Huang Ying
Quoted 8 lines · Huang Ying

EINJ provides a hardware error injection mechanism, this is useful for debugging and testing of other APEI and RAS features.

---
 drivers/acpi/apei/Kconfig  |    7 +
 drivers/acpi/apei/Makefile |    1 +
 drivers/acpi/apei/einj.c   |  471 ++++++++++++++++++++++++++++++++++++++++++++

Can we get more meaningfull name? err_inject.c?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author
#13 lore raw

Re: [PATCH 4/5] ACPI, APEI, EINJ support

Hi, Pavel,

Quoted 4 lines · Pavel Machek
Quoted 3 lines · Huang Ying

EINJ provides a hardware error injection mechanism, this is useful for debugging and testing of other APEI and RAS features.

Quoted 8 lines
Quoted 5 lines
---
 drivers/acpi/apei/Kconfig  |    7 +
 drivers/acpi/apei/Makefile |    1 +
 drivers/acpi/apei/einj.c   |  471 ++++++++++++++++++++++++++++++++++++++++++++

Can we get more meaningfull name? err_inject.c?

einj is the abbreviation used in ACPI specification. I think following specification can avoid some confusion. Do you think so?

Best Regards,
Huang Ying

#14 lore raw

Re: [PATCH 4/5] ACPI, APEI, EINJ support

Quoted 14 lines · Huang Ying

Hi, Pavel,

Quoted 11 lines · Pavel Machek
Quoted 8 lines · Huang Ying

EINJ provides a hardware error injection mechanism, this is useful for debugging and testing of other APEI and RAS features.

---
 drivers/acpi/apei/Kconfig  |    7 +
 drivers/acpi/apei/Makefile |    1 +
 drivers/acpi/apei/einj.c   |  471 ++++++++++++++++++++++++++++++++++++++++++++
Quoted 4 lines
Quoted 1 line

Can we get more meaningfull name? err_inject.c?

einj is the abbreviation used in ACPI specification. I think following specification can avoid some confusion. Do you think so?

The spec is way too ugly to follow here.

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
reviewer
#15 lore raw

git-apply --whitespace (Re: [PATCH 2/5] ACPI, APEI, APEI supporting infrastructure)

In reply to Huang Ying

drivers/acpi/apei/Makefile

Quoted 16 lines
drivers/acpi/apei/Kconfig new file +9 -0
new file mode 100644
index 0000000..4085bdd
@@ -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 +0 -0

FYI, git apply considers a trailing blank line, such as the one at the end of the hunk above, to be a "whitespace error".

I use --whitespace=strip, which causes git to delete it upon checkin. However, that causes the 4th patch in this series, which appents to this file, to not apply.

Please don't send patches with trailing blank lines. In this case, the blank should come as a "preceeding" blank line in the 4th patch...

thanks,
-Len Brown, Intel Open Source Technology Center

author
#16 lore raw

Re: git-apply --whitespace (Re: [PATCH 2/5] ACPI, APEI, APEI supporting infrastructure)

Quoted 21 lines · Len Brown

drivers/acpi/apei/Makefile

Quoted 16 lines
drivers/acpi/apei/Kconfig new file +9 -0
new file mode 100644
index 0000000..4085bdd
@@ -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 +0 -0

FYI, git apply considers a trailing blank line, such as the one at the end of the hunk above, to be a "whitespace error".

Quoted 7 lines

I use --whitespace=strip, which causes git to delete it upon checkin. However, that causes the 4th patch in this series, which appents to this file, to not apply.

Please don't send patches with trailing blank lines. In this case, the blank should come as a "preceeding" blank line in the 4th patch...

Sorry about that. I will be more careful in next time.

Best Regards,
Huang Ying

reviewer
#17 lore raw
In reply to Huang Ying

v2 replaced by v3 in acpi-test tree

thanks,
Len Brown, Intel Open Source Technology Center

Quoted 32 lines · Huang Ying

APEI stands for ACPI Platform Error Interface, which allows to report errors (for example from chipset) to the operating system. This improves NMI handling especially. In addition it supports error serialization and error injection.

This patchset provides basic support for APEI, some important parts such as ERST, HEST generic error source and BEST are still missing because they are not finalized yet.

The HEST tabling parsing code will be used by PCIE AER intialization code to prevent touching PCIE root port in firmware first mode. EINJ can be used to test some RAS related code such as MCE and PCIE AER.

v3:

- Use acpi_os_read/write_port.

- Fix error message for firmware bug.

- Remove hest_exit.

v2:

- Separate pre-map + atomic read/write into atomicio.c from apei-base.c and in separated patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html