diff options
author | Simon Glass | 2023-01-17 10:48:17 -0700 |
---|---|---|
committer | Tom Rini | 2023-01-23 18:11:41 -0500 |
commit | a950f2855a5fcc1e550aa6786720a3a995b1ceda (patch) | |
tree | dc3e9babc6e6bbbaa5e4841cffab95f7fb4bcdbf /include/bootflow.h | |
parent | 4b7cb058df35222632efa3f71aad63757b226440 (diff) |
bootstd: Record the bootdevs used during scanning
Add a way to record the bootdevs used when scanning for bootflows. This is
useful for testing.
Enable this only with BOOTSTD_FULL and do the same for the progress
reporting.
Re-enable and update the affected tests now that we have this feature.
For bootdev_test_order_default() there is no-longer any support for using
the bootdev aliases to specify an ordering, so drop that part of the test.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/bootflow.h')
-rw-r--r-- | include/bootflow.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/bootflow.h b/include/bootflow.h index c2368912061..f516bf8dea4 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -14,6 +14,10 @@ struct bootstd_priv; struct expo; +enum { + BOOTFLOW_MAX_USED_DEVS = 16, +}; + /** * enum bootflow_state_t - states that a particular bootflow can be in * @@ -173,7 +177,9 @@ enum bootflow_meth_flags_t { * @err: Error obtained from checking the last iteration. This is used to skip * forward (e.g. to skip the current partition because it is not valid) * -ESHUTDOWN: try next bootdev - * @num_devs: Number of bootdevs in @dev_order + * @num_devs: Number of bootdevs in @dev_used + * @max_devs: Maximum number of entries in @dev_used + * @dev_used: List of bootdevs used during iteration * @labels: List of labels to scan for bootdevs * @cur_label: Current label being processed * @num_methods: Number of bootmeth devices in @method_order @@ -196,6 +202,8 @@ struct bootflow_iter { int first_bootable; int err; int num_devs; + int max_devs; + struct udevice *dev_used[BOOTFLOW_MAX_USED_DEVS]; const char *const *labels; int cur_label; int num_methods; |