Commit 2fe449d1 authored by Francesco Servidio's avatar Francesco Servidio Committed by David Brown
Browse files

doc: Fixed notes formatting

Fixed the style used to format notes.

Signed-off-by: default avatarFrancesco Servidio <francesco.servidio@nordicsemi.no>
parent 5bc98327
Loading
Loading
Loading
Loading
+6 −1
Changes for docs/PORTING.md: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -168,7 +168,12 @@ int flash_area_id_from_multi_image_slot(int image_index, int slot);
int     flash_area_id_to_multi_image_slot(int image_index, int area_id);
```

**Note:** As of writing, it is possible that MCUboot will open a flash area multiple times simultaneously (through nested calls to `flash_area_open`). As a result, MCUboot may call `flash_area_close` on a flash area that is still opened by another part of MCUboot. As a workaround when porting, it may be necessary to implement a counter of the number of times a given flash area has been opened by MCUboot. The `flash_area_close` implementation should only fully deinitialize the underlying flash area when the open counter is decremented to 0. See [this GitHub PR](https://github.com/mcu-tools/mcuboot/pull/894/) for a more detailed discussion.
---
***Note***

*As of writing, it is possible that MCUboot will open a flash area multiple times simultaneously (through nested calls to `flash_area_open`). As a result, MCUboot may call `flash_area_close` on a flash area that is still opened by another part of MCUboot. As a workaround when porting, it may be necessary to implement a counter of the number of times a given flash area has been opened by MCUboot. The `flash_area_close` implementation should only fully deinitialize the underlying flash area when the open counter is decremented to 0. See [this GitHub PR](https://github.com/mcu-tools/mcuboot/pull/894/) for a more detailed discussion.*

---

## Memory management for Mbed TLS

+55 −22
Changes for docs/design.md: 55 added lines, 22 removed lines.
Original line number Diff line number Diff line
@@ -417,10 +417,15 @@ image trailer. An image trailer has the following structure:
The offset immediately following such a record represents the start of the next
flash area.

Note: "min-write-size" is a property of the flash hardware.  If the hardware
allows individual bytes to be written at arbitrary addresses, then
min-write-size is 1.  If the hardware only allows writes at even addresses,
then min-write-size is 2, and so on.
---
***Note***

*"min-write-size" is a property of the flash hardware.  If the hardware*
*allows individual bytes to be written at arbitrary addresses, then*
*min-write-size is 1.  If the hardware only allows writes at even addresses,*
*then min-write-size is 2, and so on.*

---

An image trailer contains the following fields:

@@ -507,9 +512,14 @@ it is difficult to get a sense of the state of the device just by looking at the
image trailers.  It is better to map all the possible trailer states to the swap
types described above via a set of tables.  These tables are reproduced below.

Note: An important caveat about the tables described below is that they must
be evaluated in the order presented here. Lower state numbers must have a
higher priority when testing the image trailers.
---
***Note***

*An important caveat about the tables described below is that they must*
*be evaluated in the order presented here. Lower state numbers must have a*
*higher priority when testing the image trailers.*

---

```
    State I
@@ -571,11 +581,16 @@ fatal error occurs during boot, the result is `BOOT_SWAP_TYPE_PANIC`. If the
result is either `BOOT_SWAP_TYPE_FAIL` or `BOOT_SWAP_TYPE_PANIC`, MCUboot hangs
rather than booting an invalid or compromised image.

Note: An important caveat to the above is the result when a swap is requested
      and the image in the secondary slot fails to validate, due to a hashing or
      signing error. This state behaves as State IV with the extra action of
      marking the image in the primary slot as "OK", to prevent further attempts
      to swap.
---
***Note***

*An important caveat to the above is the result when a swap is requested*
*and the image in the secondary slot fails to validate, due to a hashing or*
*signing error. This state behaves as State IV with the extra action of*
*marking the image in the primary slot as "OK", to prevent further attempts*
*to swap.*

