From 67798cfd80baa0eba03d8598cab9d5f34ab4e756 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Fri, 2 Jul 2021 17:07:05 -0600 Subject: 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 Change-Id: Ifa8f30a0f4f931ece803c2e8e022e4d33d3fe581 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56051 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/include/program_loading.h | 7 +++++++ src/include/symbols.h | 1 + 2 files changed, 8 insertions(+) (limited to 'src/include') 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) -- cgit v1.2.3