summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2021-07-02 17:07:05 -0600
committerMartin Roth <martinroth@google.com>2021-07-19 02:42:43 +0000
commit67798cfd80baa0eba03d8598cab9d5f34ab4e756 (patch)
tree03ee6a4b79a7cb0e262a7f55f85f402afbe28f8b /src/include
parent61f44127f0c06688343fdfa3f518a58b4efe170c (diff)
lib/prog_loaders: Add payload_preload
This method will allow the SoC code to start loading the payload before it is required. BUG=b:177909625 TEST=Boot guybrush and see read/decompress drop by 23 ms. Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: Ifa8f30a0f4f931ece803c2e8e022e4d33d3fe581 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56051 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/program_loading.h7
-rw-r--r--src/include/symbols.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/include/program_loading.h b/src/include/program_loading.h
index 65a36b9b2a..5b9a94df06 100644
--- a/src/include/program_loading.h
+++ b/src/include/program_loading.h
@@ -154,6 +154,13 @@ void run_ramstage(void);
int payload_arch_usable_ram_quirk(uint64_t start, uint64_t size);
+/*
+ * Asynchronously preloads the payload.
+ *
+ * This should be called early on to allow the payload to load before
+ * `payload_load` is called.
+ */
+void payload_preload(void);
/* Load payload into memory in preparation to run. */
void payload_load(void);
diff --git a/src/include/symbols.h b/src/include/symbols.h
index 3e4694b90d..52624d4e4c 100644
--- a/src/include/symbols.h
+++ b/src/include/symbols.h
@@ -52,6 +52,7 @@ DECLARE_REGION(asan_shadow)
/* Regions for execution units. */
+DECLARE_REGION(payload_preload_cache)
DECLARE_REGION(payload)
/* "program" always refers to the current execution unit. */
DECLARE_REGION(program)