summaryrefslogtreecommitdiff
path: root/src/include/program_loading.h
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-16 21:45:36 +0000
commitb25576fa6368f288f1ce3e34f87894d6cd3859d1 (patch)
treea91cc47dba05934a3a94da0070327f556afda75a /src/include/program_loading.h
parent571e7f02de2d9e4047c28ace45430a777252cba3 (diff)
src/lib/prog_loaders: Add preload_ramstage
This will enable preloading ramstage. By preloading the file into cbfs_cache we reduce boot time. BUG=b:179699789 TEST=Boot guybrush to OS and see 12ms reduction in boot time. Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: Ibe12de806449da25bc0033b02fcb97c3384eddc1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58982 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/include/program_loading.h')
-rw-r--r--src/include/program_loading.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/program_loading.h b/src/include/program_loading.h
index 5b9a94df06..ba42465046 100644
--- a/src/include/program_loading.h
+++ b/src/include/program_loading.h
@@ -145,6 +145,13 @@ int legacy_romstage_select_and_load(struct prog *romstage);
* RAMSTAGE LOADING *
************************/
+/*
+ * Asynchronously preloads ramstage.
+ *
+ * This should be called early on to allow ramstage to load before
+ * `run_ramstage` is called.
+ */
+void preload_ramstage(void);
/* Run ramstage from romstage. */
void run_ramstage(void);