arch/x86/acpi_bert_storage: unbreak BERT support

commit 522e0dbdaa (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 <felix-coreboot@felixheld.de>
Change-Id: Ic2d2a115f3f2879c3d3a02f3ee8aee82f00f2ac7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54738
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Held 2021-05-21 03:22:05 +02:00
parent c175146b15
commit 17e67d2f02
1 changed files with 0 additions and 4 deletions

View File

@ -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))