From 63226901c758e6a8374329587f5393d9af401d13 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 17 Feb 2022 17:22:25 +0100 Subject: soc/amd/common/block/apob/apob_cache: use APOB cache size from FMAP Also add the Makefile dependency on the fmap_config.h file to make sure that this file already exists when it's included. Signed-off-by: Felix Held Change-Id: I540ea2c14fd187845efd3c0c8c1e4b8f82c8cac3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62130 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- src/soc/amd/common/block/apob/Makefile.inc | 4 ++++ src/soc/amd/common/block/apob/apob_cache.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/soc/amd/common/block') diff --git a/src/soc/amd/common/block/apob/Makefile.inc b/src/soc/amd/common/block/apob/Makefile.inc index 6e217df648..56cd5e12de 100644 --- a/src/soc/amd/common/block/apob/Makefile.inc +++ b/src/soc/amd/common/block/apob/Makefile.inc @@ -1,4 +1,8 @@ ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_APOB),y) romstage-y += apob_cache.c ramstage-y += apob_cache.c + +$(call src-to-obj,romstage,$(dir)/apob_cache.c) : $(obj)/fmap_config.h +$(call src-to-obj,ramstage,$(dir)/apob_cache.c) : $(obj)/fmap_config.h + endif # CONFIG_SOC_AMD_COMMON_BLOCK_APOB diff --git a/src/soc/amd/common/block/apob/apob_cache.c b/src/soc/amd/common/block/apob/apob_cache.c index bdacd81ba4..b932458ec2 100644 --- a/src/soc/amd/common/block/apob/apob_cache.c +++ b/src/soc/amd/common/block/apob/apob_cache.c @@ -9,15 +9,15 @@ #include #include #include +#include #include #include #include #include #include -#define DEFAULT_MRC_CACHE "RW_MRC_CACHE" -/* PSP requires this value to be 64KiB */ -#define DEFAULT_MRC_CACHE_SIZE 0x10000 +#define DEFAULT_MRC_CACHE "RW_MRC_CACHE" +#define DEFAULT_MRC_CACHE_SIZE FMAP_SECTION_RW_MRC_CACHE_SIZE #if !CONFIG_PSP_APOB_DRAM_ADDRESS #error Incorrect APOB configuration setting(s) -- cgit v1.2.3