Skip to content

Commit 0511287

Browse files
committed
Improve rom_pick_ab_update_partition description
1 parent 3e84228 commit 0511287

File tree

1 file changed

+8
-2
lines changed
  • src/rp2_common/pico_bootrom/include/pico

1 file changed

+8
-2
lines changed

src/rp2_common/pico_bootrom/include/pico/bootrom.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,9 +1074,15 @@ int rom_add_flash_runtime_partition(uint32_t start_offset, uint32_t size, uint32
10741074
/*! \brief Pick A/B partition for a separate partition
10751075
* \ingroup pico_bootrom
10761076
*
1077-
* This will perform extra checks to prevent disrupting a main image TBYB, and return errors
1077+
* This will call `rom_pick_ab_partition` with the current `flash_update_boot_window_base`, while performing extra checks to prevent disrupting a main image TBYB.
1078+
* It requires the same minimum workarea size as `rom_pick_ab_partition`.
10781079
*
1079-
* Also checks that the chosen partition contained a valid image
1080+
* For example, if an `explicit_buy` is pending then calling `pick_ab_partition` would normally clear the saved `flash_erase_addr` so the required erase would not
1081+
* occur when `explicit_buy` is called - this function saves and restores that address to prevent this issue, and returns `BOOTROM_ERROR_NOT_PERMITTED` if the
1082+
* partition chosen by `pick_ab_partition` also requires a flash erase version downgrade (as you can't erase 2 partitions with one `explicit_buy` call).
1083+
*
1084+
* It also checks that the chosen partition contained a valid image (eg a signed image when using secure boot), and returns `BOOTROM_ERROR_NOT_FOUND`
1085+
* if it does not.
10801086
*
10811087
* \param workarea_base base address of work area
10821088
* \param workarea_size size of work area

0 commit comments

Comments
 (0)