diff options
-rw-r--r-- | src/soc/intel/common/block/fast_spi/fast_spi.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/soc/intel/common/block/fast_spi/fast_spi.c b/src/soc/intel/common/block/fast_spi/fast_spi.c index 0e012316d1..7be71a26fb 100644 --- a/src/soc/intel/common/block/fast_spi/fast_spi.c +++ b/src/soc/intel/common/block/fast_spi/fast_spi.c @@ -245,10 +245,14 @@ static void fast_spi_cache_ext_bios_window(void) if (!fast_spi_ext_bios_cache_range(&ext_bios_base, &ext_bios_size)) return; - int mtrr = get_free_var_mtrr(); - if (mtrr == -1) - return; - set_var_mtrr(mtrr, ext_bios_base, ext_bios_size, type); + if (ENV_PAYLOAD_LOADER) { + mtrr_use_temp_range(ext_bios_base, ext_bios_size, type); + } else { + int mtrr = get_free_var_mtrr(); + if (mtrr == -1) + return; + set_var_mtrr(mtrr, ext_bios_base, ext_bios_size, type); + } } void fast_spi_cache_ext_bios_postcar(struct postcar_frame *pcf) |