Always restart when using NX system

When using the NX system, the serial port ttyTHS0 is connected. When the system is powered on and started, the system will always restart. The following is the startup log. What is the reason.
log:
14:36:26[.025] W> RATCHET: MB1 binary ratchet value 4 is larger than ratchetel 2 from HW fuses.
14:36:26[0000.033] I> MB1 (prd-version: 2.3.0.0-t194-41334769-0a17edc1)
14:36:26[0000.038]Boot-mode: Coldboot
14:36:26[0000.041] I> Platform: Silicon
14:36:26[0000.044]Chip revision : A02P
14:36:26[0000.047] I> Bootrom patch version : 15 (correctatched)
14:36:26[0000.052] I> ATE fuse revisio0x200
14:36:26[0000.056] I> Ram repair fuse : 0x0
14:36:26[0000.059] I> Ram Code : 0x0
14:36:26[0000.061] I> rst_source: 0x0, rst_level: 0x0
14:36:26[0066] I> Boot-device: QSPI (instance: 0)
14:36:26[0000.070] I> Qspi flash params source = brbct
14:36:26[0000.074] I> Qspi clock source : pllp
14:36:26[0000.078]Qspi-0 initialized successfully
14:36:26[0000.082] I> Boot chain mechanism: A/B
14:36:26[0005] I> Current Boot-Chain Slot: 0
14:36:26[0000.089] I> BR-BCT Boot-Chain: 0, status: 0. ue flag: 0
14:36:26[0000.094] I> Qspi flash params source = brbct
14:36:26[0000.100] W> PROD_CONFIG: device prod data is empty i1 BCT.
14:36:26[0000.107] I> Temperature = 26000
14:36:26[0000.110] W> Skng boost for clk: BPMP_CPU_NIC
14:36:26[0000.115] W> Skig boost flk: BPMP_
[0000.119]Skipping boost for clkI_CBB
14:36:26[0000.123] W> Skipping boost for clk: AON_CPU_NIC
14:36:26[0000.127] W> Skipping boost for clk: CAN1
14:36:26[0000.131] W> Skipping boost for clk: CAN2
14:36:26[0000.135] I> Boot-device: QSPI (instance: 0)
14:36:26[0009] I> Qspi flash params source = mb1bct
14:36:26[0000.143] I> Qspi clock source : pllc0
14:36:26[0000.147] I> Qspi-0 reinitialized
14:36:26[0000.150] I> Qspi flash params source = mb1bct
14:36:26[0000.163] I> Non-ECC region[0]: Start:0x80000000, End:0x100000000
14:36:26[0000.170] W> Thermal cg not foun BCT
14:36:26[0000.178] W> MEMIO rail config not found in BCT
14:36:2600.201] I> Qspi flash params sou= mb1bctbct
14:36:26[0000.235] I> Qspish paramsrce = mb1bct
14:36:27[0000.799] I> Qspi flash params source = mb1bct
14:36:27[0000. I> Qspi flash params source = mb1bct
14:36:27[0000.855] W> Platform config not found in BCT
14:36:27[0000.8I> Qspi f params source = mb1bct
14:36:27[0000.907] I> MB1 done
14:36:27
14:36:27main enter
14:36:27SPE VERSION #: R01.00.18 Created: Jan 29 2021 @ 14:18:27
14:36:27HW Function test
14:36:27Start Scheduler.
14:36:27in late init
14:36:270000.917] I> Welcome to MB2(TBoot-BPMP) (version: default.t194-mobile-1ca012e4)
14:36:27[0000.917] I> DMA Heap @ [0x526fa000 - 0x52ffa000]
14:36:27[0000.918] I> Default Heap @ [0xd486400 - 0xd48a400]
14:36:27[0000.919] E> DEVICE_PROD: Invalid value data = 70020000, size = 0.
14:36:27[0000.924] W> device prod register failed
14:36:27[0000.928] I> gpio framework initialized
14:36:27[0000.932] I> tegrabl_gpio_driver_register: register ‘nvidia,tegra194-gpio’ driver
14:36:27[0000.939] I> tegrabl_gpio_driver_register: register ‘nvidia,tegra194-gpio-aon’ driver
14:36:27[0000.947] I> No valid sdcard_params in mb1_bct
14:36:27[0000.951] I> Boot_device: QSPI_FLASH instance: 0
14:36:27[0000.956] I> qspi flash-0 params source = boot args
14:36:27[0000.961] I> QSPI-0l initialized successfully
14:36:27[0000.965] I> sdmmc-3 params source = safe params
14:36:27[0001.392] I> sdmmc DDR50 mode
14:36:27[0001.410] I> Found 41 partitions in QSPI_FLASH (instance 0)
14:36:27[0001.427] W> Cannot find any partition table for 00000003
14:36:27[0001.428] > PARTITION_MANAGER: Failed to publish partition.
14:36:27[0001.443] I> Found 21 partitions in SDMMC_USER (instance 3)
14:36:27[0001.445] I> Active Boot chain : 0
14:36:28[0002.116] I> Relocating BR-BCT
14:36:28[0002.117] > DEVICE_PROD: device prod is not initialized.
14:36:28[0002.142] E> I2C: slave not found in slaves.
14:36:28[0002.143] E> I2C: Could not write 0 bytes to slave: 0x00ae with repeat start true.
14:36:28[0002.144] E> I2C_DEV: Failed to send register address 0x00000000.
14:36:28[0002.145] E> I2C_DEV: Could not read 256 registers of size 1 from slave 0xae at 0x00000000 via instance 0.
14:36:28[0002.146] E> eeprom: Failed to read I2C slave device
14:36:28[0002.149] I> Failed to read CVB eeprom data @ AE
14:36:28[0002.153] I> Retrying CVB eeprom read @ AC …
14:36:28[0002.158] E> I2C: slave not found in slaves.
14:36:28[0002.162] E> I2C: Could not write 0 bytes to slave: 0x00ac with repeat start true.
14:36:28[0002.169] E> I2C_DEV: Failed to send register address 0x00000000.
14:36:28[0002.175] E> I2C_DEV: Could not read 256 registers of size 1 from slave 0xac at 0x00000000 via instance 0.
14:36:28[0002.184] E> eeprom: Failed to read I2C slave device
14:36:28[0002.189] I> Failed to read CVB eeprom data @ AC
14:36:28[0002.451] I> Relocating OP-TEE dtb from: 0x6bfff1d0 to 0x70050000, size: 1008
14:36:28[0002.451] I> [0] START: 0x80000000, SIZE: 0x2f000000
14:36:28[0002.452] I> [1] START: 0xaf010000, SIZE: 0x18bf0000
14:36:28[0002.452] I> [2] START: 0xc7d00000, SIZE: 0xc0000
14:36:28[0002.453] I> [3] START: 0xca000000, SIZE: 0x800000
14:36:28[0002.453] I> dram_block larger than 80000000
14:36:28[0002.456] I> [4] START: 0x100000000, SIZE: 0x180000000
14:36:28[0002.467] I> Setting NS memory ranges to OP-TEE dtb finished.
14:36:28[0002.470] I> found decompressor handler: lz4
14:36:29[0002.699] I> EKB detected (length: 0x410) @ VA:0x52709400
14:36:29[0002.701] I> Setting EKB blob info to OPTEE dtb finished.
14:36:29TICE: BL31: v2.6(release):4fa405dbd
14:36:29NOTICE: BL31: Built : 20:16:55, Aug 10 2022
14:36:29I/TC:
14:36:29pmp: init
14:36:29bpmp: tag is 128431eec76692047e1ac1ebc0392266
14:36:29sku_dt_init: not sku 0x00
14:36:29clk_early initialized
14:36:29TC:il_early initialized
14:36:29se initialized
14:36:29hwwdt initialized
14:36:29-s94_ec_get_ec_list: found 45 ecs
14:36:29ure exter initialized
14:36:29vmon_setup_monitors: found 3 monitors
14:36:29vmon initialized
14:36:29lc initialized
14:36:29n_populate_monitors: found 73 monitors
14:36:29 found
14:36:29on initialized
14:36:29mc initialized
14:36:29reset initialized
14:36:29nvhs initialized
14:36:29uphy_early initialized
14:36:29emc_early initialized
14:36:29392 clocks registered
14:36:29clk initialized
14:36:29io_dpd initialized
14:36:29thermal initialized
14:36:29thermal_mrq initialized
14:36:29i2c initialized
14:36:29vrmon_dt_init: vrmon node not found
14:36:29vrmon_chk_boot_state: found 0 rail monitors
14:36:29vrmon initialized
14:36:29regulator initialized
14:36:29avfs_clk_platform initialized
14:36:29soctherm initialized
14:36:29aotag initialized
14:36:29powergate initialized
14:36:29dvs initialized
14:36:29pm initialized
14:36:29suspend initialized
14:36:29pg_late initialized
14:36:29pg_mrq_init initialized
14:36:29strap initialized
14:36:29nvl initialized
14:36:29emc initialized
14:36:29emc_mrq initialized
14:36:29clk_dt initialized
14:36:29tj_init initialized
14:36:29uphy_dt initialized
14:36:29uphy_mrq initialized
14:36:29uphy initialized
14:36:29ec_swd_poll_start: 281 reg polling start w period 47 ms
14:36:29ec_late initialized
14:36:29hwwdt_late initialized
14:36:29reset_mrq initialized
14:36:29ec_mrq initialized
14:36:29fmon_mrq initialized
14:36:29clk_mrq initialized
14:36:29avfs_mrq initialized
14:36:29mail_mrq initialized
14:36:29i2c_mrq initialized
14:36:29tag_mrq initialized
14:36:29console_mrq initialized
14:36:29mrq initialized
14:36:29clk_sync_fmon_post initialized
14:36:29TC: OP-TEE version: 3.16 (gcc version 9.3.0 (Buildroot 2020.08)) #2 Thuk_dt_late initialized
14:36:29_late initialized
14:36:29post initialized
14:36:29dbells initialized
14:36:29 ce initialized
14:36:29cvc initialized
14:36:29 03:23:20 Ufs_clk_mach_post initialized
14:36:29 2fs_clk_platform_post initialized
14:36:292c_late initialized
14:36:29regulator_post initialized
14:36:29ar initialized
14:36:29console_late initialized
14:36:29clk_dt_post initialized
14:36:29mc_reg initialized
14:36:2964
14:36:29I/TC: WARNIN_post initialized
14:36:29profile initialized
14:36:29fuse_late initialized
14:36:29extras_post initialized
14:36:29bpmp: init complete
14:36:29entering main console loop
14:36:29] This OP-TEE configuration might be insecure!
14:36:29I/TC: WARNING: Please check Porting guidelines — OP-TEE documentation documentation
14:36:29I/TC: Primary CPU initializing
14:36:29I/TC: Primary CPU switching to normal world boot
14:36:290003.318] I> Welcome to NVDisp-Init
14:36:29[0003.319] I> NVDisp-Init version: t194-f9ecfedc
14:36:29[0003.319] I> CPU-BL Params @ 0xca020000
14:36:29[0003.319] I> 0) Base:0x00000000 Size:0x00000000
14:36:29[0003.320] I> 1) Base:0xc8300000 Size:0x00100000
14:36:29[0003.320] I> 2) Base:0xc9800000 Size:0x00200000
14:36:29[0003.320] I> 3) Base:0xc8600000 Size:0x00200000
14:36:29[0003.323] I> 4) Base:0xc8200000 Size:0x00100000
14:36:29[0003.327] I> 5) Base:0xc8100000 Size:0x00100000
14:36:29[0003.332] I> 6) Base:0xc9400000 Size:0x00400000
14:36:29[0003.336] I> 7) Base:0xc9000000 Size:0x00400000
14:36:29[0003.341] I> 8) Base:0xc8000000 Size:0x00100000
14:36:29[0003.345] I> 9) Base:0xc7f00000 Size:0x00100000
14:36:29[0003.350] I> 10) Base:0xca800000 Size:0x00800000
14:36:29[0003.354] I> 11) Base:0x40000000 Size:0x00040000
14:36:29[0003.359] I> 12) Base:0xc7e00000 Size:0x00100000
14:36:29[0003.363] I> 13) Base:0x40046000 Size:0x00002000
14:36:29[0003.367] I> 14) Base:0x40048000 Size:0x00002000
14:36:29[0003.372] I> 15) Base:0xaf000000 Size:0x00004000
14:36:29[0003.376] I> 16) Base:0x4004a000 Size:0x00002000
14:36:29[0003.381] I> 17) Base:0xc7c00000 Size:0x00100000
14:36:29[0003.385] I> 18) Base:0x4004c000 Size:0x00002000
14:36:29[0003.390] I> 19) Base:0xc9a00000 Size:0x00600000
14:36:29[0003.394] I> 20) Base:0x4004e000 Size:0x00002000
14:36:29[0003.399] I> 21) Base:0xc7dc0000 Size:0x0000c000
14:36:29[0003.403] I> 22) Base:0x00000000 Size:0x00000000
14:36:29[0003.408] I> 23) Base:0xc7de0000 Size:0x00020000
14:36:29[0003.412] I> 24) Base:0xcc000000 Size:0x02000000
14:36:29[0003.417] I> 25) Base:0x40050000 Size:0x00002000
14:36:29[0003.421] I> 26) Base:0x40040000 Size:0x00006000
14:36:29[0003.425] I> 27) Base:0xc8c00000 Size:0x00400000
14:36:29[0003.430] I> 28) Base:0xc8400000 Size:0x00200000
14:36:29[0003.434] I> 29) Base:0xc8800000 Size:0x00400000
14:36:29[0003.439] I> 30) Base:0xc7dd0000 Size:0x00010000
14:36:29[0003.443] I> 31) Base:0x00000000 Size:0x00000000
14:36:29[0003.448] I> 32) Base:0xf8000000 Size:0x08000000
14:36:29[0003.452] I> 33) Base:0xce000000 Size:0x2a000000
14:36:29[0003.457] I> 34) Base:0xcb000000 Size:0x01000000
14:36:29[0003.461] I> 35) Base:0xae000000 Size:0x01000000
14:36:29[0003.466] I> 36) Base:0xa0000000 Size:0x0e000000
14:36:29[0003.470] I> 37) Base:0xca000000 Size:0x00800000
14:36:29[0003.475] I> 38) Base:0x80000000 Size:0x20000000
14:36:29[0003.479] I> 39) Base:0xb0000000 Size:0x08000000
14:36:29[0003.483] I> 40) Base:0x00000000 Size:0x00000000
14:36:29[0003.488] I> 41) Base:0x00000000 Size:0x00000000
14:36:29[0003.492] I> 42) Base:0x00000000 Size:0x00000000
14:36:29[0003.497] I> 43) Base:0x00000000 Size:0x00000000
14:36:29[0003.501] I> 44) Base:0x00000000 Size:0x00000000
14:36:29[0003.506] I> 45) Base:0x00000000 Size:0x00000000
14:36:29[0003.510] GIC-SPI Target CPU: 0
14:36:29[0003.513] Interrupts Init done
14:36:29[0003.516] calling constructors
14:36:29[0003.519] initializing heap
14:36:29[0003.522] I> Heap: [0xa0960000 … 0xadf00000]
14:36:29[0003.526] initializing threads
14:36:29[0003.529] initializing timers
14:36:29[0003.532] creating bootstrap completion thread
14:36:29[0003.536] top of bootstrap2()
14:36:29[0003.539] CPU: MIDR: 0x4E0F0040, MPIDR: 0x80000000
14:36:29[0003.543] initializing platform
14:36:29[0003.546] E> DEVICE_PROD: Invalid value data = 0, size = 0.
14:36:29[0003.552] W> device prod register failed
14:36:29[0003.555] I> Bl_dtb @0xadf00000
14:36:29[0003.558] I> gpio framework initialized
14:36:29[0003.570] I> tegrabl_gpio_driver_register: register ‘nvidia,tegra194-gpio’ driver
14:36:29[0003.578] I> tegrabl_gpio_driver_register: register ‘nvidia,tegra194-gpio-aon’ driver
14:36:29[0003.582] I> fixed regulator driver initialized
14:36:29[0003.596] I> register ‘maxim’ power off handle
14:36:29[0003.598] I> virtual i2c enabled
14:36:29[0003.598] I> registered ‘maxim,max20024’ pmic
14:36:29[0003.599] I> tegrabl_gpio_driver_register: register ‘max20024-gpio’ driver
14:36:29[0003.600] I> Boot-device: QSPI
14:36:29[0003.603] I> Boot_device: QSPI_FLASH instance: 0
14:36:29[0003.607] I> configure_qspi_clk: qparams clk_src = 5, clk_div = 0, clk_src_freq = 800000000, interface_freq = 50000000
14:36:29[0003.618] I> configure_qspi_clk: FORCING INTERFACE_FREQ TO 133000000!!
14:36:29[0003.625] I> QSPI source rate = 204000 Khz
14:36:29[0003.628] I> Requested rate for QSPI clock = 34000 Khz
14:36:29[0003.633] I> BPMP-set rate for QSPI clk = 34000 Khz
14:36:29[0003.638] I> tx_clk_tap_delay : 0
14:36:29[0003.641] I> rx_clk_tap_delay : 16
14:36:29[0003.644] I> QSPI Flash Size = 32 MB
14:36:29[0003.652] I> Qspi initialized successfully
14:36:29[0003.652] I> qspi flash-0 params source = boot args
14:36:29[0003.657] W> No board IDs available
14:36:29[0003.660] E> Failed to get board id info!
14:36:29[0003.666] I> sdmmc-3 params source = safe params
14:36:29[0003.673] I> Found 41 partitions in QSPI_FLASH (instance 0)
14:36:29[0003.674] W> Cannot find any partition table for 00000003
14:36:29[0003.679] E> Failed to publish 00000003
14:36:30[0003.688] I> Found 21 partitions in SDMMC_USER (instance 3)
14:36:30[0003.702] I> regulator ‘vdd-hdmi-5v0’ already enabled
14:36:30[0003.708] I> regulator ‘vdd-hdmi-5v0’ already enabled
14:36:30[0003.709] E> tegrabl_display_init_regulator: hdmi cable is not connected
14:36:30[0003.709] E> tegrabl_display_get_pdata, failed to parse dtb settings
14:36:30[0003.716] E> invalid display type
14:36:30[0003.717] E> cannot find any other nvdisp nodes
14:36:30[0003.718] E> no valid display unit config found in dtb
14:36:30[0003.725] W> display init failed
14:36:30[0003.726] initializing target
14:36:30[0003.729] calling apps_init()
14:36:30[0003.731] starting app kernel_boot_app
14:36:30[0003.735] I> Kernel type = Normal
14:36:32
14:36:32Jetson UEFI firmware (version 1.0-d7fb19b built on 2022-08-10T20:18:13-07:00)
14:36:32
14:36:32
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:33
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:34
14:36:35
14:36:35
14:36:35
14:36:35
14:36:35
14:36:35
14:36:35
14:36:35
14:36:35
14:36:35
14:36:35
14:36:35
14:36:35
14:36:35
14:36:35
14:36:36
14:36:36
14:36:36
14:36:36
14:36:36
14:36:36
14:36:36
14:36:36
14:36:36
14:36:36
14:36:36
14:36:36
14:36:36
14:36:36
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:37
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38
14:36:38ASSERT [TerminalDxe] /dvs/git/dirty/git-master_linux/out/nvidia/bootloader/uefi/Jetson_RELEASE/edk2/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c(2078): ((BOOLEAN)(0==1))
14:36:38
14:36:38Resetting the system in 5 seconds.
14:36:43Shutdown state requested 1
14:36:43Rebooting system …

