diff options
Diffstat (limited to 'src/drivers/intel/fsp2_0')
-rw-r--r-- | src/drivers/intel/fsp2_0/Kconfig | 4 | ||||
-rw-r--r-- | src/drivers/intel/fsp2_0/stage_cache.c | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig index 3ffb402965..c653148696 100644 --- a/src/drivers/intel/fsp2_0/Kconfig +++ b/src/drivers/intel/fsp2_0/Kconfig @@ -90,4 +90,8 @@ config CHECKLIST_DATA_FILE_LOCATION string default "src/vendorcode/intel/fsp/fsp2_0/checklist" +config RESET_ON_INVALID_RAMSTAGE_CACHE + bool "Reset the system on S3 wake when ramstage cache invalid." + default n + endif diff --git a/src/drivers/intel/fsp2_0/stage_cache.c b/src/drivers/intel/fsp2_0/stage_cache.c index 2d594e6048..4469a7f3b5 100644 --- a/src/drivers/intel/fsp2_0/stage_cache.c +++ b/src/drivers/intel/fsp2_0/stage_cache.c @@ -17,6 +17,8 @@ #include <console/console.h> #include <fsp/memmap.h> #include <stage_cache.h> +#include <reset.h> +#include <program_loading.h> void stage_cache_external_region(void **base, size_t *size) { @@ -26,3 +28,10 @@ void stage_cache_external_region(void **base, size_t *size) *size = 0; } } + +void ramstage_cache_invalid(void) +{ + if (IS_ENABLED(CONFIG_RESET_ON_INVALID_RAMSTAGE_CACHE)) + /* Perform cold reset on invalid ramstage cache. */ + hard_reset(); +} |