---

### [Resumed swaps](#resumed-swaps)

@@ -798,13 +813,21 @@ trailer can be written by the user at a later time. With the image trailer
unwritten, the user can test the image in the secondary slot
(i.e., transition to state I).

Note1: If the region being copied contains the last sector, then swap status is
temporarily maintained on scratch for the duration of this operation, always
using the primary slot's area otherwise.
---
***Note***

*If the region being copied contains the last sector, then swap status is*
*temporarily maintained on scratch for the duration of this operation, always*
*using the primary slot's area otherwise.*

Note2: The bootloader tries to copy only used sectors (based on largest image
installed on any of the slots), minimizing the amount of sectors copied and
reducing the amount of time required for a swap operation.
---
***Note***

*The bootloader tries to copy only used sectors (based on largest image*
*installed on any of the slots), minimizing the amount of sectors copied and*
*reducing the amount of time required for a swap operation.*

---

The particulars of step 3 vary depending on whether an image is being tested,
permanently used, reverted or a validation failure of the secondary slot
@@ -914,8 +937,13 @@ in the middle of the region. For example, if a slot uses 64 sectors, the first
sector index that gets swapped is 63, which corresponds to the exact halfway
point within the region.

Note: since the scratch area only ever needs to record swapping of the last
sector, it uses at most min-write-size * 3 bytes for its own status area.
---
***Note***

*Since the scratch area only ever needs to record swapping of the last*
*sector, it uses at most min-write-size * 3 bytes for its own status area.*

---

## [Reset recovery](#reset-recovery)

@@ -1024,8 +1052,13 @@ producing signed images, see: [signed_images](signed_images.md).
If you want to enable and use encrypted images, see:
[encrypted_images](encrypted_images.md).

Note: Image encryption is not supported when the direct-xip upgrade strategy
is selected.
---
***Note***

*Image encryption is not supported when the direct-xip upgrade strategy*
*is selected.*

---

### [Using hardware keys for verification](#hw-key-support)

+7 −2
Changes for docs/encrypted_images.md: 7 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -132,8 +132,13 @@ presence of the `ENCRYPTED` flag and the key TLV. If those are present the
sectors are re-encrypted when copying from the `primary slot` to
the `secondary slot`.

PS: Each encrypted image must have its own key TLV that should be unique
and used only for this particular image.
---
***Note***

*Each encrypted image must have its own key TLV that should be unique*
*and used only for this particular image.*

---

Also when swap method is employed, the sizes of both images are saved to
the status area just before starting the upgrade process, because it
+6 −1
Changes for docs/readme-espressif.md: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -46,7 +46,12 @@ cd ../..

The MCUboot Espressif port bootloader is built using the toolchain and tools provided by ESP-IDF. Additional configuration related to MCUboot features and slot partitioning may be made using the `bootloader.conf`.

**Note:** Replace `<target>` with the target ESP32 family (like `esp32`, `esp32s2` and others).
---
***Note***

*Replace `<target>` with the target ESP32 family (like `esp32`, `esp32s2` and others).*

---

1. Compile and generate the ELF:

+7 −2
Changes for docs/testplan-mynewt.md: 7 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -22,11 +22,16 @@ Build and load good image in slot 0:
* `newt create-image k64f_blinky 1.0.1 key_<sign-algo>.pem`
* `newt load k64f_blinky`

NOTE: If testing RSA/PSS `newt create-image` needs to be passed in the extra
flag `--rsa-pss` eg:
---
***Note***

*If testing RSA/PSS `newt create-image` needs to be passed in the extra*
*flag `--rsa-pss` eg:*

`newt create-image k64f_blinky 1.0.1 key_rsa.pem --rsa-pss`

---

Build and load image in slot 1 with no signing, signed with
key_<sign-algo>_2.pem and signed with key_<sign-algo>.pem. Mark each one as
test image and check that swap only happens for image signed with