From a8f5be178db53f41338730e001b0f2ab459f7e31 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 24 Apr 2022 23:31:09 -0600 Subject: bootstd: Add support for bootflows Add support for bootflows, including maintaining a list of them and iterating to find them. Signed-off-by: Simon Glass --- boot/bootdev-uclass.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'boot/bootdev-uclass.c') diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index e0baeb82b14..1ede933c2f2 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -130,6 +131,10 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk, bflow->part = iter->part; + ret = bootmeth_check(bflow->method, iter); + if (ret) + return log_msg_ret("check", ret); + /* * partition numbers start at 0 so this cannot succeed, but it can tell * us whether there is valid media there @@ -171,6 +176,10 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk, bflow->state = BOOTFLOWST_FS; } + ret = bootmeth_read_bootflow(bflow->method, bflow); + if (ret) + return log_msg_ret("method", ret); + return 0; } @@ -445,7 +454,7 @@ void bootdev_clear_bootflows(struct udevice *dev) bflow = list_first_entry(&ucp->bootflow_head, struct bootflow, bm_node); - /* later bootflow_remove(bflow); */ + bootflow_remove(bflow); } } -- cgit v1.2.3