Skip to content

Commit 6c9a0a0

Browse files
committed
Add final sanity check in library boot path
F/2573
1 parent 6ce320e commit 6c9a0a0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

hal/library.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ void hal_prepare_boot(void)
8383
return;
8484
}
8585

86+
static void wolfBoot_panic(void)
87+
{
88+
wolfBoot_printf("wolfBoot: PANIC!\n");
89+
exit('P');
90+
}
91+
8692
int do_boot(uint32_t* v)
8793
{
8894
wolfBoot_printf("booting %p"
@@ -143,6 +149,9 @@ int wolfBoot_start(void)
143149

144150
wolfBoot_printf("Firmware Valid\n");
145151

152+
#ifndef WOLFBOOT_SKIP_BOOT_VERIFY
153+
PART_SANITY_CHECK(&os_image);
154+
#endif
146155
do_boot((uint32_t*)os_image.fw_base);
147156

148157
exit:

0 commit comments

Comments
 (0)