Problem of a/b slot in cboot source code


I am researching the a/b redundancy in Jetson tx2. I want to finish part of code in cboot_src\bootloader\partner\t18x\common\lib\partitionloader\tegrabl_partition_loader.c

 * TODO: Add error handling such as fallover to other good slot or
 * enter fastboot if no good slot is found

My problem is how can I see the retry count of a/b slot in the code, and where to process it.

Hi l6331533854,

Please refer to /bootloader/partner/common/lib/a_b_boot


Thanks for replying.
In the folder you referred, I only found a file named tegrabl_a_b_partition_naming.c But I couldn’t see any function related to a/b slot’s retry count. Do you have more suggestions?

My Cboot source version is 28.2.1.

I am sorry. My source is rel-32.1.

If you are using rel-28 cboot, please refer to /bootloader/partner/t18x/common/lib/a_b_boot_control/tegrabl_a_b_boot_control.c


Another related question.

I want to understand the meaning of each bit field of this return value.

uint32_t tegrabl_get_boot_slot_reg(void)

source: rel-28.2.1 bootloader/partner/t18x/common/soc/t186/misc/a_b_helper.c


The boot slot number along with valid flag is stored into scratch register 99