summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/google/chromeos/vboot2/verstage.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/vendorcode/google/chromeos/vboot2/verstage.c b/src/vendorcode/google/chromeos/vboot2/verstage.c
index 88c18f6de3..289b93fefc 100644
--- a/src/vendorcode/google/chromeos/vboot2/verstage.c
+++ b/src/vendorcode/google/chromeos/vboot2/verstage.c
@@ -18,6 +18,7 @@
*/
#include <antirollback.h>
+#include <arch/exception.h>
#include <console/console.h>
#include <console/vtxprintf.h>
#include <string.h>
@@ -166,11 +167,7 @@ static void save_if_needed(struct vb2_context *ctx)
* TODO: Avoid loading a stage twice (once in hash_body & again in load_stage).
* when per-stage verification is ready.
*/
-#if CONFIG_RETURN_FROM_VERSTAGE
-void main(void)
-#else
void verstage_main(void)
-#endif /* CONFIG_RETURN_FROM_VERSTAGE */
{
struct vb2_context ctx;
struct vboot_region fw_main;
@@ -249,3 +246,12 @@ void verstage_main(void)
printk(BIOS_INFO, "Slot %c is selected\n", is_slot_a(&ctx) ? 'A' : 'B');
vb2_set_selected_region(wd, &fw_main);
}
+
+#if IS_ENABLED(CONFIG_RETURN_FROM_VERSTAGE)
+void main(void)
+{
+ console_init();
+ exception_init();
+ verstage_main();
+}
+#endif