It take too long time to(more than 1 minutes) boot from uefi to kernel

//////////////////////////////LOGS /////////////////////////////
I> MB2 finished

▒▒NOTICE: BL31: v2.6(release):4fa405dbd
NOTICE: BL31: Built : 20:16:55, Aug 10 2022
I/TC:
I/TC: Non-secure external DT found
I/TC: OP-TEE version: 3.16 (gcc version 9.3.0 (Buildroot 2020.08)) #2 Thu Aug 11 03:23:19 UTC 2022 aarch64
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check Porting guidelines — OP-TEE documentation documentation
I/TC: Primary CPU initializing
I/TC: WARNING: Test OEM keys are being used!
I/TC: This is only for TZ-SE testing and should NOT be used for a shipping product!
E/TC:00 0 jetson_user_key_pta_init:700 jetson_user_key_pta_init: Failed (f0100006).
E/TC:00 0 call_initcalls:43 Initcall __text_start + 0x000dab50 failed
I/TC: Primary CPU switching to normal world boot
▒▒
Jetson UEFI firmware (version 1.0-d7fb19b built on 2022-08-10T20:18:13-07:00)
////////////////////////////////////////////////////////////////////////////////////////////////////////
arfter this message ,it has no other printed message,it seems to print the bank space .More than 1 minutes,it prints as below:

/////////////////////////////////////////////LOGS////////////////////////////////////////////////
** WARNING: Test Key is used. **

L4TLauncher: Attempting GRUB Boot
L4TLauncher: Attempting Direct Boot
EFI stub: Booting Linux Kernel…
EFI stub: Using DTB from configuration table
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Exiting boot services and installing virtual address map…
▒▒I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
I/TC: Secondary CPU 3 initializing
I/TC: Secondary CPU 3 switching to normal world boot

You need to rebuild the UEFI binary and flash the debug build binary with your host so that that part will print more logs.

hi,
do you have the debug uefi already?I have rebuild it,but it is not successful,logs as below:

//////////////////////////////////////////////////logs//////////////////////////////////////////////////
ERROR - Could not find appropriate folder for mu_nasm. Host(os=‘Linux’, arch=‘ARM’, bit=‘64’)
.

ERROR - Could not find appropriate folder for edk2-acpica-iasl. Host(os=‘Linux’, arch=‘ARM’, bit=‘64’)
. Done
SECTION - Updated/Verified 2 dependencies
SECTION - Second pass update of environment
ERROR - Could not find appropriate folder for edk2-acpica-iasl. Host(os=‘Linux’, arch=‘ARM’, bit=‘64’)
ERROR - Could not find appropriate folder for mu_nasm. Host(os=‘Linux’, arch=‘ARM’, bit=‘64’)
ERROR - Could not find appropriate folder for edk2-acpica-iasl. Host(os=‘Linux’, arch=‘ARM’, bit=‘64’)
ERROR - Could not find appropriate folder for mu_nasm. Host(os=‘Linux’, arch=‘ARM’, bit=‘64’)
ERROR - Could not find appropriate folder for edk2-acpica-iasl. Host(os=‘Linux’, arch=‘ARM’, bit=‘64’)
ERROR - Could not find appropriate folder for mu_nasm. Host(os=‘Linux’, arch=‘ARM’, bit=‘64’)
Updating. Done
SECTION - Updated/Verified 2 dependencies
SECTION - Summary
PROGRESS - Success
nvidia: Building basetools.
SECTION - Init SDE
SECTION - Loading Plugins
SECTION - Start Invocable Tool
Traceback (most recent call last):
File “edk2/BaseTools/Edk2ToolsBuild.py”, line 177, in
main()
File “edk2/BaseTools/Edk2ToolsBuild.py”, line 173, in main
Edk2ToolsBuild().Invoke()
File “/home/nvidia/edkrepo/nvidia-uefi/venv/lib/python3.8/site-packages/edk2toolext/base_abstract_invocable.py”, line 146, in Invoke
retcode = self.Go()
File “edk2/BaseTools/Edk2ToolsBuild.py”, line 148, in Go
raise Exception(“Failed to build.”)
Exception: Failed to build

