summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-05-13 01:17:20 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-06-08 18:23:49 +0000
commita389b3cb4d45d8dec770109f50054fca4c708a28 (patch)
tree9f16f32b2f65216c730993c11b3637b98bec4a91
parent17e67d2f02c039fc8ae71d25ab4380cc7e5854c8 (diff)
soc/amd/picasso/agesa_acpi: add BERT support
Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I14577e80e722cb5ccf344a4520cf3adde669fc5e Reviewed-on: https://review.coreboot.org/c/coreboot/+/54149 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
-rw-r--r--src/soc/amd/picasso/agesa_acpi.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/soc/amd/picasso/agesa_acpi.c b/src/soc/amd/picasso/agesa_acpi.c
index abac9c1804..11be89ced1 100644
--- a/src/soc/amd/picasso/agesa_acpi.c
+++ b/src/soc/amd/picasso/agesa_acpi.c
@@ -3,6 +3,7 @@
#include <acpi/acpi.h>
#include <acpi/acpi_crat.h>
#include <acpi/acpi_ivrs.h>
+#include <arch/bert_storage.h>
#include <console/console.h>
#include <cpu/amd/cpuid.h>
#include <cpu/amd/msr.h>
@@ -1016,3 +1017,22 @@ uintptr_t agesa_write_acpi_tables(const struct device *device, uintptr_t current
return current;
}
+
+enum cb_err acpi_soc_get_bert_region(void **region, size_t *length)
+{
+ /*
+ * Skip the table if no errors are present. ACPI driver reports
+ * a table with a 0-length region:
+ * BERT: [Firmware Bug]: table invalid.
+ */
+ if (!bert_should_generate_acpi_table())
+ return CB_ERR;
+
+ bert_errors_region(region, length);
+ if (!region) {
+ printk(BIOS_ERR, "Error: Can't find BERT storage area\n");
+ return CB_ERR;
+ }
+
+ return CB_SUCCESS;
+}