aboutsummaryrefslogtreecommitdiff
path: root/include/bootmeth.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/bootmeth.h')
-rw-r--r--include/bootmeth.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/include/bootmeth.h b/include/bootmeth.h
index 7cb7da33de..0fc36104ec 100644
--- a/include/bootmeth.h
+++ b/include/bootmeth.h
@@ -16,9 +16,12 @@ struct udevice;
* enum bootmeth_flags - Flags for bootmeths
*
* @BOOTMETHF_GLOBAL: bootmeth handles bootdev selection automatically
+ * @BOOTMETHF_ANY_PART: bootmeth is willing to check any partition, even if it
+ * has no filesystem
*/
enum bootmeth_flags {
BOOTMETHF_GLOBAL = BIT(0),
+ BOOTMETHF_ANY_PART = BIT(1),
};
/**
@@ -119,7 +122,16 @@ struct bootmeth_ops {
*/
int (*read_file)(struct udevice *dev, struct bootflow *bflow,
const char *file_path, ulong addr, ulong *sizep);
-
+#if CONFIG_IS_ENABLED(BOOTSTD_FULL)
+ /**
+ * readall() - read all files for a bootflow
+ *
+ * @dev: Bootmethod device to boot
+ * @bflow: Bootflow to read
+ * Return: 0 if OK, -EIO on I/O error, other -ve on other error
+ */
+ int (*read_all)(struct udevice *dev, struct bootflow *bflow);
+#endif /* BOOTSTD_FULL */
/**
* boot() - boot a bootflow
*
@@ -224,6 +236,20 @@ int bootmeth_read_file(struct udevice *dev, struct bootflow *bflow,
const char *file_path, ulong addr, ulong *sizep);
/**
+ * bootmeth_read_all() - read all bootflow files
+ *
+ * Some bootmeths delay reading of large files until booting is requested. This
+ * causes those files to be read.
+ *
+ * @dev: Bootmethod device to use
+ * @bflow: Bootflow to read
+ * Return: does not return on success, since it should boot the
+ * Operating Systemn. Returns -EFAULT if that fails, other -ve on
+ * other error
+ */
+int bootmeth_read_all(struct udevice *dev, struct bootflow *bflow);
+
+/**
* bootmeth_boot() - boot a bootflow
*
* @dev: Bootmethod device to boot