log.bin (141.9 KB)
I have rebuild it successfully,the log file is uploaded.It is a txt file in fact with bin suffix for some reason.
I have found three places stay for a long time:
1.
//////////////////////////////////logs////////////////////////////////
PCIe Controller-1 Link is DOWN
PCIe Controller-4 Link is DOWN
PCIe Controller-5 Link is DOWN
PROGRESS CODE: V03040003 I0
add-symbol-file /home/csu/code/nvidia-uefi/Build/Jetson/DEBUG_GCC5/AARCH64/Silicon/NVIDIA/Drivers/EqosDeviceDxe/EqosDeviceDxe/DEBUG/EqosDeviceDxe.dll 0x803F47000
Loading driver at 0x00803F46000 EntryPoint=0x00803F526DC EqosDeviceDxe.efi
PROGRESS CODE: V03040002 I0
////////////////////////////////////here stay a long time, no prints///////////////////
SNP:PHY: PhyDxeInitialization () Failed to reset Phy
2.
DeviceDiscoveryBindingStart, driver returned Device Error to start notification
////////////////////////////////////here stay a long time, no prints///////////////////
3.
////////////////////////////////////logs///////////////////////////////
DeviceDiscoveryBindingStart, failed to reset moduleDevice Error
TegraI2cStartRequest: No ACK received
Failed to read eeprom (No Response)
TegraI2cStartRequest: No ACK received
Failed to read eeprom (No Response)
TegraI2cStartRequest: No ACK received
Failed to read eeprom (No Response)
TegraI2cStartRequest: No ACK received
Failed to read eeprom (No Response)
TegraI2cStartRequest: No ACK received
Failed to read eeprom (No Response)
TegraI2cStartRequest: No ACK received
Failed to read eeprom (No Response)
TegraI2cStartRequest: No ACK received
Failed to read eeprom (No Response)
TegraI2cStartRequest: No ACK received
Failed to read eeprom (No Response)
TegraI2cStartRequest: No ACK received
Failed to read eeprom (No Response)
TegraI2cStartRequest: No ACK received
Failed to read eeprom (No Response)
[ext4] Needs journal recovery, mounting read-only
PROGRESS CODE: V02020000 I0
////////////////////////////////////here stay a long time, no prints///////////////////
SNP:PHY: PhyDxeInitialization () Failed to reset Phy
DeviceDiscoveryBindingStart, driver returned Device Error to start notification
PROGRESS CODE: V02010000 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010000 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010000 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
PROGRESS CODE: V02010004 I0
DeviceDiscoveryBindingStart, driver returned Unsupported to start notification
DeviceDiscoveryBindingStart, driver returned Unsupported to start notification
PROGRESS CODE: V02020000 I0
PROGRESS CODE: V02020000 I0
Found 640x480
Found 1280x720
Found 1920x1080


** WARNING: Test Key is used. **


** WARNING: Test Key is used. **

Which dts file does the UEFI use? which device cause this problem? Looking forward to your reply

It is also same one under Linux_for_Tegra/kernel/dtb.

I would say you can compare your test result with devkit first. And see what is the extra delay here.

For example, if you are not using eqos driver for etherent, then it could be disabled.

1 Like

thank you.I have closed the ehernet ,it seems ok now.I have other question,how to get the print message when I use the devkit board.It seems no adaptive drivers on pc when I plugin the typec(or the microusb) to pc,where can I download the pc’s drvivers package for uart on pc to print the messge?

You mean how to dump the uart serial console on devkit? It is the micro usb port on devkit.

not the pc software.I mean I cannot get the devices on pc,it seems no adpative drivers.

抱歉, 看不太懂你最後這個想問的是…?

sorry, not sure what you are telling here.

ls /dev,I can not find ttyACM devices

There should be error in your host side dmesg.

hi,the ufi boot stage,it takes about 27s,how should I decrease the boot time?

the uefi boot stage has so many “Deleting fragment fragment@” messages

Hi,

you can try to disable those drivers which are not needed in device tree .

I/TC: Primary CPU initializing
I/TC: WARNING: Test OEM keys are being used!
I/TC: This is only for TZ-SE testing and should NOT be used for a shipping product!
////////////////////////////////////////////////////////////////////////////////////////
how to close TZ-SE testing

I don’t think that really matters for your boot time.

PROGRESS CODE: V03040003 I0
add-symbol-file /home/csu/code/nvidia-uefi/Build/Jetson/DEBUG_GCC5/AARCH64/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe/DEBUG/SetupBrowser.dll 0x805303000
Loading driver at 0x00805302000 EntryPoint=0x00805314268 SetupBrowser.efi
PROGRESS CODE: V03040002 I0

PROGRESS CODE: V03040003 I0
add-symbol-file /home/csu/code/nvidia-uefi/Build/Jetson/DEBUG_GCC5/AARCH64/Silicon/NVIDIA/Drivers/BpmpScmi/BpmpScmiDxe/DEBUG/BpmpScmiDxe.dll 0x80546E000
Loading driver at 0x0080546D000 EntryPoint=0x0080547240C BpmpScmiDxe.efi
PROGRESS CODE: V03040002 I0

PROGRESS CODE: V03040003 I0
add-symbol-file /home/csu/code/nvidia-uefi/Build/Jetson/DEBUG_GCC5/AARCH64/Silicon/NVIDIA/Drivers/TegraCpuFreqDxe/TegraCpuFreqDxe/DEBUG/TegraCpuFreqDxe.dll 0x805368000
Loading driver at 0x00805367000 EntryPoint=0x0080536B6C4 TegraCpuFreqDxe.efi
PROGRESS CODE: V03040002 I0
////////////////////////////////////////////////////////////////////////////////////////////
so many message “add-symbol-file” like this,it is neccessary?how to close it?

any suggestions ?

  1. The uefi use the kernel dtb?
  2. Should I only modify the kernel dts file?
  3. need I modify other files?I have disabled some device nodes of the dts file and delete some overlay dts files,but uefi takes 20s also,just a few seconds less.

Check the post here.