@@ -345,7 +345,7 @@ image. After a successful validation of the selected image the bootloader
345
345
chain-loads it.
346
346
347
347
An additional "revert" mechanism is also supported. For more information, please
348
- read the [ corresponding section] ( #direct-xip-revert ) .
348
+ read the [ corresponding section] ( #direct-xip-ram-load- revert ) .
349
349
Handling the primary and secondary slots as equals has its drawbacks. Since the
350
350
images are not moved between the slots, the on-the-fly image
351
351
encryption/decryption can't be supported (it only applies to storing the image
@@ -400,6 +400,11 @@ happens as described above. If the image is encrypted, it is copied in RAM at
400
400
the provided address and then decrypted. Finally, the decrypted image is
401
401
authenticated in RAM and executed.
402
402
403
+ Similar to direct-xip, ram-load mode also supports a "revert" mechanism.
404
+ This mechanism works in the same manner as the direct-xip revert mechanism does,
405
+ so please see the [corresponding section](#direct-xip-ram-load-revert) for
406
+ more details.
407
+
403
408
## [Boot swap types](#boot-swap-types)
404
409
405
410
When the device first boots under normal circumstances, there is an up-to-date
@@ -455,19 +460,22 @@ The "swap type" is a high-level representation of the outcome of the
455
460
boot. Subsequent sections describe how MCUboot determines the swap type from
456
461
the bit-level contents of flash.
457
462
458
- ### [Revert mechanism in direct-xip mode](#direct-xip-revert)
459
-
460
- The direct-xip mode also supports a "revert" mechanism which is the equivalent
461
- of the swap mode's "revert" swap. When the direct-xip mode is selected it can be
462
- enabled with the MCUBOOT_DIRECT_XIP_REVERT config option and an image trailer
463
- must also be added to the signed images (the "--pad" option of the `imgtool`
464
- script must be used). For more information on this please read the
465
- [Image Trailer](#image-trailer) section and the [imgtool](imgtool.md)
466
- documentation. Making the images permanent (marking them as confirmed in
467
- advance) is also supported just like in swap mode. The individual steps of the
468
- direct-xip mode's "revert" mechanism are the following:
469
-
470
- 1. Select the slot which holds the newest potential image.
463
+ ### [Revert mechanism in direct-xip and ram-load mode](#direct-xip-ram-load-revert)
464
+
465
+ The direct-xip and ram-load modes also support a "revert" mechanism which is the
466
+ equivalent of the swap mode's "revert" swap. When the direct-xip mode is
467
+ selected it can be enabled with the `MCUBOOT_DIRECT_XIP_REVERT` config option.
468
+ In ram-load mode, the feature is enabled with `MCUBOOT_RAM_LOAD_REVERT` config
469
+ option. Note that an image trailer must also be added to the signed images (the
470
+ "--pad" option of the `imgtool` script must be used). Otherwise, MCUboot will
471
+ not recognize the image as valid and will attempt to revert it. For more
472
+ information on this please read the [Image Trailer](#image-trailer) section and
473
+ the [imgtool](imgtool.md) documentation. Making the images permanent (marking
474
+ them as confirmed in advance) is also supported just like in swap mode. The
475
+ individual steps of this "revert" mechanism are the following:
476
+
477
+ 1. Select the slot which holds the newest potential image, based on the
478
+ version number
471
479
2. Was the image previously selected to run (during a previous boot)?
472
480
+ Yes: Did the image mark itself "OK" (was the self-test successful)?
473
481
+ Yes.
0 commit comments