summaryrefslogtreecommitdiff
path: root/src/soc/amd/picasso/mca.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/picasso/mca.c')
-rw-r--r--src/soc/amd/picasso/mca.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/soc/amd/picasso/mca.c b/src/soc/amd/picasso/mca.c
index 2970b942ef..cdea0058a8 100644
--- a/src/soc/amd/picasso/mca.c
+++ b/src/soc/amd/picasso/mca.c
@@ -8,6 +8,7 @@
#include <console/console.h>
#include <arch/bert_storage.h>
#include <cper.h>
+#include <cbmem.h>
struct mca_bank {
int bank;
@@ -193,3 +194,31 @@ void check_mca(void)
for (i = 0 ; i < num_banks ; i++)
wrmsr(IA32_MC0_STATUS + (i * 4), mci.sts);
}
+
+void bert_reserved_region(void **start, size_t *size)
+{
+ const struct cbmem_entry *bert;
+
+ *start = NULL;
+ *size = 0;
+
+ bert = cbmem_entry_find(CBMEM_ID_BERT_RAW_DATA);
+ if (!bert)
+ return;
+
+ *start = cbmem_entry_start(bert);
+ *size = cbmem_entry_size(bert);
+}
+
+static void alloc_bert_in_cbmem(int unused)
+{
+ void *p;
+
+ if (CONFIG(ACPI_BERT)) {
+ p = cbmem_add(CBMEM_ID_BERT_RAW_DATA, CONFIG_ACPI_BERT_SIZE);
+ if (!p)
+ printk(BIOS_ERR, "Error: BERT region was not added\n");
+ }
+}
+
+ROMSTAGE_CBMEM_INIT_HOOK(alloc_bert_in_cbmem)