Attention is currently required from: Tim Chu.
Hello Tim Chu,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/68878
to review the following change.
Change subject: soc/intel/cmn/block/acpi: enable BERT table without crashlog ......................................................................
soc/intel/cmn/block/acpi: enable BERT table without crashlog
Besides crashlog, there's also MCA error which should be recorded in BERT table. With current code, BERT table is not generated if crashlog is not enabled. Add if statement for SOC_INTEL_CRASHLOG so that MCA error can be recorded in BERT table when crashlog is not supported. crashlog may be support through BMC instead of host firmware.
Also check if BERT region is generated when crashlog is not enabled.
Change-Id: I323ca889eef2b246fc4e062582d2d11b4213316f Signed-off-by: Tim Chu Tim.Chu@quantatw.com Signed-off-by: Jonathan Zhang jonzhang@meta.com --- M src/soc/intel/common/block/acpi/acpi_bert.c 1 file changed, 32 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/68878/1
diff --git a/src/soc/intel/common/block/acpi/acpi_bert.c b/src/soc/intel/common/block/acpi/acpi_bert.c index 779466c..188ebd5 100644 --- a/src/soc/intel/common/block/acpi/acpi_bert.c +++ b/src/soc/intel/common/block/acpi/acpi_bert.c @@ -7,13 +7,9 @@ #include <intelblocks/acpi.h> #include <intelblocks/crashlog.h>
+#if (CONFIG(SOC_INTEL_CRASHLOG)) static bool boot_error_src_present(void) { - if (!CONFIG(SOC_INTEL_CRASHLOG)) { - printk(BIOS_DEBUG, "Crashlog disabled.\n"); - return false; - } - if (!discover_crashlog()) { printk(BIOS_SPEW, "Crashlog discovery result: crashlog not found\n"); return false; @@ -26,9 +22,11 @@
return (crashlog_size > 0); } +#endif
enum cb_err acpi_soc_get_bert_region(void **region, size_t *length) { +#if (CONFIG(SOC_INTEL_CRASHLOG)) acpi_generic_error_status_t *status = NULL; size_t cpu_record_size, pmc_record_size; size_t gesb_header_size; @@ -94,6 +92,16 @@
*length = status->data_length + gesb_header_size; *region = (void *)status; +#else + /* Check if MCA error has been added into BERT. */ + if (bert_should_generate_acpi_table()) { + bert_errors_region(region, length); + if (!*region) { + printk(BIOS_ERR, "Error: Can't find BERT storage area\n"); + return CB_ERR; + } + } +#endif
return CB_SUCCESS; }