Hi @KevinFFF,
I identified the problem by running OTA update, because the target stopped switching Slots. But to simulate the issue it doesn’t require OTA update neither A/B rootfs enabled. Only by rebooting the target is possible to reproduce the issue.
I tried 5.1.2 to 5.1.2 and 5.1.3 to 5.1.3. That means, I didn’t tried to update from a version to another.
Exactly, only rebooting the device around 370 times, the issue appears. As mentioned in the previous Forum topic, I use Yocto to build our image. But, I also could simulate the issue when running Ubuntu:
root@nvidia-desktop:/home/nvidia# cat /etc/nv_tegra_release
# R35 (release), REVISION: 4.1, GCID: 33958178, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug 1 19:57:35 UTC 2023
Yes, in a normal operation EDK2 is able to set BootChainFwPrevious
, BootChainFwStatus
, BootChainFwResetCount
and reboot the target to boot from the next slot (Sorry for my multiples debug message):
Jetson UEFI firmware (version v35.6.0 built on 2024-09-17T13:50:43+00:00)
ESC to enter Setup.
F11 to enter Boot Manager Menu.
Enter to continue boot.
Failed to find memory test protocol
DIOGO UpdateVariable BootChainFwPrevious attribute 3
DIOGO 10
DIOGO OTHER WRITE 1
DIOGO Offset: 424 , numBytes: 60 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO OTHER WRITE 1
DIOGO Offset: 426 , numBytes: 1 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO OTHER WRITE 1
DIOGO Offset: 484 , numBytes: 28 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO OTHER WRITE 1
DIOGO Offset: 0 , numBytes: 16 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO OTHER WRITE 1
DIOGO Offset: 426 , numBytes: 1 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO UpdateVariable BootChainFwPrevious attribute 3 DONE
DIOGO UpdateVariable BootChainFwStatus attribute 7
DIOGO 10
DIOGO OTHER WRITE 1
DIOGO Offset: 16 , numBytes: 60 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO OTHER WRITE 1
DIOGO Offset: 18 , numBytes: 1 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO OTHER WRITE 1
DIOGO Offset: 76 , numBytes: 40 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO OTHER WRITE 1
DIOGO Offset: 18 , numBytes: 1 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO UpdateVariable BootChainFwStatus attribute 7 DONE
DIOGO UpdateVariable BootChainFwResetCount attribute 3
DIOGO 10
DIOGO OTHER WRITE 1
DIOGO Offset: 116 , numBytes: 60 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO OTHER WRITE 1
DIOGO Offset: 118 , numBytes: 1 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO OTHER WRITE 1
DIOGO Offset: 176 , numBytes: 48 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO OTHER WRITE 1
DIOGO Offset: 118 , numBytes: 1 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO UpdateVariable BootChainFwResetCount attribute 3 DONE
Rebooting to new boot chain
����Shutdown state requested 1
At that time the target reboot and boot from the new Slot.
When the problem is in place, EDK2 isn’t able of changing the variables, set VarErrorFlag
with 0xEF
and complain about Bad Buffer Size
:
...
RecordVarErrorFlag (0xEF) PlatformConfigData:ED3374EF-767B-42FA-AF70-DB520A392822 - 0x00000003 - 0xEA
CommonVariableSpace = 0x1FF9C - CommonVariableTotalSize = 0x1FF8C
DIOGO UpdateVariable PlatformConfigData attribute 3 DONE
PlatformConfigured: Error setting Platform Config data: Bad Buffer Size
DIOGO UpdateVariable ConIn attribute 7
DIOGO UpdateVariable ConIn attribute 7 DONE
DIOGO UpdateVariable ConIn attribute 7
DIOGO UpdateVariable ConIn attribute 7 DONE
DIOGO UpdateVariable ConIn attribute 7
DIOGO UpdateVariable ConIn attribute 7 DONE
DIOGO UpdateVariable ConIn attribute 7
DIOGO UpdateVariable ConIn attribute 7 DONE
DIOGO UpdateVariable ConIn attribute 7
DIOGO UpdateVariable ConIn attribute 7 DONE
Jetson UEFI firmware (version v35.6.0 built on 2024-09-17T13:50:43+00:00)
ESC to enter Setup.
F11 to enter Boot Manager Menu.
Enter to continue boot.
Failed to find memory test protocol
**********************************
** WARNING: Test Key is used. **
**********************************
** WARNING: Test Key is used. **
...... DIOGO UpdateVariable BootCurrent attribute 6
DIOGO 11
DIOGO UpdateVariable BootCurrent attribute 6 DONE
DIOGO 12
DIOGO RECLAIM 3
Calling FtwVariableSpace
DIOGO Assert 131000 131000
WRITE 11, Length: 131000
DIOGO OTHER WRITE 1
DIOGO Offset: 72 , numBytes: 131000 , blockSize: 512
DIOGO OTHER WRITE STATUS: 0
DIOGO OTHER WRITE RETURN 4. Current Status: 0
DIOGO OTHER WRITE RETORNANDO ERROR 1
FtwVariableSpace 4: 4
ASSERT_EFI_ERROR (Status = Bad Buffer Size)
ASSERT [VariableRuntimeDxe] /home/diogo/work/as-distro/build/tmp/work/jetson_agx_xavier_syslogic-oe4t-linux/edk2-firmware-tegra/35.6.0-r0/edk2-tegra/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/Variabl
e.c(3325): !(((INTN)(RETURN_STATUS)(Status)) < 0)
UpdatePcieControllersWithGpuDevice: failed to enumerate GPU device handles: Not Found
...
Yes. When the variable partition is full and EDK2 can’t play with the variables anymore it is setting VarErrorFlag
to 0xEF
, that indicates the system is in the bad condition and I’m not able to switch slots anymore.
As I use Yocto build and the R35.6.0 isn’t available yet, I can’t do this test. What I did, was to get all EDK2 (edk2-basetools-tegra-native, edk2-firmware-core-tegra,edk2-firmware-tegra, tegra-uefi-capsules) version 35.6.0. That means the EDK2 running in my current test is the R35.6.0, but only the EDK2 stuff.
Bests,
Diogo