This patch set is needed due to: - APEI tables address adjustments - rebase to the kernel 3.13 - more descriptive error example
Tomasz Nowicki (3): apei: Adjust addresses for APEI testing via UEFI -> GRUB -> ACPI kernel. acpi, apei: More detailed info regarding memory error. apei: Follow up lately kernel changes.
platforms/rtsm_ve-aemv8a.acpi/bert.asl | 2 +- platforms/rtsm_ve-aemv8a.acpi/einj.asl | 16 ++++++++-------- platforms/rtsm_ve-aemv8a.acpi/erst.asl | 32 +++++++++++++++---------------- platforms/rtsm_ve-aemv8a.acpi/hest.asl | 2 +- tools/bfapei/bfapei.c | 20 ++++++++++++++++++- tools/common/include/acpi.h | 33 ++++++++++++++++++++++++++------ 6 files changed, 72 insertions(+), 33 deletions(-)
--- platforms/rtsm_ve-aemv8a.acpi/bert.asl | 2 +- platforms/rtsm_ve-aemv8a.acpi/einj.asl | 16 ++++++++-------- platforms/rtsm_ve-aemv8a.acpi/erst.asl | 32 ++++++++++++++++---------------- platforms/rtsm_ve-aemv8a.acpi/hest.asl | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/platforms/rtsm_ve-aemv8a.acpi/bert.asl b/platforms/rtsm_ve-aemv8a.acpi/bert.asl index 1b9f3d6..2390552 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/bert.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/bert.asl @@ -45,4 +45,4 @@ [0004] Asl Compiler Revision : 20100528
[0004] Boot Error Region Length : 0x9D -[0008] Boot Error Region Address : 0xFFFF0008 +[0008] Boot Error Region Address : 0x81e00008 diff --git a/platforms/rtsm_ve-aemv8a.acpi/einj.asl b/platforms/rtsm_ve-aemv8a.acpi/einj.asl index 63044fc..8f4e74b 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/einj.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/einj.asl @@ -60,7 +60,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0200 +[0008] Address : 0x81e00200
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -76,7 +76,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0208 +[0008] Address : 0x81e00208
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -92,7 +92,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0210 +[0008] Address : 0x81e00210
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -108,7 +108,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0218 +[0008] Address : 0x81e00218
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -124,7 +124,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0220 +[0008] Address : 0x81e00220
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -140,7 +140,7 @@ [0001] Bit Width : 10 [0001] Bit Offset : 00 [0001] Encoded Access Width : 02 [Word Access:16] -[0008] Address : 0xFFFF0228 +[0008] Address : 0x81e00228
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -156,7 +156,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0230 +[0008] Address : 0x81e00230
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -172,7 +172,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0238 +[0008] Address : 0x81e00238
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF diff --git a/platforms/rtsm_ve-aemv8a.acpi/erst.asl b/platforms/rtsm_ve-aemv8a.acpi/erst.asl index 2bf2aff..20df38b 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/erst.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/erst.asl @@ -59,7 +59,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0100 +[0008] Address : 0x81e00100
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -75,7 +75,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0108 +[0008] Address : 0x81e00108
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -91,7 +91,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0110 +[0008] Address : 0x81e00110
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -107,7 +107,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0118 +[0008] Address : 0x81e00118
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -123,7 +123,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0120 +[0008] Address : 0x81e00120
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -139,7 +139,7 @@ [0001] Bit Width : 08 [0001] Bit Offset : 00 [0001] Encoded Access Width : 01 [Byte Access:8] -[0008] Address : 0xFFFF0128 +[0008] Address : 0x81e00128
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -155,7 +155,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0130 +[0008] Address : 0x81e00130
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -171,7 +171,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0138 +[0008] Address : 0x81e00138
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -187,7 +187,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0140 +[0008] Address : 0x81e00140
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -203,7 +203,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0148 +[0008] Address : 0x81e00148
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -219,7 +219,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0150 +[0008] Address : 0x81e00150
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -235,7 +235,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0158 +[0008] Address : 0x81e00158
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -251,7 +251,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0160 +[0008] Address : 0x81e00160
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -267,7 +267,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0168 +[0008] Address : 0x81e00168
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -283,7 +283,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0170 +[0008] Address : 0x81e00170
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -299,7 +299,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0178 +[0008] Address : 0x81e00178
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF diff --git a/platforms/rtsm_ve-aemv8a.acpi/hest.asl b/platforms/rtsm_ve-aemv8a.acpi/hest.asl index 70ba8f2..bd7d454 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/hest.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/hest.asl @@ -60,7 +60,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0000 +[0008] Address : 0x81e00000
[0028] Notify : [Hardware Error Notification Structure] [0001] Notify Type : 03 [SCI]
On 2014年01月09日 17:24, Tomasz Nowicki wrote:
Missing change log here :)
platforms/rtsm_ve-aemv8a.acpi/bert.asl | 2 +- platforms/rtsm_ve-aemv8a.acpi/einj.asl | 16 ++++++++-------- platforms/rtsm_ve-aemv8a.acpi/erst.asl | 32 ++++++++++++++++---------------- platforms/rtsm_ve-aemv8a.acpi/hest.asl | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/platforms/rtsm_ve-aemv8a.acpi/bert.asl b/platforms/rtsm_ve-aemv8a.acpi/bert.asl index 1b9f3d6..2390552 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/bert.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/bert.asl @@ -45,4 +45,4 @@ [0004] Asl Compiler Revision : 20100528 [0004] Boot Error Region Length : 0x9D -[0008] Boot Error Region Address : 0xFFFF0008 +[0008] Boot Error Region Address : 0x81e00008 diff --git a/platforms/rtsm_ve-aemv8a.acpi/einj.asl b/platforms/rtsm_ve-aemv8a.acpi/einj.asl index 63044fc..8f4e74b 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/einj.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/einj.asl @@ -60,7 +60,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0200 +[0008] Address : 0x81e00200 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -76,7 +76,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0208 +[0008] Address : 0x81e00208 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -92,7 +92,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0210 +[0008] Address : 0x81e00210 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -108,7 +108,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0218 +[0008] Address : 0x81e00218 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -124,7 +124,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0220 +[0008] Address : 0x81e00220 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -140,7 +140,7 @@ [0001] Bit Width : 10 [0001] Bit Offset : 00 [0001] Encoded Access Width : 02 [Word Access:16] -[0008] Address : 0xFFFF0228 +[0008] Address : 0x81e00228 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -156,7 +156,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0230 +[0008] Address : 0x81e00230 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -172,7 +172,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0238 +[0008] Address : 0x81e00238 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF diff --git a/platforms/rtsm_ve-aemv8a.acpi/erst.asl b/platforms/rtsm_ve-aemv8a.acpi/erst.asl index 2bf2aff..20df38b 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/erst.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/erst.asl @@ -59,7 +59,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0100 +[0008] Address : 0x81e00100 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -75,7 +75,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0108 +[0008] Address : 0x81e00108 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -91,7 +91,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0110 +[0008] Address : 0x81e00110 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -107,7 +107,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0118 +[0008] Address : 0x81e00118 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -123,7 +123,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0120 +[0008] Address : 0x81e00120 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -139,7 +139,7 @@ [0001] Bit Width : 08 [0001] Bit Offset : 00 [0001] Encoded Access Width : 01 [Byte Access:8] -[0008] Address : 0xFFFF0128 +[0008] Address : 0x81e00128 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -155,7 +155,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0130 +[0008] Address : 0x81e00130 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -171,7 +171,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0138 +[0008] Address : 0x81e00138 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -187,7 +187,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0140 +[0008] Address : 0x81e00140 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -203,7 +203,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0148 +[0008] Address : 0x81e00148 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -219,7 +219,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0150 +[0008] Address : 0x81e00150 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -235,7 +235,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0158 +[0008] Address : 0x81e00158 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -251,7 +251,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0160 +[0008] Address : 0x81e00160 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -267,7 +267,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0168 +[0008] Address : 0x81e00168 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -283,7 +283,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0170 +[0008] Address : 0x81e00170 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -299,7 +299,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0178 +[0008] Address : 0x81e00178 [0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF diff --git a/platforms/rtsm_ve-aemv8a.acpi/hest.asl b/platforms/rtsm_ve-aemv8a.acpi/hest.asl index 70ba8f2..bd7d454 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/hest.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/hest.asl @@ -60,7 +60,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0000 +[0008] Address : 0x81e00000 [0028] Notify : [Hardware Error Notification Structure] [0001] Notify Type : 03 [SCI]
--- tools/bfapei/bfapei.c | 18 ++++++++++++++++++ tools/common/include/acpi.h | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/tools/bfapei/bfapei.c b/tools/bfapei/bfapei.c index a8316ac..b27d0e1 100644 --- a/tools/bfapei/bfapei.c +++ b/tools/bfapei/bfapei.c @@ -206,6 +206,24 @@ static int bfapei_hest(char **buf, int *size, uint64_t paddr, int status)
mem_err = (struct cper_sec_mem_err *) (gdata + 1); /* Place for more specific err info */ + mem_err->validation_bits |= CPER_MEM_VALID_ERROR_TYPE; + mem_err->error_type = 2; + + mem_err->validation_bits |= CPER_MEM_VALID_PHYSICAL_ADDRESS; + mem_err->physical_addr = ~0UL; + + mem_err->validation_bits |= CPER_MEM_VALID_CARD | CPER_MEM_VALID_MODULE | + CPER_MEM_VALID_BANK | CPER_MEM_VALID_ROW | + CPER_MEM_VALID_COLUMN | CPER_MEM_VALID_BIT_POSITION; + mem_err->card = 1; + mem_err->module = 2; + mem_err->bank = 3; + mem_err->row = 1; + mem_err->column = 2; + mem_err->bit_pos = 5; + + mem_err->validation_bits |= CPER_MEM_VALID_ERROR_STATUS; + mem_err->error_status = 4 << 8;
return BFAPEI_OK; } diff --git a/tools/common/include/acpi.h b/tools/common/include/acpi.h index 505d5f2..2b46c9b 100644 --- a/tools/common/include/acpi.h +++ b/tools/common/include/acpi.h @@ -177,6 +177,24 @@ typedef struct { UUID_LE(0xA5BC1114, 0x6F64, 0x4EDE, 0xB8, 0x63, 0x3E, 0x83, \ 0xED, 0x7C, 0x83, 0xB1)
+#define CPER_MEM_VALID_ERROR_STATUS 0x0001 +#define CPER_MEM_VALID_PHYSICAL_ADDRESS 0x0002 +#define CPER_MEM_VALID_PHYSICAL_ADDRESS_MASK 0x0004 +#define CPER_MEM_VALID_NODE 0x0008 +#define CPER_MEM_VALID_CARD 0x0010 +#define CPER_MEM_VALID_MODULE 0x0020 +#define CPER_MEM_VALID_BANK 0x0040 +#define CPER_MEM_VALID_DEVICE 0x0080 +#define CPER_MEM_VALID_ROW 0x0100 +#define CPER_MEM_VALID_COLUMN 0x0200 +#define CPER_MEM_VALID_BIT_POSITION 0x0400 +#define CPER_MEM_VALID_REQUESTOR_ID 0x0800 +#define CPER_MEM_VALID_RESPONDER_ID 0x1000 +#define CPER_MEM_VALID_TARGET_ID 0x2000 +#define CPER_MEM_VALID_ERROR_TYPE 0x4000 + +#define ACPI_ADR_SPACE_SYSTEM_MEMORY 0 + /* Memory Error Section */ struct cper_sec_mem_err { uint64_t validation_bits; @@ -247,7 +265,6 @@ enum acpi_erst_actions { #define ACPI_ERR_TYPE_VENDOR_DEFINED 31
#define ACPI_EINJ_TRIGGER_TABLE_OFFSET 0x280 -#define ACPI_ADR_SPACE_SYSTEM_MEMORY 0
enum acpi_einj_actions { ACPI_EINJ_BEGIN_OPERATION = 0,
--- tools/bfapei/bfapei.c | 2 +- tools/common/include/acpi.h | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/tools/bfapei/bfapei.c b/tools/bfapei/bfapei.c index b27d0e1..2bf104d 100644 --- a/tools/bfapei/bfapei.c +++ b/tools/bfapei/bfapei.c @@ -195,7 +195,7 @@ static int bfapei_hest(char **buf, int *size, uint64_t paddr, int status) block_ptr = (struct acpi_hest_generic_status *) (++add_ptr); block_ptr->block_status = status; block_ptr->data_length = sizeof(struct acpi_hest_generic_data); - block_ptr->error_severity = GHES_SEV_CORRECTED; + block_ptr->error_severity = CPER_SEV_CORRECTED;
/* Fill in generic error data entry */ gdata = (struct acpi_hest_generic_data *) (block_ptr + 1); diff --git a/tools/common/include/acpi.h b/tools/common/include/acpi.h index 2b46c9b..01dad20 100644 --- a/tools/common/include/acpi.h +++ b/tools/common/include/acpi.h @@ -127,10 +127,10 @@ struct acpi_hest_generic { };
enum { - GHES_SEV_NO = 0x0, - GHES_SEV_CORRECTED = 0x1, - GHES_SEV_RECOVERABLE = 0x2, - GHES_SEV_PANIC = 0x3, + CPER_SEV_RECOVERABLE, + CPER_SEV_FATAL, + CPER_SEV_CORRECTED, + CPER_SEV_INFORMATIONAL, };
/* Generic Error Status block */ @@ -213,7 +213,11 @@ struct cper_sec_mem_err { uint64_t responder_id; uint64_t target_id; uint8_t error_type; -} __attribute__ ((packed)); + uint8_t reserved; + uint16_t rank; + uint16_t mem_array_handle; /* card handle in UEFI 2.4 */ + uint16_t mem_dev_handle; /* module handle in UEFI 2.4 */ +};
/* ERST Error Log Address Range atrributes */ #define ERST_RANGE_RESERVED 0x0001
On 01/09/2014 02:24 AM, Tomasz Nowicki wrote:
This patch set is needed due to:
- APEI tables address adjustments
- rebase to the kernel 3.13
- more descriptive error example
Tomasz Nowicki (3): apei: Adjust addresses for APEI testing via UEFI -> GRUB -> ACPI kernel. acpi, apei: More detailed info regarding memory error. apei: Follow up lately kernel changes.
platforms/rtsm_ve-aemv8a.acpi/bert.asl | 2 +- platforms/rtsm_ve-aemv8a.acpi/einj.asl | 16 ++++++++-------- platforms/rtsm_ve-aemv8a.acpi/erst.asl | 32 +++++++++++++++---------------- platforms/rtsm_ve-aemv8a.acpi/hest.asl | 2 +- tools/bfapei/bfapei.c | 20 ++++++++++++++++++- tools/common/include/acpi.h | 33 ++++++++++++++++++++++++++------ 6 files changed, 72 insertions(+), 33 deletions(-)
As Hanjun noted, changelogs are missing. Other than, seems reasonable.
This patch set is needed due to: - APEI tables address adjustments - rebase to the kernel 3.13 - more descriptive error example
Changes for v2: - add changelogs
Tomasz Nowicki (3): apei: Adjust addresses for APEI testing via UEFI -> GRUB -> ACPI kernel. acpi, apei: More detailed info regarding memory error. apei: Follow up lately kernel changes.
platforms/rtsm_ve-aemv8a.acpi/bert.asl | 2 +- platforms/rtsm_ve-aemv8a.acpi/einj.asl | 16 ++++++++-------- platforms/rtsm_ve-aemv8a.acpi/erst.asl | 32 +++++++++++++++---------------- platforms/rtsm_ve-aemv8a.acpi/hest.asl | 2 +- tools/bfapei/bfapei.c | 20 ++++++++++++++++++- tools/common/include/acpi.h | 33 ++++++++++++++++++++++++++------ 6 files changed, 72 insertions(+), 33 deletions(-)
Our test setup assume that GRUB loads APEI blob to the RAM memory. So all APEI tables must point to the given RAM area.
Signed-off-by: Tomasz Nowicki tomasz.nowicki@linaro.org --- platforms/rtsm_ve-aemv8a.acpi/bert.asl | 2 +- platforms/rtsm_ve-aemv8a.acpi/einj.asl | 16 ++++++++-------- platforms/rtsm_ve-aemv8a.acpi/erst.asl | 32 ++++++++++++++++---------------- platforms/rtsm_ve-aemv8a.acpi/hest.asl | 2 +- 4 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/platforms/rtsm_ve-aemv8a.acpi/bert.asl b/platforms/rtsm_ve-aemv8a.acpi/bert.asl index 1b9f3d6..2390552 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/bert.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/bert.asl @@ -45,4 +45,4 @@ [0004] Asl Compiler Revision : 20100528
[0004] Boot Error Region Length : 0x9D -[0008] Boot Error Region Address : 0xFFFF0008 +[0008] Boot Error Region Address : 0x81e00008 diff --git a/platforms/rtsm_ve-aemv8a.acpi/einj.asl b/platforms/rtsm_ve-aemv8a.acpi/einj.asl index 63044fc..8f4e74b 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/einj.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/einj.asl @@ -60,7 +60,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0200 +[0008] Address : 0x81e00200
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -76,7 +76,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0208 +[0008] Address : 0x81e00208
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -92,7 +92,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0210 +[0008] Address : 0x81e00210
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -108,7 +108,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0218 +[0008] Address : 0x81e00218
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -124,7 +124,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0220 +[0008] Address : 0x81e00220
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -140,7 +140,7 @@ [0001] Bit Width : 10 [0001] Bit Offset : 00 [0001] Encoded Access Width : 02 [Word Access:16] -[0008] Address : 0xFFFF0228 +[0008] Address : 0x81e00228
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -156,7 +156,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0230 +[0008] Address : 0x81e00230
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -172,7 +172,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0238 +[0008] Address : 0x81e00238
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF diff --git a/platforms/rtsm_ve-aemv8a.acpi/erst.asl b/platforms/rtsm_ve-aemv8a.acpi/erst.asl index 2bf2aff..20df38b 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/erst.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/erst.asl @@ -59,7 +59,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0100 +[0008] Address : 0x81e00100
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -75,7 +75,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0108 +[0008] Address : 0x81e00108
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -91,7 +91,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0110 +[0008] Address : 0x81e00110
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -107,7 +107,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0118 +[0008] Address : 0x81e00118
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -123,7 +123,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0120 +[0008] Address : 0x81e00120
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -139,7 +139,7 @@ [0001] Bit Width : 08 [0001] Bit Offset : 00 [0001] Encoded Access Width : 01 [Byte Access:8] -[0008] Address : 0xFFFF0128 +[0008] Address : 0x81e00128
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -155,7 +155,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0130 +[0008] Address : 0x81e00130
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -171,7 +171,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0138 +[0008] Address : 0x81e00138
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -187,7 +187,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0140 +[0008] Address : 0x81e00140
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -203,7 +203,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0148 +[0008] Address : 0x81e00148
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -219,7 +219,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0150 +[0008] Address : 0x81e00150
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -235,7 +235,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0158 +[0008] Address : 0x81e00158
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -251,7 +251,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0160 +[0008] Address : 0x81e00160
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -267,7 +267,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0168 +[0008] Address : 0x81e00168
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -283,7 +283,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0170 +[0008] Address : 0x81e00170
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF @@ -299,7 +299,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0178 +[0008] Address : 0x81e00178
[0008] Value : 0000000000000000 [0008] Mask : FFFFFFFFFFFFFFFF diff --git a/platforms/rtsm_ve-aemv8a.acpi/hest.asl b/platforms/rtsm_ve-aemv8a.acpi/hest.asl index 70ba8f2..bd7d454 100644 --- a/platforms/rtsm_ve-aemv8a.acpi/hest.asl +++ b/platforms/rtsm_ve-aemv8a.acpi/hest.asl @@ -60,7 +60,7 @@ [0001] Bit Width : 40 [0001] Bit Offset : 00 [0001] Encoded Access Width : 04 [QWord Access:64] -[0008] Address : 0xFFFF0000 +[0008] Address : 0x81e00000
[0028] Notify : [Hardware Error Notification Structure] [0001] Notify Type : 03 [SCI]
We create blob with memory error example as a proof it really works. This commits only add more detailed info so output message will looks prettier.
Signed-off-by: Tomasz Nowicki tomasz.nowicki@linaro.org --- tools/bfapei/bfapei.c | 18 ++++++++++++++++++ tools/common/include/acpi.h | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/tools/bfapei/bfapei.c b/tools/bfapei/bfapei.c index a8316ac..b27d0e1 100644 --- a/tools/bfapei/bfapei.c +++ b/tools/bfapei/bfapei.c @@ -206,6 +206,24 @@ static int bfapei_hest(char **buf, int *size, uint64_t paddr, int status)
mem_err = (struct cper_sec_mem_err *) (gdata + 1); /* Place for more specific err info */ + mem_err->validation_bits |= CPER_MEM_VALID_ERROR_TYPE; + mem_err->error_type = 2; + + mem_err->validation_bits |= CPER_MEM_VALID_PHYSICAL_ADDRESS; + mem_err->physical_addr = ~0UL; + + mem_err->validation_bits |= CPER_MEM_VALID_CARD | CPER_MEM_VALID_MODULE | + CPER_MEM_VALID_BANK | CPER_MEM_VALID_ROW | + CPER_MEM_VALID_COLUMN | CPER_MEM_VALID_BIT_POSITION; + mem_err->card = 1; + mem_err->module = 2; + mem_err->bank = 3; + mem_err->row = 1; + mem_err->column = 2; + mem_err->bit_pos = 5; + + mem_err->validation_bits |= CPER_MEM_VALID_ERROR_STATUS; + mem_err->error_status = 4 << 8;
return BFAPEI_OK; } diff --git a/tools/common/include/acpi.h b/tools/common/include/acpi.h index 505d5f2..2b46c9b 100644 --- a/tools/common/include/acpi.h +++ b/tools/common/include/acpi.h @@ -177,6 +177,24 @@ typedef struct { UUID_LE(0xA5BC1114, 0x6F64, 0x4EDE, 0xB8, 0x63, 0x3E, 0x83, \ 0xED, 0x7C, 0x83, 0xB1)
+#define CPER_MEM_VALID_ERROR_STATUS 0x0001 +#define CPER_MEM_VALID_PHYSICAL_ADDRESS 0x0002 +#define CPER_MEM_VALID_PHYSICAL_ADDRESS_MASK 0x0004 +#define CPER_MEM_VALID_NODE 0x0008 +#define CPER_MEM_VALID_CARD 0x0010 +#define CPER_MEM_VALID_MODULE 0x0020 +#define CPER_MEM_VALID_BANK 0x0040 +#define CPER_MEM_VALID_DEVICE 0x0080 +#define CPER_MEM_VALID_ROW 0x0100 +#define CPER_MEM_VALID_COLUMN 0x0200 +#define CPER_MEM_VALID_BIT_POSITION 0x0400 +#define CPER_MEM_VALID_REQUESTOR_ID 0x0800 +#define CPER_MEM_VALID_RESPONDER_ID 0x1000 +#define CPER_MEM_VALID_TARGET_ID 0x2000 +#define CPER_MEM_VALID_ERROR_TYPE 0x4000 + +#define ACPI_ADR_SPACE_SYSTEM_MEMORY 0 + /* Memory Error Section */ struct cper_sec_mem_err { uint64_t validation_bits; @@ -247,7 +265,6 @@ enum acpi_erst_actions { #define ACPI_ERR_TYPE_VENDOR_DEFINED 31
#define ACPI_EINJ_TRIGGER_TABLE_OFFSET 0x280 -#define ACPI_ADR_SPACE_SYSTEM_MEMORY 0
enum acpi_einj_actions { ACPI_EINJ_BEGIN_OPERATION = 0,
Since 3.13 kernel birngs a lot of new features and APEI structure refines, we need to update our tool to make it works with APEI blob.
Signed-off-by: Tomasz Nowicki tomasz.nowicki@linaro.org --- tools/bfapei/bfapei.c | 2 +- tools/common/include/acpi.h | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/tools/bfapei/bfapei.c b/tools/bfapei/bfapei.c index b27d0e1..2bf104d 100644 --- a/tools/bfapei/bfapei.c +++ b/tools/bfapei/bfapei.c @@ -195,7 +195,7 @@ static int bfapei_hest(char **buf, int *size, uint64_t paddr, int status) block_ptr = (struct acpi_hest_generic_status *) (++add_ptr); block_ptr->block_status = status; block_ptr->data_length = sizeof(struct acpi_hest_generic_data); - block_ptr->error_severity = GHES_SEV_CORRECTED; + block_ptr->error_severity = CPER_SEV_CORRECTED;
/* Fill in generic error data entry */ gdata = (struct acpi_hest_generic_data *) (block_ptr + 1); diff --git a/tools/common/include/acpi.h b/tools/common/include/acpi.h index 2b46c9b..01dad20 100644 --- a/tools/common/include/acpi.h +++ b/tools/common/include/acpi.h @@ -127,10 +127,10 @@ struct acpi_hest_generic { };
enum { - GHES_SEV_NO = 0x0, - GHES_SEV_CORRECTED = 0x1, - GHES_SEV_RECOVERABLE = 0x2, - GHES_SEV_PANIC = 0x3, + CPER_SEV_RECOVERABLE, + CPER_SEV_FATAL, + CPER_SEV_CORRECTED, + CPER_SEV_INFORMATIONAL, };
/* Generic Error Status block */ @@ -213,7 +213,11 @@ struct cper_sec_mem_err { uint64_t responder_id; uint64_t target_id; uint8_t error_type; -} __attribute__ ((packed)); + uint8_t reserved; + uint16_t rank; + uint16_t mem_array_handle; /* card handle in UEFI 2.4 */ + uint16_t mem_dev_handle; /* module handle in UEFI 2.4 */ +};
/* ERST Error Log Address Range atrributes */ #define ERST_RANGE_RESERVED 0x0001
On 01/10/2014 06:10 AM, Tomasz Nowicki wrote:
This patch set is needed due to:
- APEI tables address adjustments
- rebase to the kernel 3.13
- more descriptive error example
Changes for v2:
- add changelogs
Tomasz Nowicki (3): apei: Adjust addresses for APEI testing via UEFI -> GRUB -> ACPI kernel. acpi, apei: More detailed info regarding memory error. apei: Follow up lately kernel changes.
platforms/rtsm_ve-aemv8a.acpi/bert.asl | 2 +- platforms/rtsm_ve-aemv8a.acpi/einj.asl | 16 ++++++++-------- platforms/rtsm_ve-aemv8a.acpi/erst.asl | 32 +++++++++++++++---------------- platforms/rtsm_ve-aemv8a.acpi/hest.asl | 2 +- tools/bfapei/bfapei.c | 20 ++++++++++++++++++- tools/common/include/acpi.h | 33 ++++++++++++++++++++++++++------ 6 files changed, 72 insertions(+), 33 deletions(-)
Thanks for the changelogs. Looks good to me.
Acked-by: Al Stone al.stone@linaro.org