diff options
author | Tom Rini <trini@konsulko.com> | 2025-02-03 16:01:44 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-02-03 16:01:44 -0600 |
commit | 3e69c75e86e1c32c8c0fd6153bcc10aa00fb3616 (patch) | |
tree | 676898552baf386cc0c4119ee4bf7edc1ba8aee0 /boot/vbe_common.c | |
parent | 752321b62530dcbd6e8b5872aff4cf761809d76b (diff) | |
parent | f1eb367d76c9b28053b3adcb6bdeb865c6eda5fd (diff) |
Merge patch series "vbe: Series part G"
Simon Glass <sjg@chromium.org> says:
This includes the VBE ABrec (A/B/recovery) implementation as well as a
number of patches needed to make it work:
- marking some code as used by SPL_RELOC
- selection of images from a FIT based on the boot phase
- removal of unwanted hash code which increases code-size too much
- a few Kconfig-related additions for VPL
Note: The goal for the next series (part H) is to enable VBE on
rk3399-generic, i.e. able to boot on multiple rk3399-based boards with
only the TPL phase being different for each board.
Link: https://lore.kernel.org/r/20250126184333.4058848-1-sjg@chromium.org/
Diffstat (limited to 'boot/vbe_common.c')
-rw-r--r-- | boot/vbe_common.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/boot/vbe_common.c b/boot/vbe_common.c index 0d51fe762c3..a86986d86e9 100644 --- a/boot/vbe_common.c +++ b/boot/vbe_common.c @@ -202,29 +202,30 @@ int vbe_read_fit(struct udevice *blk, ulong area_offset, ulong area_size, phase = IS_ENABLED(CONFIG_TPL_BUILD) ? IH_PHASE_NONE : IS_ENABLED(CONFIG_VPL_BUILD) ? IH_PHASE_SPL : IH_PHASE_U_BOOT; - /* - * Load the image from the FIT. We ignore any load-address information - * so in practice this simply locates the image in the external-data - * region and returns its address and size. Since we only loaded the FIT - * itself, only a part of the image will be present, at best. - */ - fit_uname = NULL; - fit_uname_config = NULL; log_debug("loading FIT\n"); if (xpl_phase() == PHASE_SPL && !IS_ENABLED(CONFIG_SANDBOX)) { struct spl_load_info info; spl_load_init(&info, h_vbe_load_read, desc, desc->blksz); + xpl_set_fdt_update(&info, false); xpl_set_phase(&info, IH_PHASE_U_BOOT); log_debug("doing SPL from %s blksz %lx log2blksz %x area_offset %lx + fdt_size %lx\n", blk->name, desc->blksz, desc->log2blksz, area_offset, ALIGN(size, 4)); ret = spl_load_simple_fit(image, &info, area_offset, buf); - log_debug("spl_load_abrec_fit() ret=%d\n", ret); + log_debug("spl_load_simple_fit() ret=%d\n", ret); return ret; } + /* + * Load the image from the FIT. We ignore any load-address information + * so in practice this simply locates the image in the external-data + * region and returns its address and size. Since we only loaded the FIT + * itself, only a part of the image will be present, at best. + */ + fit_uname = NULL; + fit_uname_config = NULL; ret = fit_image_load(&images, addr, &fit_uname, &fit_uname_config, IH_ARCH_DEFAULT, image_ph(phase, IH_TYPE_FIRMWARE), BOOTSTAGE_ID_FIT_SPL_START, FIT_LOAD_IGNORED, @@ -373,3 +374,8 @@ int vbe_read_fit(struct udevice *blk, ulong area_offset, ulong area_size, return 0; } + +ofnode vbe_get_node(void) +{ + return ofnode_path("/bootstd/firmware0"); +} |