Hi,

  1. Please try to enable UEFI log by rebuilding the UEFI binary and replace the original binary with the debug build one.

  2. Are you able to reproduce same issue on devkit?

1、 UEFI we failed to compile. Could you please provide us with some steps to compile UEFI.
2、devkit has the same problem.

Could you share the exact steps you are using to reproduce this issue on devkit?

Steps to build UEFI :

The PC sends a hexadecimal packet every 500 milliseconds. When the serial port receives the packet, it inevitably restarts:
55 0D 04 33 65 E5 74 7F 40 3C 36 CE 9B 55 0D 04 33 65 E5 75 7F 40 3C 43 A0 B4 55 1D 04 DF 65 E5 76 7F 40 3C 37 72 39 61 73 38 73 65 6B 76 4B 62 74 43 4E 63 00 EA 0E

My previous question is how did you reproduce this issue with devkit? Do you have any special setup?
And I don’t think your PC needs to send packet to reproduce issue… or you must wait for PC to send packet to restart?

Our application scenario is that the serial port is used to dock with DJI’s UAV. When the UAV is powered on, it automatically sends packets to the serial port, resulting in the constant restart of the module. This packet is the packet that we simulated to confirm would cause the restart

Hi,

To confirm, so if you don’t enable packet to send during boot up but do it later in kernel, then you won’t get reboot?

