summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/x86/car.ld3
-rw-r--r--src/drivers/intel/fsp1_0/Kconfig1
-rw-r--r--src/lib/Kconfig7
-rw-r--r--src/lib/fmap.c11
-rw-r--r--src/soc/rockchip/rk3288/Kconfig1
5 files changed, 19 insertions, 4 deletions
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index 972cb5234b..3680250993 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -58,7 +58,10 @@
#endif
TIMESTAMP(., 0x200)
+
+#if !CONFIG(NO_FMAP_CACHE)
FMAP_CACHE(., FMAP_SIZE)
+#endif
_car_ehci_dbg_info = .;
/* Reserve sizeof(struct ehci_dbg_info). */
diff --git a/src/drivers/intel/fsp1_0/Kconfig b/src/drivers/intel/fsp1_0/Kconfig
index 32a07771ee..1a1d4f7072 100644
--- a/src/drivers/intel/fsp1_0/Kconfig
+++ b/src/drivers/intel/fsp1_0/Kconfig
@@ -15,6 +15,7 @@ config PLATFORM_USES_FSP1_0
bool
default n
select CAR_GLOBAL_MIGRATION
+ select NO_FMAP_CACHE # doesn't work with CAR_GLOBAL restrictions
help
Selected for Intel processors/platform combinations that use the
Intel Firmware Support Package (FSP) 1.0 for initialization.
diff --git a/src/lib/Kconfig b/src/lib/Kconfig
index cb1e4a5cc8..dd9974a817 100644
--- a/src/lib/Kconfig
+++ b/src/lib/Kconfig
@@ -68,3 +68,10 @@ config HWBASE_DIRECT_PCIDEV
def_bool y
endif
+
+config NO_FMAP_CACHE
+ bool
+ help
+ If your platform really doesn't want to use an FMAP cache (e.g. due to
+ space constraints), you can select this to disable warnings and save
+ a bit more code.
diff --git a/src/lib/fmap.c b/src/lib/fmap.c
index 4b4179c769..48aab8f3d5 100644
--- a/src/lib/fmap.c
+++ b/src/lib/fmap.c
@@ -60,6 +60,9 @@ static void report(const struct fmap *fmap)
static void setup_preram_cache(struct mem_region_device *cache_mrdev)
{
+ if (CONFIG(NO_FMAP_CACHE))
+ return;
+
if (!ENV_ROMSTAGE_OR_BEFORE) {
/* We get here if ramstage makes an FMAP access before calling
cbmem_initialize(). We should avoid letting it come to that,
@@ -70,10 +73,10 @@ static void setup_preram_cache(struct mem_region_device *cache_mrdev)
}
if (REGION_SIZE(fmap_cache) == 0) {
- /* If you see this you really want to add an FMAP_CACHE to your
- memlayout, unless you absolutely can't affort the 2K. */
- print_once(BIOS_NOTICE,
- "NOTE: Running without FMAP_CACHE, should add it!\n");
+ /* If you see this you should add FMAP_CACHE() to your memlayout
+ (or select NO_FMAP_CACHE if you can't afford the 2K). */
+ print_once(BIOS_ERR,
+ "ERROR: FMAP_CACHE enabled but no region provided!\n");
return;
}
diff --git a/src/soc/rockchip/rk3288/Kconfig b/src/soc/rockchip/rk3288/Kconfig
index 3aebab9754..6a44ccd2e0 100644
--- a/src/soc/rockchip/rk3288/Kconfig
+++ b/src/soc/rockchip/rk3288/Kconfig
@@ -29,6 +29,7 @@ config SOC_ROCKCHIP_RK3288
select MAINBOARD_FORCE_NATIVE_VGA_INIT
select HAVE_LINEAR_FRAMEBUFFER
select NO_BOOTBLOCK_CONSOLE
+ select NO_FMAP_CACHE
if SOC_ROCKCHIP_RK3288