You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Improve rom_pick_ab_update_partition docs
* Some review fixups
Add more `\ref`s and tidy up wording
* Move function docs next to rom_pick_ab_partition
* Add \return to rom_pick_ab_partition docs
* Rename rom_pick_ab_update_partition -> rom_pick_ab_partition_during_update and replace "call"
/*! \brief Pick A/B partition without disturbing any in progress Flash Update boot or TBYB boot
771
+
* \ingroup pico_bootrom
772
+
*
773
+
* This will perform the same function as \ref rom_pick_ab_partition(), using the `flash_update_boot_window_base` from the current boot, while performing
774
+
* extra checks to prevent disrupting a main image TBYB boot. It requires the same minimum workarea size as \ref rom_pick_ab_partition().
775
+
*
776
+
* This should be used instead of \ref rom_pick_ab_partition() when performing a Flash Update Boot before calling \ref rom_explicit_buy(), and can still be
777
+
* used without issue when a Flash Update Boot is not in progress.
778
+
*
779
+
* This function is necessary because if an `explicit_buy` is pending then calling `pick_ab_partition` would clear the saved flash erase address for
780
+
* the version downgrade, so the required erase of the other partition would not occur when `explicit_buy` is called. This function saves and restores
781
+
* that address to prevent this issue, and returns `BOOTROM_ERROR_NOT_PERMITTED` if the partition chosen by `pick_ab_partition` also requires a flash
782
+
* erase version downgrade (as you can't erase two partitions with one `explicit_buy` call).
783
+
*
784
+
* This function also checks that the chosen partition contained a valid image (e.g. a signed image when using secure boot), and returns
785
+
* `BOOTROM_ERROR_NOT_FOUND` if it does not.
786
+
*
787
+
* \param workarea_base base address of work area
788
+
* \param workarea_size size of work area
789
+
* \param partition_a_num the A partition of the pair
790
+
* \return >= 0 the partition number picked by \ref rom_pick_ab_partition()
791
+
* BOOTROM_ERROR_NOT_PERMITTED if not possible to do an update correctly, e.g. if both main image and data image are TBYB
792
+
* BOOTROM_ERROR_NOT_FOUND if the chosen partition failed verification
/*! \brief Pick A/B partition without disturbing any in progress update or TBYB boot
1098
-
* \ingroup pico_bootrom
1099
-
*
1100
-
* This will call `rom_pick_ab_partition` using the `flash_update_boot_window_base` from the current boot, while performing extra checks to prevent disrupting
1101
-
* a main image TBYB boot. It requires the same minimum workarea size as `rom_pick_ab_partition`.
1102
-
* \see rom_pick_ab_partition()
1103
-
*
1104
-
* For example, if an `explicit_buy` is pending then calling `pick_ab_partition` would normally clear the saved flash erase address for the version downgrade,
1105
-
* so the required erase of the other partition would not occur when `explicit_buy` is called - this function saves and restores that address to prevent this
1106
-
* issue, and returns `BOOTROM_ERROR_NOT_PERMITTED` if the partition chosen by `pick_ab_partition` also requires a flash erase version downgrade (as you can't
1107
-
* erase 2 partitions with one `explicit_buy` call).
1108
-
*
1109
-
* It also checks that the chosen partition contained a valid image (e.g. a signed image when using secure boot), and returns `BOOTROM_ERROR_NOT_FOUND`
1110
-
* if it does not.
1111
-
*
1112
-
* \param workarea_base base address of work area
1113
-
* \param workarea_size size of work area
1114
-
* \param partition_a_num the A partition of the pair
1115
-
* \return >= 0 the partition number picked
1116
-
* BOOTROM_ERROR_NOT_PERMITTED if not possible to do an update correctly, e.g. if both main image and data image are TBYB
1117
-
* BOOTROM_ERROR_NOT_FOUND if the chosen partition failed verification
0 commit comments