diff options
Diffstat (limited to 'src/soc/nvidia')
-rw-r--r-- | src/soc/nvidia/tegra124/verstage.c | 19 | ||||
-rw-r--r-- | src/soc/nvidia/tegra132/verstage.c | 17 |
2 files changed, 30 insertions, 6 deletions
diff --git a/src/soc/nvidia/tegra124/verstage.c b/src/soc/nvidia/tegra124/verstage.c index 80324232a8..2d7a9530b6 100644 --- a/src/soc/nvidia/tegra124/verstage.c +++ b/src/soc/nvidia/tegra124/verstage.c @@ -19,6 +19,8 @@ #include <arch/cache.h> #include <arch/exception.h> +#include <arch/hlt.h> +#include <arch/stages.h> #include <console/console.h> #include <soc/cache.h> #include <soc/early_configs.h> @@ -47,12 +49,23 @@ static void soc_init(void) enable_cache(); } +static void verstage(void) +{ + void *entry; + + soc_init(); + early_mainboard_init(); + + entry = vboot2_verify_firmware(); + if (entry != (void *)-1) + stage_exit(entry); +} + void main(void) { asm volatile ("bl arm_init_caches" : : : "r0", "r1", "r2", "r3", "r4", "r5", "ip"); - soc_init(); - early_mainboard_init(); - vboot2_verify_firmware(); + verstage(); + hlt(); } diff --git a/src/soc/nvidia/tegra132/verstage.c b/src/soc/nvidia/tegra132/verstage.c index ba3e18393a..e629eedc27 100644 --- a/src/soc/nvidia/tegra132/verstage.c +++ b/src/soc/nvidia/tegra132/verstage.c @@ -19,6 +19,8 @@ #include <arch/cache.h> #include <arch/exception.h> +#include <arch/hlt.h> +#include <arch/stages.h> #include <console/console.h> #include <soc/verstage.h> #include <vendorcode/google/chromeos/chromeos.h> @@ -28,12 +30,21 @@ void __attribute__((weak)) verstage_mainboard_init(void) /* Default empty implementation. */ } -void main(void) +static void verstage(void) { + void *entry; + console_init(); exception_init(); - verstage_mainboard_init(); - vboot2_verify_firmware(); + entry = vboot2_verify_firmware(); + if (entry != (void *)-1) + stage_exit(entry); +} + +void main(void) +{ + verstage(); + hlt(); } |