Skip to content

Commit fdf241d

Browse files
committed
Addressed reviewer's comments.
1 parent 22fbc78 commit fdf241d

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

include/image.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,10 @@ static void __attribute__((noinline)) wolfBoot_image_clear_signature_ok(
613613
"b end_check\n" \
614614
"ver_panic:\n" \
615615
"b .\n" \
616+
"b .\n" \
617+
"b .\n" \
618+
"b .\n" \
619+
"b .\n" \
616620
"end_check:\n" \
617621
"pop {r4, r5, r6, r7}\n" \
618622
: \
@@ -639,16 +643,20 @@ static void __attribute__((noinline)) wolfBoot_image_clear_signature_ok(
639643
"mov r0, %0\n" \
640644
"mov r4, %0\n" \
641645
"cmp r0, #0\n" \
646+
"bne 6f\n" \
642647
"beq 4f\n" \
648+
"6:\n" \
643649
"cmp r0, #1\n" \
650+
"bne 4f\n" \
644651
"beq 4f\n" \
645-
"bkpt 0xE1\n" \
646652
"4:\n" \
647653
"cmp r4, #0\n" \
654+
"bne 7f\n" \
648655
"beq 5f\n" \
656+
"7:\n" \
649657
"cmp r4, #1\n" \
658+
"bne 5f\n" \
650659
"beq 5f\n" \
651-
"bkpt 0xE1\n" \
652660
"5:\n" \
653661
"cmp r0, #1\n" \
654662
"bne 1f\n" \
@@ -718,6 +726,10 @@ static void __attribute__((noinline)) wolfBoot_image_clear_signature_ok(
718726
"b 2f\n" \
719727
"3:\n" \
720728
"b .\n" \
729+
"b .\n" \
730+
"b .\n" \
731+
"b .\n" \
732+
"b .\n" \
721733
"2:\n" \
722734
"pop {r4, r5, r6, r7}\n" \
723735
: /* No output operands */ \

src/update_flash.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ static int RAMFUNCTION wolfBoot_update(int fallback_allowed)
687687
#endif
688688
int fallback_image = 0;
689689
#ifndef DISABLE_BACKUP
690-
int rollback = 0;
690+
int rollback_needed = 0;
691691
int bootStateRet = -1;
692692
uint8_t bootState = 0;
693693
#endif
@@ -757,7 +757,7 @@ static int RAMFUNCTION wolfBoot_update(int fallback_allowed)
757757
bootStateRet = wolfBoot_get_partition_state(PART_BOOT, &bootState);
758758
if ((bootStateRet == 0) && (bootState == IMG_STATE_TESTING) &&
759759
(fallback_allowed != 0) && (cur_ver >= upd_ver)) {
760-
rollback = 1;
760+
rollback_needed = 1;
761761
}
762762
#endif
763763

@@ -987,7 +987,7 @@ static int RAMFUNCTION wolfBoot_update(int fallback_allowed)
987987
* wolfBoot_start */
988988
wolfBoot_swap_and_final_erase(0);
989989
#ifndef DISABLE_BACKUP
990-
if (rollback) {
990+
if (rollback_needed) {
991991
hal_flash_unlock();
992992
#ifdef EXT_FLASH
993993
ext_flash_unlock();

0 commit comments

Comments
 (0)