Skip to content

Commit 639e0c4

Browse files
committed
Improve rom_pick_ab_update_partition description
1 parent 7ba5fa9 commit 639e0c4

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
@@ -1049,9 +1049,15 @@ int rom_add_flash_runtime_partition(uint32_t start_offset, uint32_t size, uint32
10491049
/*! \brief Pick A/B partition for a separate partition
10501050
* \ingroup pico_bootrom
10511051
*
1052-
* This will perform extra checks to prevent disrupting a main image TBYB, and return errors
1052+
* 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.
1053+
* It requires the same minimum workarea size as `rom_pick_ab_partition`.
10531054
*
1054-
* Also checks that the chosen partition contained a valid image
1055+
* 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
1056+
* 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
1057+
* 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).
1058+
*
1059+
* 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`
1060+
* if it does not.
10551061
*
10561062
* \param workarea_base base address of work area
10571063
* \param workarea_size size of work area

0 commit comments

Comments
 (0)