mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
vexpress: Check TC2 firmware support before defaulting to nonsec booting
The firmware on TC2 needs to be configured appropriately before booting in nonsec mode will work as expected, so test for this and fall back to sec mode if required. Signed-off-by: Jon Medhurst <tixy@linaro.org> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
This commit is contained in:
parent
0fcb9f07a1
commit
f225d39d30
3 changed files with 44 additions and 5 deletions
|
@ -248,15 +248,20 @@ static void boot_prep_linux(bootm_headers_t *images)
|
|||
}
|
||||
}
|
||||
|
||||
__weak bool armv7_boot_nonsec_default(void)
|
||||
{
|
||||
#ifdef CONFIG_ARMV7_BOOT_SEC_DEFAULT
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARMV7_NONSEC
|
||||
bool armv7_boot_nonsec(void)
|
||||
{
|
||||
char *s = getenv("bootm_boot_mode");
|
||||
#ifdef CONFIG_ARMV7_BOOT_SEC_DEFAULT
|
||||
bool nonsec = false;
|
||||
#else
|
||||
bool nonsec = true;
|
||||
#endif
|
||||
bool nonsec = armv7_boot_nonsec_default();
|
||||
|
||||
if (s && !strcmp(s, "sec"))
|
||||
nonsec = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue