From c175146b1549b154657a4823fcabc6de6bd6f000 Mon Sep 17 00:00:00 2001 From: Francois Toguo Fotso Date: Thu, 27 May 2021 01:10:16 -0700 Subject: [PATCH] soc/intel/common: Update CrashLog data length tracking The CrashLog raw_data_length, previously used to track the length for the Intel CrashLog decoder, is causing noises in the Linux kernel for AMD. Hence this update made at the soc level which will enable the pulling put of the tracking from x86/acpi_bert_storage.c. BUG=None TEST=Built, and BERT successfully generated in the crashLog flow. Signed-off-by: Francois Toguo Fotso Change-Id: I97ff14d62bda69389c7647fcbbf23d5cab2b36e6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55006 Reviewed-by: Marshall Dawson Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/acpi/acpi_bert.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/soc/intel/common/block/acpi/acpi_bert.c b/src/soc/intel/common/block/acpi/acpi_bert.c index d35c6c01aa..85fbc03f6e 100644 --- a/src/soc/intel/common/block/acpi/acpi_bert.c +++ b/src/soc/intel/common/block/acpi/acpi_bert.c @@ -31,6 +31,7 @@ enum cb_err acpi_soc_get_bert_region(void **region, size_t *length) { acpi_generic_error_status_t *status = NULL; size_t cpu_record_size, pmc_record_size; + size_t gesb_header_size; void *cl_data = NULL; if (!boot_error_src_present()) { @@ -43,6 +44,8 @@ enum cb_err acpi_soc_get_bert_region(void **region, size_t *length) } status = bert_new_event(&CPER_SEC_FW_ERR_REC_REF_GUID); + gesb_header_size = sizeof(*status); + if (!status) { printk(BIOS_ERR, "Error: unable to allocate GSB\n"); return CB_ERR; @@ -89,7 +92,7 @@ enum cb_err acpi_soc_get_bert_region(void **region, size_t *length) cl_fill_pmc_records(cl_data); } - *length = status->raw_data_length; + *length = status->data_length + gesb_header_size; *region = (void *)status; return CB_SUCCESS;