--- 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,