stage_cache: Disable when APCI S3 is not possible

Don't consume CBMEM for stage cache when we would
never use it.

Change-Id: I606e0457ff3085822554c4041fc56f0d28cc9c2d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/27230
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Kyösti Mälkki 2018-06-25 15:38:45 +03:00
parent e0058e89ab
commit a8c0cb3512
2 changed files with 3 additions and 1 deletions

View File

@ -1152,6 +1152,7 @@ config RELOCATABLE_MODULES
config NO_STAGE_CACHE config NO_STAGE_CACHE
bool bool
default y if !HAVE_ACPI_RESUME
help help
Do not save any component in stage cache for resume path. On resume, Do not save any component in stage cache for resume path. On resume,
all components would be read back from CBFS again. all components would be read back from CBFS again.

View File

@ -154,7 +154,8 @@ void run_ramstage(void)
} else if (load_nonrelocatable_ramstage(&ramstage)) } else if (load_nonrelocatable_ramstage(&ramstage))
goto fail; 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); timestamp_add_now(TS_END_COPYRAM);