summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/soc/amd/common/block/apob/Kconfig9
-rw-r--r--src/soc/amd/common/block/apob/Makefile.inc8
-rw-r--r--src/soc/amd/common/block/include/amdblocks/apob_cache.h6
3 files changed, 16 insertions, 7 deletions
diff --git a/src/soc/amd/common/block/apob/Kconfig b/src/soc/amd/common/block/apob/Kconfig
index c8ebc19ef8..a1cd0049e9 100644
--- a/src/soc/amd/common/block/apob/Kconfig
+++ b/src/soc/amd/common/block/apob/Kconfig
@@ -4,6 +4,15 @@ config SOC_AMD_COMMON_BLOCK_APOB
Select this option to add firmware support for the non-volatile APOB
cache to the build.
+config SOC_AMD_COMMON_BLOCK_APOB_NV_DISABLE
+ bool "Disable non-volatile APOB support"
+ depends on SOC_AMD_COMMON_BLOCK_APOB
+ help
+ Select this to disable non-volatile APOB cache and train memory
+ on every boot.
+
+ If unsure, say N.
+
config SOC_AMD_COMMON_BLOCK_APOB_HASH
bool
help
diff --git a/src/soc/amd/common/block/apob/Makefile.inc b/src/soc/amd/common/block/apob/Makefile.inc
index ae550bc522..d7e27a2d14 100644
--- a/src/soc/amd/common/block/apob/Makefile.inc
+++ b/src/soc/amd/common/block/apob/Makefile.inc
@@ -1,6 +1,6 @@
## SPDX-License-Identifier: GPL-2.0-only
-ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_APOB),y)
-romstage-y += apob_cache.c
-ramstage-y += apob_cache.c
+ifneq ($(CONFIG_SOC_AMD_COMMON_BLOCK_APOB_NV_DISABLE),y)
+romstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_APOB) += apob_cache.c
+ramstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_APOB) += apob_cache.c
-endif # CONFIG_SOC_AMD_COMMON_BLOCK_APOB
+endif # !CONFIG_SOC_AMD_COMMON_BLOCK_APOB_NV_DISABLE
diff --git a/src/soc/amd/common/block/include/amdblocks/apob_cache.h b/src/soc/amd/common/block/include/amdblocks/apob_cache.h
index bbb65a72e2..756b6b30cb 100644
--- a/src/soc/amd/common/block/include/amdblocks/apob_cache.h
+++ b/src/soc/amd/common/block/include/amdblocks/apob_cache.h
@@ -5,13 +5,13 @@
#include <stddef.h>
-#if CONFIG(SOC_AMD_COMMON_BLOCK_APOB)
+#if CONFIG(SOC_AMD_COMMON_BLOCK_APOB) && !CONFIG(SOC_AMD_COMMON_BLOCK_APOB_NV_DISABLE)
/* Start loading the APOB as soon as possible so it is ready by the time we need it. */
void start_apob_cache_read(void);
void *soc_fill_apob_cache(void);
-#else /* CONFIG(SOC_AMD_COMMON_BLOCK_APOB) */
+#else /* CONFIG(SOC_AMD_COMMON_BLOCK_APOB) && !CONFIG(SOC_AMD_COMMON_BLOCK_APOB_NV_DISABLE) */
static inline void start_apob_cache_read(void) {}
static inline void *soc_fill_apob_cache(void) { return NULL; }
-#endif /* CONFIG(SOC_AMD_COMMON_BLOCK_APOB) */
+#endif /* CONFIG(SOC_AMD_COMMON_BLOCK_APOB) && !CONFIG(SOC_AMD_COMMON_BLOCK_APOB_NV_DISABLE) */
#endif /* AMD_BLOCK_APOB_CACHE_H */