diff options
author | Peter Crosthwaite <crosthwaitepeter@gmail.com> | 2015-11-03 13:49:41 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-11-03 13:49:41 +0000 |
commit | 10b8ec73e610e017ac2fbaf486fce21eec7061b2 (patch) | |
tree | a756d9ae58f280c373c34dd9db49e07db1560925 /include/hw/arm/arm.h | |
parent | 84e59397797ff2040439058b689adbfef608b879 (diff) |
arm: boot: Add board specific setup code API
Add an API for boards to inject their own preboot software (or
firmware) sequence.
The software then returns to the bootloader via the link register. This
allows boards to do their own little bits of firmware setup without
needed to replace the bootloader completely (which is the requirement
for existing firmware support).
The blob is loaded by a callback if and only if doing a linux boot
(similar to the existing write_secondary support).
Rewrite the comment for the primary boot blob.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Message-id: 070295644c6ac84696d743913296e8cfefb48c15.1446182614.git.crosthwaite.peter@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/arm/arm.h')
-rw-r--r-- | include/hw/arm/arm.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/hw/arm/arm.h b/include/hw/arm/arm.h index 4dcd4f9b63..9217b70eb1 100644 --- a/include/hw/arm/arm.h +++ b/include/hw/arm/arm.h @@ -87,6 +87,16 @@ struct arm_boot_info { * -pflash. It also implies that fw_cfg_find() will succeed. */ bool firmware_loaded; + + /* Address at which board specific loader/setup code exists. If enabled, + * this code-blob will run before anything else. It must return to the + * caller via the link register. There is no stack set up. Enabled by + * defining write_board_setup, which is responsible for loading the blob + * to the specified address. + */ + hwaddr board_setup_addr; + void (*write_board_setup)(ARMCPU *cpu, + const struct arm_boot_info *info); }; /** |