There are several topics relating to assertion issues in Jetpack 5 and 6.
We create this post to share some possible fixes and the verification steps.
Possible Errors
Assertion 1.
ASSERT [VariableStandaloneMm] /dvs/git/dirty/git-master_linux/out/nvidia/optee.t234-uefi/StandaloneMmOptee_RELEASE/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c(3264): !(((INTN)(RETURN_STATUS)(Status)) < 0)
Fix:
diff --git a/core/arch/arm/kernel/stmm_sp.c b/core/arch/arm/kernel/stmm_sp.c
index 1d6344d..6441c03 100644
--- a/core/arch/arm/kernel/stmm_sp.c
+++ b/core/arch/arm/kernel/stmm_sp.c
@@ -77,7 +77,7 @@
static const uint16_t ffa_storage_id = 4U;
static const unsigned int stmm_stack_size = 4 * SMALL_PAGE_SIZE;
-static const unsigned int stmm_heap_size = 750 * SMALL_PAGE_SIZE;
+static const unsigned int stmm_heap_size = 1024 * SMALL_PAGE_SIZE;
static const unsigned int stmm_sec_buf_size = 21 * SMALL_PAGE_SIZE;
static const unsigned int stmm_ns_comm_buf_size = 21 * SMALL_PAGE_SIZE;
→ Has been fixed in both JP6.0(R36.3.0) and JP5.1.4(R35.6.0).
Assertion 2.
ASSERT [FvbNorFlashStandaloneMm] /dvs/git/dirty/git-master_linux/out/nvidia/optee.t234-uefi/StandaloneMmOptee_RELEASE/edk2-nvidia/Silicon/NVIDIA/Drivers/FvbNorFlashDxe/FvbNorFlashStandaloneMm.c(868): ((BOOLEAN)(0==1))
Fix:
- fix(stmm): allow measurement partition to be zero filled · NVIDIA/edk2-nvidia@e4c86ce · GitHub
- fix: reset the meas buffer after computing the first measurement · NVIDIA/edk2-nvidia@615288a · GitHub
→ Has been fixed in both JP6.0(R36.3.0) and JP5.1.4(R35.6.0)
Assertion 3.
ASSERT [FvbNorFlashStandaloneMm] /workspace_SSD/alex/edk2_nvidia/nvidia-uefi-r35.5.0/edk2-nvidia/Silicon/NVIDIA/Drivers/FvbNorFlashDxe/FvbNorFlashStandaloneMm.c(978): ((BOOLEAN)(0==1))
Or
ASSERT [FvbNorFlashStandaloneMm] /out/nvidia/optee.t234-uefi/StandaloneMmOptee_RELEASE/edk2-nvidia/Silicon/NVIDIA/Drivers/FvbNorFlashDxe/FvbNorFlashStandaloneMm.c(937): ((BOOLEAN)(0==1))
Fix:
R35.x: https://github.com/NVIDIA/edk2-nvidia/pull/110/commits
R36.x: https://github.com/NVIDIA/edk2-nvidia/pull/113/commits
→ Has been fixed in JP6.2(R36.4.3), but not included in JP5.1.5(R35.6.1)
Steps to apply the change
Step 1: apply the patch to correct source file
Step 2: run the following command to build uefi_StandaloneMmOptee_RELEASE.bin
$ edk2_docker edk2-nvidia/Platform/NVIDIA/StandaloneMmOptee/build.sh
Step 3: refer to the steps in atf_and_optee_README.txt to build tos image and update tos image in <Linux_for_Tegra>/bootloader/tos-optee_t<194 or 234>.img
Step 4: flash the QSPI only to apply the change (e.g. Orin Nano devkit with JP6.0)
$ sudo ./flash.sh -c bootloader/generic/cfg/flash_t234_qspi.xml jetson-orin-nano-devkit internal
Verification steps
Step 1: Enter UEFI Menu.
Step 2: Select Device Manager → NVIDIA Configuration → Reset Setting.
Step 3: Go back top menu and press Reset to Exit.
Step 4: Check if it can boot with successful
Repeat Step 1 to 4 about 5 times to check if there's assertion issue.
Notes
- They can be applied to both T194 and T234 series which uses UEFI as bootloader
- We would suggest user applying all patches above since the assertion issue can only be recovered through reflashing (i.e. reboot cannot help)
- Please let us know if there’s more assertion issue and we can update this post for them.
- All related fixes have been included in Jetpack 6.2(R36.4.3) so that user can simply upgrade to this release to have all of them fixed.