@@ -672,39 +672,49 @@ types described above via a set of tables. These tables are reproduced below.
672
672
---
673
673
674
674
```
675
- State I (swap using offset only)
675
+ State I (swap using offset and swap using move only)
676
676
| primary slot | secondary slot |
677
677
-----------------+--------------+----------------|
678
- magic | Any | Good |
678
+ magic | Not good | Good |
679
679
image-ok | Any | Unset |
680
680
copy-done | Any | Set |
681
681
-----------------+--------------+----------------'
682
682
result: BOOT_SWAP_TYPE_REVERT |
683
683
-------------------------------------------------'
684
684
685
- State II
685
+ State II (swap using offset and swap using move only)
686
+ | primary slot | secondary slot |
687
+ -----------------+--------------+----------------|
688
+ magic | Good | Good |
689
+ image-ok | Unset | Unset |
690
+ copy-done | Any | Set |
691
+ -----------------+--------------+----------------'
692
+ result: BOOT_SWAP_TYPE_REVERT |
693
+ -------------------------------------------------'
694
+
695
+ State III
686
696
| primary slot | secondary slot |
687
697
-----------------+--------------+----------------|
688
698
magic | Any | Good |
689
699
image-ok | Any | Unset |
690
- copy-done | Any | Any |
700
+ copy-done | Any | Unset |
691
701
-----------------+--------------+----------------'
692
702
result: BOOT_SWAP_TYPE_TEST |
693
703
-------------------------------------------------'
694
704
695
705
696
- State III
706
+ State IV
697
707
| primary slot | secondary slot |
698
708
-----------------+--------------+----------------|
699
709
magic | Any | Good |
700
710
image-ok | Any | 0x01 |
701
- copy-done | Any | Any |
711
+ copy-done | Any | Unset |
702
712
-----------------+--------------+----------------'
703
713
result: BOOT_SWAP_TYPE_PERM |
704
714
-------------------------------------------------'
705
715
706
716
707
- State IV
717
+ State V
708
718
| primary slot | secondary slot |
709
719
-----------------+--------------+----------------|
710
720
magic | Good | Any |
@@ -715,13 +725,13 @@ types described above via a set of tables. These tables are reproduced below.
715
725
-------------------------------------------------'
716
726
```
717
727
718
- Any of the above three states results in MCUboot attempting to swap images.
728
+ Any of the above five states results in MCUboot attempting to swap images.
719
729
720
730
Otherwise, MCUboot does not attempt to swap images, resulting in one of the
721
- other three swap types, as illustrated by State IV .
731
+ other three swap types, as illustrated by State VI .
722
732
723
733
```
724
- State V
734
+ State VI
725
735
| primary slot | secondary slot |
726
736
-----------------+--------------+----------------|
727
737
magic | Any | Any |
@@ -734,7 +744,7 @@ other three swap types, as illustrated by State IV.
734
744
-------------------------------------------------'
735
745
```
736
746
737
- In State V , when no errors occur, MCUboot will attempt to boot the contents of
747
+ In State VI , when no errors occur, MCUboot will attempt to boot the contents of
738
748
the primary slot directly, and the result is ` BOOT_SWAP_TYPE_NONE ` . If the image
739
749
in the primary slot is not valid, the result is ` BOOT_SWAP_TYPE_FAIL ` . If a
740
750
fatal error occurs during boot, the result is ` BOOT_SWAP_TYPE_PANIC ` . If the
@@ -746,7 +756,7 @@ rather than booting an invalid or compromised image.
746
756
747
757
* An important caveat to the above is the result when a swap is requested*
748
758
* and the image in the secondary slot fails to validate, due to a hashing or*
749
- * signing error. This state behaves as State IV with the extra action of*
759
+ * signing error. This state behaves as State VI with the extra action of*
750
760
* marking the image in the primary slot as "OK", to prevent further attempts*
751
761
* to swap.*
752
762
0 commit comments