Hello, JerryChang.
Sorry for late reply. This topic was automatically closed, so I created a new one.
We managed to find a bug inside our driver. It was spinlock recursion. Due to this bug system hanged and rebooted.
However system rebooted to the OTHER slot.
It happens on JP 4.5 L4T 32.5.1 and JP 4.6 L4T 32.6.1.
Below are steps to reproduce wrong A/B boot:
smd.cfg (2.6 KB)
spinlock_recursion_test.c (416 Bytes)
- flash Xavier with A/B support enabled, using smd.cfg attached. The tegra_wdt:watchdog@30c0000 must be enabled also.
- build and load spinlock_recursion_test.ko
$ nvbootctrl dump-slots-info
Current bootloader slot: A
Active bootloader slot: A
magic:0x43424e00, version: 5 features: 0 num_slots: 2
slot: 0, priority: 15, suffix: _a, retry_count: 6, boot_successful: 0
slot: 1, priority: 14, suffix: _b, retry_count: 7, boot_successful: 1
$ insmod spinlock_recursion_test.ko
- System will hung. It will be rebooted after 120s by means of TEGRA_BCCPLEX_WATCHDOG. After rebooting check that boot slot was changed and retry_count of previous slot is zero.
$ nvbootctrl dump-slots-info
Current bootloader slot: B
Active bootloader slot: B
magic:0x43424e00, version: 5 features: 0 num_slots: 2
slot: 0, priority: 15, suffix: _a, retry_count: 0, boot_successful: 0
slot: 1, priority: 14, suffix: _b, retry_count: 7, boot_successful: 1