Skip to content

Commit

Permalink
add powerfail during final sector erase, exposing
Browse files Browse the repository at this point in the history
the problems of losing the encryption key when the power fails before the key can be written back, failing to select the correct NVM_FLASH_WRITEONCE sector when a sector is corrupt, and losing the testing state when the power fails before the partition state can be set. these issues are addressed in the next commit
  • Loading branch information
jpbland1 committed Aug 23, 2023
1 parent ee628f1 commit 6bde683
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/scripts/sim-update-powerfail-resume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ fi
./wolfboot.elf powerfail 15000 get_version 2>/dev/null
./wolfboot.elf powerfail 18000 get_version 2>/dev/null
./wolfboot.elf powerfail 1a000 get_version 2>/dev/null
# fail on the last sector to stop the encrypt key save and state update
./wolfboot.elf powerfail 3e000 get_version 2>/dev/null
./wolfboot.elf powerfail 3f000 get_version 2>/dev/null

V=`./wolfboot.elf get_version 2>/dev/null`
if [ "x$V" != "x2" ]; then
Expand All @@ -20,6 +23,8 @@ fi
./wolfboot.elf powerfail 11000 get_version 2>/dev/null
./wolfboot.elf powerfail 14000 get_version 2>/dev/null
./wolfboot.elf powerfail 1e000 get_version 2>/dev/null
./wolfboot.elf powerfail 3e000 get_version 2>/dev/null
./wolfboot.elf powerfail 3f000 get_version 2>/dev/null

V=`./wolfboot.elf get_version 2>/dev/null`
if [ "x$V" != "x1" ]; then
Expand Down

0 comments on commit 6bde683

Please sign in to comment.