arch/x86/acpi_bert_storage.c: Allow vendor specific BERT entries
Add a Kconfg option to allow the SoC to add vendor specific BERT entries, not yet defined in the ACPI spec. The function only has to return the size of payload data and the generic code will allocate space on the BERT table. The caller must fill in all BERT fields since the generic code doesn't know anything about the BERT entry. Change-Id: I361700098ce1a3cc6acae991456a1901d2f07fb6 Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90639 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
00fbc08b76
commit
282c27c95c
3 changed files with 16 additions and 2 deletions
|
|
@ -459,4 +459,11 @@ config SOC_FILL_CPU_CACHE_INFO
|
|||
default n
|
||||
help
|
||||
SoC selects this if it implements soc_fill_cpu_cache_info.
|
||||
|
||||
config SOC_BERT_SIZEOF_ERROR_SECTION
|
||||
bool
|
||||
default n
|
||||
help
|
||||
SoC selects this if it implements soc_bert_sizeof_error_section.
|
||||
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -192,6 +192,11 @@ static size_t sizeof_error_section(guid_t *guid)
|
|||
else if (!guidcmp(guid, &CPER_SEC_FW_ERR_REC_REF_GUID))
|
||||
return sizeof(cper_fw_err_rec_section_t);
|
||||
/* else if ... sizeof(structures not yet defined) */
|
||||
else if (CONFIG(SOC_BERT_SIZEOF_ERROR_SECTION)) {
|
||||
size_t size = soc_bert_sizeof_error_section(guid);
|
||||
if (size)
|
||||
return size;
|
||||
}
|
||||
|
||||
printk(BIOS_ERR, "Requested size of unrecognized CPER GUID\n");
|
||||
return 0;
|
||||
|
|
@ -535,9 +540,8 @@ acpi_generic_error_status_t *bert_new_event(guid_t *guid)
|
|||
r = bert_append_ia32x64(status);
|
||||
else if (!guidcmp(guid, &CPER_SEC_FW_ERR_REC_REF_GUID))
|
||||
r = bert_append_fw_err(status);
|
||||
/* else if other types not implemented */
|
||||
else
|
||||
r = NULL;
|
||||
r = bert_append_error_datasection(status, guid);
|
||||
|
||||
if (r)
|
||||
return status;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@
|
|||
*/
|
||||
void bert_errors_region(void **start, size_t *size);
|
||||
|
||||
/* Returns the size for SoC specific GUIDs */
|
||||
size_t soc_bert_sizeof_error_section(guid_t *guid);
|
||||
|
||||
/* Get amount of available storage left for error info */
|
||||
size_t bert_storage_remaining(void);
|
||||
/* Find if errors were added, a BERT region is present, and ACPI table needed */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue