summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/stoneyridge/Kconfig8
-rw-r--r--src/soc/amd/stoneyridge/memmap.c27
2 files changed, 17 insertions, 18 deletions
diff --git a/src/soc/amd/stoneyridge/Kconfig b/src/soc/amd/stoneyridge/Kconfig
index 7bc5ad9c55..0127ac3cec 100644
--- a/src/soc/amd/stoneyridge/Kconfig
+++ b/src/soc/amd/stoneyridge/Kconfig
@@ -373,4 +373,12 @@ config DISABLE_KEYBOARD_RESET_PIN
functionality isn't disabled, configuring it as an output and driving
it as 0 will cause a reset.
+config ACPI_BERT_SIZE
+ hex
+ default 0x100000 if ACPI_BERT
+ default 0x0
+ help
+ Specify the amount of DRAM reserved for gathering the data used to
+ generate the ACPI table.
+
endif # SOC_AMD_STONEYRIDGE
diff --git a/src/soc/amd/stoneyridge/memmap.c b/src/soc/amd/stoneyridge/memmap.c
index 06f80de666..e411aa2ef3 100644
--- a/src/soc/amd/stoneyridge/memmap.c
+++ b/src/soc/amd/stoneyridge/memmap.c
@@ -13,24 +13,16 @@
#include <soc/iomap.h>
#include <amdblocks/biosram.h>
-#if CONFIG(ACPI_BERT)
- #if CONFIG_SMM_TSEG_SIZE == 0x0
- #define BERT_REGION_MAX_SIZE 0x100000
- #else
- /* SMM_TSEG_SIZE must stay on a boundary appropriate for its granularity */
- #define BERT_REGION_MAX_SIZE CONFIG_SMM_TSEG_SIZE
- #endif
-#else
- #define BERT_REGION_MAX_SIZE 0
-#endif
-
void bert_reserved_region(void **start, size_t *size)
{
- if (CONFIG(ACPI_BERT))
- *start = cbmem_top();
- else
+ if (!CONFIG(ACPI_BERT)) {
*start = NULL;
- *size = BERT_REGION_MAX_SIZE;
+ *size = 0;
+ } else {
+ *start = cbmem_add(CBMEM_ID_ACPI_BERT, CONFIG_ACPI_BERT_SIZE);
+ *size = CONFIG_ACPI_BERT_SIZE;
+ }
+ printk(BIOS_INFO, "Reserved BERT region base: %p, size: 0x%zx\n", *start, *size);
}
void *cbmem_top_chipset(void)
@@ -42,13 +34,12 @@ void *cbmem_top_chipset(void)
/* 8MB alignment to keep MTRR usage low */
return (void *)ALIGN_DOWN(restore_top_of_low_cacheable()
- - CONFIG_SMM_TSEG_SIZE
- - BERT_REGION_MAX_SIZE, 8*MiB);
+ - CONFIG_SMM_TSEG_SIZE, 8*MiB);
}
static uintptr_t smm_region_start(void)
{
- return (uintptr_t)cbmem_top() + BERT_REGION_MAX_SIZE;
+ return (uintptr_t)cbmem_top();
}
static size_t smm_region_size(void)