summaryrefslogtreecommitdiffstats
path: root/src/drivers/intel/fsp2_0/silicon_init.c
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2021-11-05 10:29:24 -0600
committerRaul Rangel <rrangel@chromium.org>2021-11-08 20:20:01 +0000
commit159284606a761ea7f5574d9e8eb5cde20a1300ef (patch)
treeff913b3fd70eddc92d544026a4504d9de5d82208 /src/drivers/intel/fsp2_0/silicon_init.c
parent82897c9c4f15880a7efa21c4e11a0929975384a1 (diff)
downloadcoreboot-159284606a761ea7f5574d9e8eb5cde20a1300ef.tar.gz
coreboot-159284606a761ea7f5574d9e8eb5cde20a1300ef.tar.bz2
coreboot-159284606a761ea7f5574d9e8eb5cde20a1300ef.zip
drivers/intel/fsp2_0: Add preload_fspm and preload_fsps
In the non-XIP world, FSP is normally memmapped and then decompressed. The AMD SPI DMA controller can actually read faster than mmap. So by reading the contents into a buffer and then decompressing we reduce boot time. BUG=b:179699789 TEST=Boot guybrush and see 30ms reduction in boot time Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I28d7530ae9e50f743e3d6c86a5a29b1fa85cacb6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58987 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/drivers/intel/fsp2_0/silicon_init.c')
-rw-r--r--src/drivers/intel/fsp2_0/silicon_init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c
index b3e60c25c3b7..83d44b140fa3 100644
--- a/src/drivers/intel/fsp2_0/silicon_init.c
+++ b/src/drivers/intel/fsp2_0/silicon_init.c
@@ -230,6 +230,15 @@ void fsps_load(void)
load_done = 1;
}
+void preload_fsps(void)
+{
+ if (!CONFIG(CBFS_PRELOAD))
+ return;
+
+ printk(BIOS_DEBUG, "Preloading %s\n", CONFIG_FSP_S_CBFS);
+ cbfs_preload(CONFIG_FSP_S_CBFS);
+}
+
void fsp_silicon_init(void)
{
timestamp_add_now(TS_FSP_SILICON_INIT_LOAD);