Home
last modified time | relevance | path

Searched hist:"32 ba8952cb449f8b151c4c1a27b9e9c3b4995dee" (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/include/
H A Dspl.h32ba8952cb449f8b151c4c1a27b9e9c3b4995dee Wed May 13 13:02:24 UTC 2015 Simon Glass <sjg@chromium.org> arm: spl: Add an API to detect when U-Boot is started from SPL

For secure boot systems it is common to have a read-only U-Boot which starts
the machine and jumps to a read-write U-Boot for actual booting the OS. This
allows the read-write U-Boot to be upgraded without risk of permanently
bricking the machine. In the event that the read-write U-Boot is corrupted,
the read-only U-Boot can detect this with a checksum and boot into a
recovery flow.

To support this, add a way to detect when U-Boot is run from SPL as opposed
to some other method, such as booted directly (no SPL) or started from
another source (e.g. a primary U-Boot). This works by putting a special value
in r0.

For now we rely on board-specific code to actually check the register and
set a flag. At some point this could be generalised, perhaps by using a spare
register and passing a flag to _main and/or board_init_f().

This commit does not implement any feature, but merely provides the API for
boards to implement.

Signed-off-by: Simon Glass <sjg@chromium.org>