Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright 2021 Google LLC |
| 4 | * Written by Simon Glass <sjg@chromium.org> |
| 5 | */ |
| 6 | |
| 7 | #ifndef __bootmeth_h |
| 8 | #define __bootmeth_h |
| 9 | |
Tom Rini | dec7ea0 | 2024-05-20 13:35:03 -0600 | [diff] [blame] | 10 | #include <linux/bitops.h> |
| 11 | |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 12 | struct blk_desc; |
| 13 | struct bootflow; |
| 14 | struct bootflow_iter; |
| 15 | struct udevice; |
| 16 | |
| 17 | /** |
Simon Glass | 4f8633d | 2022-07-30 15:52:21 -0600 | [diff] [blame] | 18 | * enum bootmeth_flags - Flags for bootmeths |
| 19 | * |
| 20 | * @BOOTMETHF_GLOBAL: bootmeth handles bootdev selection automatically |
Simon Glass | 0fca7e8 | 2023-08-24 13:55:43 -0600 | [diff] [blame] | 21 | * @BOOTMETHF_ANY_PART: bootmeth is willing to check any partition, even if it |
| 22 | * has no filesystem |
Simon Glass | 4f8633d | 2022-07-30 15:52:21 -0600 | [diff] [blame] | 23 | */ |
| 24 | enum bootmeth_flags { |
| 25 | BOOTMETHF_GLOBAL = BIT(0), |
Simon Glass | 0fca7e8 | 2023-08-24 13:55:43 -0600 | [diff] [blame] | 26 | BOOTMETHF_ANY_PART = BIT(1), |
Simon Glass | 4f8633d | 2022-07-30 15:52:21 -0600 | [diff] [blame] | 27 | }; |
| 28 | |
| 29 | /** |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 30 | * struct bootmeth_uc_plat - information the uclass keeps about each bootmeth |
| 31 | * |
| 32 | * @desc: A long description of the bootmeth |
Simon Glass | 4f8633d | 2022-07-30 15:52:21 -0600 | [diff] [blame] | 33 | * @flags: Flags for this bootmeth (enum bootmeth_flags) |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 34 | */ |
| 35 | struct bootmeth_uc_plat { |
| 36 | const char *desc; |
Simon Glass | 4f8633d | 2022-07-30 15:52:21 -0600 | [diff] [blame] | 37 | int flags; |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | /** struct bootmeth_ops - Operations for boot methods */ |
| 41 | struct bootmeth_ops { |
| 42 | /** |
Simon Glass | f6d71a8 | 2022-07-30 15:52:19 -0600 | [diff] [blame] | 43 | * get_state_desc() - get detailed state information |
| 44 | * |
Mattijs Korpershoek | f2b610a | 2024-06-04 17:15:21 +0200 | [diff] [blame] | 45 | * Produces a textual description of the state of the boot method. This |
Simon Glass | f6d71a8 | 2022-07-30 15:52:19 -0600 | [diff] [blame] | 46 | * can include newline characters if it extends to multiple lines. It |
| 47 | * must be a nul-terminated string. |
| 48 | * |
| 49 | * This may involve reading state from the system, e.g. some data in |
| 50 | * the firmware area. |
| 51 | * |
| 52 | * @dev: Bootmethod device to check |
| 53 | * @buf: Buffer to place the info in (terminator must fit) |
| 54 | * @maxsize: Size of buffer |
| 55 | * Returns: 0 if OK, -ENOSPC is buffer is too small, other -ve error if |
| 56 | * something else went wrong |
| 57 | */ |
| 58 | int (*get_state_desc)(struct udevice *dev, char *buf, int maxsize); |
| 59 | |
| 60 | /** |
| 61 | * check_supported() - check if a bootmeth supports this bootdev |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 62 | * |
| 63 | * This is optional. If not provided, the bootdev is assumed to be |
| 64 | * supported |
| 65 | * |
| 66 | * The bootmeth can check the bootdev (e.g. to make sure it is a |
| 67 | * network device) or the partition information. The following fields |
| 68 | * in @iter are available: |
| 69 | * |
| 70 | * name, dev, state, part |
| 71 | * max_part may be set if part != 0 (i.e. there is a valid partition |
| 72 | * table). Otherwise max_part is 0 |
| 73 | * method is available but is the same as @dev |
| 74 | * the partition has not yet been read, nor has the filesystem been |
| 75 | * checked |
| 76 | * |
| 77 | * It may update only the flags in @iter |
| 78 | * |
| 79 | * @dev: Bootmethod device to check against |
| 80 | * @iter: On entry, provides bootdev, hwpart, part |
| 81 | * Return: 0 if OK, -ENOTSUPP if this bootdev is not supported |
| 82 | */ |
| 83 | int (*check)(struct udevice *dev, struct bootflow_iter *iter); |
| 84 | |
| 85 | /** |
| 86 | * read_bootflow() - read a bootflow for a device |
| 87 | * |
| 88 | * @dev: Bootmethod device to use |
| 89 | * @bflow: On entry, provides dev, hwpart, part and method. |
| 90 | * Returns updated bootflow if found |
| 91 | * Return: 0 if OK, -ve on error |
| 92 | */ |
| 93 | int (*read_bootflow)(struct udevice *dev, struct bootflow *bflow); |
| 94 | |
| 95 | /** |
Simon Glass | a63bda6 | 2023-01-17 10:48:01 -0700 | [diff] [blame] | 96 | * set_bootflow() - set the bootflow for a device |
| 97 | * |
| 98 | * This provides a bootflow file to the bootmeth, to see if it is valid. |
| 99 | * If it is, the bootflow is set up accordingly. |
| 100 | * |
| 101 | * @dev: Bootmethod device to use |
| 102 | * @bflow: On entry, provides bootdev. |
| 103 | * Returns updated bootflow if found |
| 104 | * @buf: Buffer containing the possible bootflow file |
| 105 | * @size: Size of file |
| 106 | * Return: 0 if OK, -ve on error |
| 107 | */ |
| 108 | int (*set_bootflow)(struct udevice *dev, struct bootflow *bflow, |
| 109 | char *buf, int size); |
| 110 | |
| 111 | /** |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 112 | * read_file() - read a file needed for a bootflow |
| 113 | * |
| 114 | * Read a file from the same place as the bootflow came from |
| 115 | * |
| 116 | * @dev: Bootmethod device to use |
| 117 | * @bflow: Bootflow providing info on where to read from |
| 118 | * @file_path: Path to file (may be absolute or relative) |
| 119 | * @addr: Address to load file |
| 120 | * @sizep: On entry provides the maximum permitted size; on exit |
| 121 | * returns the size of the file |
| 122 | * Return: 0 if OK, -ENOSPC if the file is too large for @sizep, other |
| 123 | * -ve value if something else goes wrong |
| 124 | */ |
| 125 | int (*read_file)(struct udevice *dev, struct bootflow *bflow, |
| 126 | const char *file_path, ulong addr, ulong *sizep); |
Simon Glass | 6d8f95b | 2023-08-10 19:33:18 -0600 | [diff] [blame] | 127 | #if CONFIG_IS_ENABLED(BOOTSTD_FULL) |
| 128 | /** |
| 129 | * readall() - read all files for a bootflow |
| 130 | * |
| 131 | * @dev: Bootmethod device to boot |
| 132 | * @bflow: Bootflow to read |
| 133 | * Return: 0 if OK, -EIO on I/O error, other -ve on other error |
| 134 | */ |
| 135 | int (*read_all)(struct udevice *dev, struct bootflow *bflow); |
| 136 | #endif /* BOOTSTD_FULL */ |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 137 | /** |
| 138 | * boot() - boot a bootflow |
| 139 | * |
| 140 | * @dev: Bootmethod device to boot |
| 141 | * @bflow: Bootflow to boot |
| 142 | * Return: does not return on success, since it should boot the |
Mattijs Korpershoek | f2b610a | 2024-06-04 17:15:21 +0200 | [diff] [blame] | 143 | * operating system. Returns -EFAULT if that fails, -ENOTSUPP if |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 144 | * trying method resulted in finding out that is not actually |
| 145 | * supported for this boot and should not be tried again unless |
| 146 | * something changes, other -ve on other error |
| 147 | */ |
| 148 | int (*boot)(struct udevice *dev, struct bootflow *bflow); |
Martyn Welch | 93a0d16 | 2024-10-09 14:15:40 +0100 | [diff] [blame] | 149 | |
| 150 | /** |
| 151 | * set_property() - set the bootmeth property |
| 152 | * |
| 153 | * This allows the setting of boot method specific properties to enable |
| 154 | * automated finer grain control of the boot process |
| 155 | * |
| 156 | * @name: String containing the name of the relevant boot method |
| 157 | * @property: String containing the name of the property to set |
| 158 | * @value: String containing the value to be set for the specified |
| 159 | * property |
| 160 | * Return: 0 if OK, -ENODEV if an unknown bootmeth or property is |
| 161 | * provided, -ENOENT if there are no bootmeth devices |
| 162 | */ |
| 163 | int (*set_property)(struct udevice *dev, const char *property, |
| 164 | const char *value); |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 165 | }; |
| 166 | |
| 167 | #define bootmeth_get_ops(dev) ((struct bootmeth_ops *)(dev)->driver->ops) |
| 168 | |
| 169 | /** |
Simon Glass | f6d71a8 | 2022-07-30 15:52:19 -0600 | [diff] [blame] | 170 | * bootmeth_get_state_desc() - get detailed state information |
| 171 | * |
Mattijs Korpershoek | f2b610a | 2024-06-04 17:15:21 +0200 | [diff] [blame] | 172 | * Produces a textual description of the state of the boot method. This |
Simon Glass | f6d71a8 | 2022-07-30 15:52:19 -0600 | [diff] [blame] | 173 | * can include newline characters if it extends to multiple lines. It |
| 174 | * must be a nul-terminated string. |
| 175 | * |
| 176 | * This may involve reading state from the system, e.g. some data in |
| 177 | * the firmware area. |
| 178 | * |
| 179 | * @dev: Bootmethod device to check |
| 180 | * @buf: Buffer to place the info in (terminator must fit) |
| 181 | * @maxsize: Size of buffer |
| 182 | * Returns: 0 if OK, -ENOSPC is buffer is too small, other -ve error if |
| 183 | * something else went wrong |
| 184 | */ |
| 185 | int bootmeth_get_state_desc(struct udevice *dev, char *buf, int maxsize); |
| 186 | |
| 187 | /** |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 188 | * bootmeth_check() - check if a bootmeth supports this bootflow |
| 189 | * |
| 190 | * This is optional. If not provided, the bootdev is assumed to be |
| 191 | * supported |
| 192 | * |
| 193 | * The bootmeth can check the bootdev (e.g. to make sure it is a |
| 194 | * network device) or the partition information. The following fields |
| 195 | * in @iter are available: |
| 196 | * |
| 197 | * name, dev, state, part |
| 198 | * max_part may be set if part != 0 (i.e. there is a valid partition |
| 199 | * table). Otherwise max_part is 0 |
| 200 | * method is available but is the same as @dev |
| 201 | * the partition has not yet been read, nor has the filesystem been |
| 202 | * checked |
| 203 | * |
| 204 | * It may update only the flags in @iter |
| 205 | * |
| 206 | * @dev: Bootmethod device to check against |
| 207 | * @iter: On entry, provides bootdev, hwpart, part |
| 208 | * Return: 0 if OK, -ENOTSUPP if this bootdev is not supported |
| 209 | */ |
| 210 | int bootmeth_check(struct udevice *dev, struct bootflow_iter *iter); |
| 211 | |
| 212 | /** |
| 213 | * bootmeth_read_bootflow() - set up a bootflow for a device |
| 214 | * |
| 215 | * @dev: Bootmethod device to check |
| 216 | * @bflow: On entry, provides dev, hwpart, part and method. |
| 217 | * Returns updated bootflow if found |
| 218 | * Return: 0 if OK, -ve on error |
| 219 | */ |
| 220 | int bootmeth_read_bootflow(struct udevice *dev, struct bootflow *bflow); |
| 221 | |
| 222 | /** |
Simon Glass | a63bda6 | 2023-01-17 10:48:01 -0700 | [diff] [blame] | 223 | * bootmeth_set_bootflow() - set the bootflow for a device |
| 224 | * |
| 225 | * This provides a bootflow file to the bootmeth, to see if it is valid. |
| 226 | * If it is, the bootflow is set up accordingly. |
| 227 | * |
| 228 | * @dev: Bootmethod device to use |
| 229 | * @bflow: On entry, provides bootdev. |
| 230 | * Returns updated bootflow if found |
| 231 | * @buf: Buffer containing the possible bootflow file (must be allocated |
| 232 | * by caller to @size + 1 bytes) |
| 233 | * @size: Size of file |
| 234 | * Return: 0 if OK, -ve on error |
| 235 | */ |
| 236 | int bootmeth_set_bootflow(struct udevice *dev, struct bootflow *bflow, |
| 237 | char *buf, int size); |
| 238 | |
| 239 | /** |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 240 | * bootmeth_read_file() - read a file needed for a bootflow |
| 241 | * |
| 242 | * Read a file from the same place as the bootflow came from |
| 243 | * |
| 244 | * @dev: Bootmethod device to use |
| 245 | * @bflow: Bootflow providing info on where to read from |
| 246 | * @file_path: Path to file (may be absolute or relative) |
| 247 | * @addr: Address to load file |
| 248 | * @sizep: On entry provides the maximum permitted size; on exit |
| 249 | * returns the size of the file |
| 250 | * Return: 0 if OK, -ENOSPC if the file is too large for @sizep, other |
| 251 | * -ve value if something else goes wrong |
| 252 | */ |
| 253 | int bootmeth_read_file(struct udevice *dev, struct bootflow *bflow, |
| 254 | const char *file_path, ulong addr, ulong *sizep); |
| 255 | |
| 256 | /** |
Simon Glass | 6d8f95b | 2023-08-10 19:33:18 -0600 | [diff] [blame] | 257 | * bootmeth_read_all() - read all bootflow files |
| 258 | * |
| 259 | * Some bootmeths delay reading of large files until booting is requested. This |
| 260 | * causes those files to be read. |
| 261 | * |
| 262 | * @dev: Bootmethod device to use |
| 263 | * @bflow: Bootflow to read |
| 264 | * Return: does not return on success, since it should boot the |
Mattijs Korpershoek | f2b610a | 2024-06-04 17:15:21 +0200 | [diff] [blame] | 265 | * operating system. Returns -EFAULT if that fails, other -ve on |
Simon Glass | 6d8f95b | 2023-08-10 19:33:18 -0600 | [diff] [blame] | 266 | * other error |
| 267 | */ |
| 268 | int bootmeth_read_all(struct udevice *dev, struct bootflow *bflow); |
| 269 | |
| 270 | /** |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 271 | * bootmeth_boot() - boot a bootflow |
| 272 | * |
| 273 | * @dev: Bootmethod device to boot |
| 274 | * @bflow: Bootflow to boot |
| 275 | * Return: does not return on success, since it should boot the |
Mattijs Korpershoek | f2b610a | 2024-06-04 17:15:21 +0200 | [diff] [blame] | 276 | * operating system. Returns -EFAULT if that fails, other -ve on |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 277 | * other error |
| 278 | */ |
| 279 | int bootmeth_boot(struct udevice *dev, struct bootflow *bflow); |
| 280 | |
| 281 | /** |
| 282 | * bootmeth_setup_iter_order() - Set up the ordering of bootmeths to scan |
| 283 | * |
| 284 | * This sets up the ordering information in @iter, based on the selected |
Mattijs Korpershoek | f2b610a | 2024-06-04 17:15:21 +0200 | [diff] [blame] | 285 | * ordering of the boot methods in bootstd_priv->bootmeth_order. If there is no |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 286 | * ordering there, then all bootmethods are added |
| 287 | * |
| 288 | * @iter: Iterator to update with the order |
Simon Glass | cc15e14 | 2022-07-30 15:52:27 -0600 | [diff] [blame] | 289 | * @include_global: true to add the global bootmeths, in which case they appear |
| 290 | * first |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 291 | * Return: 0 if OK, -ENOENT if no bootdevs, -ENOMEM if out of memory, other -ve |
| 292 | * on other error |
| 293 | */ |
Simon Glass | cc15e14 | 2022-07-30 15:52:27 -0600 | [diff] [blame] | 294 | int bootmeth_setup_iter_order(struct bootflow_iter *iter, bool include_global); |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 295 | |
| 296 | /** |
| 297 | * bootmeth_set_order() - Set the bootmeth order |
| 298 | * |
| 299 | * This selects the ordering to use for bootmeths |
| 300 | * |
| 301 | * @order_str: String containing the ordering. This is a comma-separate list of |
Simon Glass | b71d7f7 | 2023-05-10 16:34:46 -0600 | [diff] [blame] | 302 | * bootmeth-device names, e.g. "extlinux,efi". If empty then a default ordering |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 303 | * is used, based on the sequence number of devices (i.e. using aliases) |
| 304 | * Return: 0 if OK, -ENODEV if an unknown bootmeth is mentioned, -ENOMEM if |
| 305 | * out of memory, -ENOENT if there are no bootmeth devices |
| 306 | */ |
| 307 | int bootmeth_set_order(const char *order_str); |
| 308 | |
| 309 | /** |
Martyn Welch | 93a0d16 | 2024-10-09 14:15:40 +0100 | [diff] [blame] | 310 | * bootmeth_set_property() - Set the bootmeth property |
| 311 | * |
| 312 | * This allows the setting of boot method specific properties to enable |
| 313 | * automated finer grain control of the boot process |
| 314 | * |
| 315 | * @name: String containing the name of the relevant boot method |
| 316 | * @property: String containing the name of the property to set |
| 317 | * @value: String containing the value to be set for the specified property |
| 318 | * Return: 0 if OK, -ENODEV if an unknown bootmeth or property is provided, |
| 319 | * -ENOENT if there are no bootmeth devices |
| 320 | */ |
| 321 | int bootmeth_set_property(const char *name, const char *property, |
| 322 | const char *value); |
| 323 | |
| 324 | /** |
Simon Glass | f41c445 | 2023-07-26 21:01:21 -0600 | [diff] [blame] | 325 | * bootmeth_setup_fs() - Set up read to read a file |
| 326 | * |
| 327 | * We must redo the setup before each filesystem operation. This function |
| 328 | * handles that, including setting the filesystem type if a block device is not |
| 329 | * being used |
| 330 | * |
| 331 | * @bflow: Information about file to try |
| 332 | * @desc: Block descriptor to read from (NULL if not a block device) |
| 333 | * Return: 0 if OK, -ve on error |
| 334 | */ |
| 335 | int bootmeth_setup_fs(struct bootflow *bflow, struct blk_desc *desc); |
| 336 | |
| 337 | /** |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 338 | * bootmeth_try_file() - See we can access a given file |
| 339 | * |
| 340 | * Check for a file with a given name. If found, the filename is allocated in |
| 341 | * @bflow |
| 342 | * |
| 343 | * Sets the state to BOOTFLOWST_FILE on success. It also calls |
| 344 | * fs_set_blk_dev_with_part() so that this does not need to be done by the |
| 345 | * caller before reading the file. |
| 346 | * |
| 347 | * @bflow: Information about file to try |
Simon Glass | 4adeeb8 | 2023-01-17 10:47:59 -0700 | [diff] [blame] | 348 | * @desc: Block descriptor to read from (NULL for sandbox host) |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 349 | * @prefix: Filename prefix to prepend to @fname (NULL for none) |
| 350 | * @fname: Filename to read |
| 351 | * Return: 0 if OK, -ENOMEM if not enough memory to allocate bflow->fname, |
| 352 | * other -ve value on other error |
| 353 | */ |
| 354 | int bootmeth_try_file(struct bootflow *bflow, struct blk_desc *desc, |
| 355 | const char *prefix, const char *fname); |
| 356 | |
| 357 | /** |
| 358 | * bootmeth_alloc_file() - Allocate and read a bootflow file |
| 359 | * |
| 360 | * Allocates memory for a bootflow file and reads it in. Sets the state to |
| 361 | * BOOTFLOWST_READY on success |
| 362 | * |
| 363 | * Note that fs_set_blk_dev_with_part() must have been called previously. |
| 364 | * |
| 365 | * @bflow: Information about file to read |
| 366 | * @size_limit: Maximum file size to permit |
| 367 | * @align: Allocation alignment (1 for unaligned) |
| 368 | * Return: 0 if OK, -E2BIG if file is too large, -ENOMEM if out of memory, |
| 369 | * other -ve on other error |
| 370 | */ |
| 371 | int bootmeth_alloc_file(struct bootflow *bflow, uint size_limit, uint align); |
| 372 | |
| 373 | /** |
Simon Glass | 612b9cc | 2023-01-06 08:52:34 -0600 | [diff] [blame] | 374 | * bootmeth_alloc_other() - Allocate and read a file for a bootflow |
| 375 | * |
| 376 | * This reads an arbitrary file in the same directory as the bootflow, |
| 377 | * allocating memory for it. The buffer is one byte larger than the file length, |
| 378 | * so that it can be nul-terminated. |
| 379 | * |
| 380 | * @bflow: Information about file to read |
| 381 | * @fname: Filename to read from (within bootflow->subdir) |
| 382 | * @bufp: Returns a pointer to the allocated buffer |
| 383 | * @sizep: Returns the size of the buffer |
| 384 | * Return: 0 if OK, -ENOMEM if out of memory, other -ve on other error |
| 385 | */ |
| 386 | int bootmeth_alloc_other(struct bootflow *bflow, const char *fname, |
| 387 | void **bufp, uint *sizep); |
| 388 | |
| 389 | /** |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 390 | * bootmeth_common_read_file() - Common handler for reading a file |
| 391 | * |
| 392 | * Reads a named file from the same location as the bootflow file. |
| 393 | * |
| 394 | * @dev: bootmeth device to read from |
| 395 | * @bflow: Bootflow information |
| 396 | * @file_path: Path to file |
| 397 | * @addr: Address to load file to |
| 398 | * @sizep: On entry, the maximum file size to accept, on exit the actual file |
| 399 | * size read |
| 400 | */ |
| 401 | int bootmeth_common_read_file(struct udevice *dev, struct bootflow *bflow, |
| 402 | const char *file_path, ulong addr, ulong *sizep); |
| 403 | |
Simon Glass | 4f8633d | 2022-07-30 15:52:21 -0600 | [diff] [blame] | 404 | /** |
| 405 | * bootmeth_get_bootflow() - Get a bootflow from a global bootmeth |
| 406 | * |
| 407 | * Check the bootmeth for a bootflow which can be used. In this case the |
| 408 | * bootmeth handles all bootdev selection, etc. |
| 409 | * |
| 410 | * @dev: bootmeth device to read from |
| 411 | * @bflow: Bootflow information |
| 412 | * @return 0 on success, -ve if a bootflow could not be found or had an error |
| 413 | */ |
| 414 | int bootmeth_get_bootflow(struct udevice *dev, struct bootflow *bflow); |
| 415 | |
Simon Glass | 4b508b8 | 2022-04-24 23:31:08 -0600 | [diff] [blame] | 416 | #endif |