From 17e67d2f02c039fc8ae71d25ab4380cc7e5854c8 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Fri, 21 May 2021 03:22:05 +0200 Subject: arch/x86/acpi_bert_storage: unbreak BERT support commit 522e0dbdaa46dde5363ad4c50a11938ae2f17a0d (acpi: Add support for reporting CrashLog in BERT table) broke the BERT support for AMD platforms. [1] is the check in the Linux kernel that failed after that patch. CB:55006 moves the calculations that are needed by the Intel SoC BERT support to the SoC code, so this change shouldn't break it. TEST=When injecting a BERT error Linux on AMD/Mandolin is able to decode and display the error. [1] https://elixir.bootlin.com/linux/v5.12.6/source/drivers/firmware/efi/cper.c#L617 Signed-off-by: Felix Held Change-Id: Ic2d2a115f3f2879c3d3a02f3ee8aee82f00f2ac7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/54738 Reviewed-by: Marshall Dawson Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) --- src/arch/x86/acpi_bert_storage.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/arch/x86/acpi_bert_storage.c b/src/arch/x86/acpi_bert_storage.c index a8b8628b11..a9c06f48fe 100644 --- a/src/arch/x86/acpi_bert_storage.c +++ b/src/arch/x86/acpi_bert_storage.c @@ -107,7 +107,6 @@ static void revise_error_sizes(acpi_generic_error_status_t *status, size_t size) entries = bert_entry_count(status); entry = acpi_hest_generic_data_nth(status, entries); status->data_length += size; - status->raw_data_length += size; if (entry) entry->data_length += size; } @@ -176,7 +175,6 @@ static acpi_hest_generic_data_v300_t *new_generic_error_entry( entry->validation_bits |= ACPI_GENERROR_VALID_TIMESTAMP; status->data_length += sizeof(*entry); - status->raw_data_length += sizeof(*entry); bert_bump_entry_count(status); return entry; @@ -529,8 +527,6 @@ acpi_generic_error_status_t *bert_new_event(guid_t *guid) if (!status) return NULL; - status->raw_data_length = sizeof(*status); - if (!guidcmp(guid, &CPER_SEC_PROC_GENERIC_GUID)) r = bert_append_genproc(status); else if (!guidcmp(guid, &CPER_SEC_PROC_GENERIC_GUID)) -- cgit v1.2.3