aboutsummaryrefslogtreecommitdiff
path: root/include/bootflow.h
diff options
context:
space:
mode:
authorSimon Glass2023-08-10 19:33:18 -0600
committerSimon Glass2023-08-11 07:33:38 -0600
commitc279224ea6686a992b258b01e07fcadb7f0c7ecb (patch)
tree48273b66cf481b328b6a8871e14cafaedaf87123 /include/bootflow.h
parentcbb607d2d9be44a5ded7a652e8e7646925adc1e0 (diff)
bootstd: Add a command to read all files for a bootflow
Some bootflows (such as EFI and ChromiumOS) delay reading the kernel until it is needed to boot. This saves time when scanning and avoids needing to allocate memory for something that may never be used. To permit reading of these files, add a new 'bootflow read' command. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/bootflow.h')
-rw-r--r--include/bootflow.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/bootflow.h b/include/bootflow.h
index fdcfeddc1a6..44d3741eaca 100644
--- a/include/bootflow.h
+++ b/include/bootflow.h
@@ -353,6 +353,17 @@ void bootflow_free(struct bootflow *bflow);
int bootflow_boot(struct bootflow *bflow);
/**
+ * bootflow_read_all() - Read all bootflow files
+ *
+ * Some bootmeths delay reading of large files until booting is requested. This
+ * causes those files to be read.
+ *
+ * @bflow: Bootflow to read
+ * Return: result of trying to read
+ */
+int bootflow_read_all(struct bootflow *bflow);
+
+/**
* bootflow_run_boot() - Try to boot a bootflow
*
* @iter: Current iteration (or NULL if none). Used to disable a bootmeth if the