diff options
author | Tom Rini <trini@ti.com> | 2013-06-28 11:38:02 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-06-28 16:24:13 -0400 |
commit | d366438d8ac80fd10110dceda9f4792f4a16ac9d (patch) | |
tree | 8c7824cd287e5a9f8978e20aeb36212c38f7746d /include/sed156x.h | |
parent | 20cb5fbec649ea3f4baaa7eab1ad77e9d7dfdca5 (diff) | |
download | u-boot-imx-d366438d8ac80fd10110dceda9f4792f4a16ac9d.zip u-boot-imx-d366438d8ac80fd10110dceda9f4792f4a16ac9d.tar.gz u-boot-imx-d366438d8ac80fd10110dceda9f4792f4a16ac9d.tar.bz2 |
cmd_bootm.c: Correct BOOTM_ERR_OVERLAP handling
With 35fc84fa1 [Refactor the bootm command to reduce code duplication]
we stopped checking the return value of bootm_load_os (unintentionally!)
and simply returned if we had a non-zero return value from the function.
This broke the valid case of a legacy image file of a single kernel
loaded into an overlapping memory area (the default way of booting
nearly all TI platforms).
The best way to fix this problem in the new code is to make
bootm_load_os be the one to see if we have a problem with this, and if
it's fatal return BOOTM_ERR_RESET and if it's not BOOTM_ERR_OVERLAP, so
that we can avoid calling lmb_reserve() but continue with booting. We
however still need to handle the other BOOTM_ERR values so re-work
do_bootm_states so that we have an error handler at the bottom we can
goto for problems from bootm_load_os, or problems from the other callers
(as the code was before). Add a comment to do_bootm_states noting the
existing restriction on negative return values.
Signed-off-by: Tom Rini <trini@ti.com>
---
Changes in v2:
- Rework so that only bootm_load_os and boot_selected_os head down into
the err case code, and other errors simply return back to the caller.
Fixes 'spl export'.
Diffstat (limited to 'include/sed156x.h')
0 files changed, 0 insertions, 0 deletions