From a8c0cb35121c30120f032ecbd0de172540db8a6c Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Mon, 25 Jun 2018 15:38:45 +0300 Subject: stage_cache: Disable when APCI S3 is not possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't consume CBMEM for stage cache when we would never use it. Change-Id: I606e0457ff3085822554c4041fc56f0d28cc9c2d Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/27230 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/Kconfig | 1 + src/lib/prog_loaders.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Kconfig b/src/Kconfig index 875c9d0790..24b21060b6 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -1152,6 +1152,7 @@ config RELOCATABLE_MODULES config NO_STAGE_CACHE bool + default y if !HAVE_ACPI_RESUME help Do not save any component in stage cache for resume path. On resume, all components would be read back from CBFS again. diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 02b6590aac..1c192d1f8b 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -154,7 +154,8 @@ void run_ramstage(void) } else if (load_nonrelocatable_ramstage(&ramstage)) goto fail; - stage_cache_add(STAGE_RAMSTAGE, &ramstage); + if (!IS_ENABLED(CONFIG_NO_STAGE_CACHE)) + stage_cache_add(STAGE_RAMSTAGE, &ramstage); timestamp_add_now(TS_END_COPYRAM); -- cgit v1.2.3