diff options
author | Tomasz Nowicki <tomasz.nowicki@linaro.org> | 2014-01-08 17:59:57 +0100 |
---|---|---|
committer | Tomasz Nowicki <tomasz.nowicki@linaro.org> | 2014-01-10 13:56:10 +0100 |
commit | 6781956d917515cf10e518f936a9df2223745093 (patch) | |
tree | e7b2cee2a98d256f638eb60ccf3d6f3775586994 | |
parent | 2bb07aea4a3008d7f922631d4b0628b2c4652d6a (diff) |
acpi, apei: More detailed info regarding memory error.
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>
-rw-r--r-- | tools/bfapei/bfapei.c | 18 | ||||
-rw-r--r-- | tools/common/include/acpi.h | 19 |
2 files changed, 36 insertions, 1 deletions
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, |