Yes, that’s right

Hi,

Could you create another dtb file which disabled UART1 in it and assign it to your “TBCDTB_FILE”?
This will disable UART1 in UEFI.

Is the device tree compiled by the kernel?

p3668.conf.common
DTB_FILE=tegra194-p3668-all-p3509-0000.dtb → this is for your kernel.
TBCDTB_FILE=tegra194-p3668-all-p3509-0000.dtb → this is for your UEFI.

Create a new one which is based on tegra194-p3668-all-p3509-0000.dtb but with UART1 disabled.

Our kernel uses tegra194-p3668-0001-p3509-0000.dtb, or modify the file p3668.conf.common?

Modify p3668.conf.common… We don’t care about your kernel. What we are doing now is disable UART1 in UEFI.

If you still don’t understand what I am talking about, please ask. I feel the last 2 comments you replied showed you don’t understand what we are doing now…

Okay, I’ll try. Thank you.

how to update uefi dtb,the cmd is right:sudo ./flash.sh -k bootloader-dtb jetson-xavier-nx-devkit-emmc mmcblk0p1

Or you can directly run with full flash.

However, if the log copy is the following path, the test problem still exists, and the update is not successful?copying tbcdtbfile(/home/amoymn/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/kernel/dtb/tegra194-p3668-0001-p3509-0000.dtb)… done.
copying cfgfile(/home/amoymn/nvidia/nvidia_sdk/JetPack_5.0.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/bootloader/t186ref/cfg/flash_l4t_t194_spi_emmc_p3668.xml) to flash.xml… done.
done.

Could you clarify what did you change in your board config?