JP5.0 kernel brings up error

Hi,

we build JP5.0 kernel and run it on Jetson NX platfrom, the serial port brings up errors as follows:
[ 8.672691] tegra-carveouts tegra-carveouts: vpr :dma coherent mem declare 0x00000000ce000000,704643072
[ 8.672697] tegra-carveouts tegra-carveouts: assigned reserved memory node vpr-carveout
[ 8.672711] nvmap_page_pool_init: Total RAM pages: 3814763
[ 8.672716] nvmap_page_pool_init: nvmap page pool size: 476845 pages (1862 MB)
[ 8.673033] nvmap_background_zero_thread: PP zeroing thread starting.
[ 8.673101] misc nvmap: created heap vpr base 0x00000000ce000000 size (688128KiB)
[ 8.673242] misc nvmap: cvsram :dma coherent mem declare 0x0000000050000000,4194304
[ 8.673250] misc nvmap: created heap cvsram base 0x0000000050000000 size (4096KiB)
[ 8.748296] NET: Registered protocol family 29
[ 8.753101] systemd[1]: Finished Set console scheme.
[ 8.755043] nvgpu: 17000000.gv11b nvgpu_nvhost_syncpt_init:135 [INFO] syncpt_unit_base 60000000 syncpt_unit_size 400000 size 1000
[ 8.755043]
[ 8.759331] systemd[1]: Finished Remount Root and Kernel File Systems.
[ 8.766742] can: raw protocol
[ 8.777366] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[ 8.779472] systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped.
[ 8.784915] Mem abort info:
[ 8.793982] systemd[1]: Condition check resulted in Platform Persistent Storage Archival being skipped.
[ 8.796817] ESR = 0x96000044
[ 8.809011] EC = 0x25: DABT (current EL), IL = 32 bits
[ 8.810918] systemd[1]: Starting Load/Save Random Seed…
[ 8.814459] SET = 0, FnV = 0
[ 8.814463] EA = 0, S1PTW = 0
[ 8.814465] Data abort info:
[ 8.814469] ISV = 0, ISS = 0x00000044
[ 8.814471] CM = 0, WnR = 1
[ 8.814476] user pgtable: 4k pages, 48-bit VAs, pgdp=000000010a70a000
[ 8.814479] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
[ 8.814490] Internal error: Oops: 96000044 [#1] PREEMPT SMP
[ 8.814494] Modules linked in: can_raw nvgpu can nvmap ip_tables x_tables
[ 8.814517] CPU: 2 PID: 7 Comm: kworker/u12:0 Not tainted 5.10.104-tegra #1
[ 8.814520] Hardware name: Unknown NVIDIA Jetson Xavier NX Developer Kit/NVIDIA Jetson Xavier NX Developer Kit, BIOS r35.0-121deda0 07/08/2022
[ 8.814535] Workqueue: events_unbound async_run_entry_fn
[ 8.814541] pstate: 40c00009 (nZcv daif +PAN +UAO -TCO BTYPE=–)
[ 8.814548] pc : __memset+0x16c/0x188
[ 8.814554] lr : __dma_alloc_from_coherent+0xac/0x140
[ 8.814556] sp : ffff800010083a70
[ 8.814563] x29: ffff800010083a70 x28: ffff28bc9b610000
[ 8.910009] x27: ffff28bc9b611e00 x26: ffffc1c5c1f8f578
[ 8.910016] x25: 0000000000000008 x24: ffffc1c5c1d6ee60
[ 8.910023] x23: 0000000000000000 x22: ffff28bc9b46d028
[ 8.910028] x21: ffff800010083b80 x20: 00000000000a3000
[ 8.910036] x19: 0000000000000000 x18: 0000000000000001
[ 8.910042] x17: 0000000000008938 x16: ffffc1c5fc18d410
[ 8.910048] x15: ffff28bc848013f0 x14: ffffffffffffffff
[ 8.948583] x13: ffff28bc9af89d88 x12: 0000000000000100
[ 8.948592] x11: 000000000002a000 x10: 0000000000000100
[ 8.948599] x9 : 0000000000000000 x8 : 0000000000000000
[ 8.964684] x7 : 0000000000000000 x6 : 000000000000003f
[ 8.964693] x5 : 0000000000000040 x4 : 0000000000000000
[ 8.964699] x3 : 0000000000000004 x2 : 00000000000a2fc0
[ 8.980786] x1 : 0000000000000000 x0 : 0000000000000000
[ 8.980795] Call trace:
[ 8.980805] __memset+0x16c/0x188
[ 8.980812] dma_alloc_from_dev_coherent+0x48/0x80
[ 8.980816] dma_alloc_attrs+0x64/0xf0
[ 8.981059] gk20a_tegra_init_secure_alloc+0x64/0x100 [nvgpu]
[ 8.981293] gv11b_tegra_late_probe+0x20/0x30 [nvgpu]
[ 9.011446] nvgpu_probe+0x6d0/0x930 [nvgpu]
[ 9.011620] gk20a_probe+0x628/0x810 [nvgpu]
[ 9.020075] platform_drv_probe+0x58/0xb0
[ 9.020105] really_probe+0xf4/0x3d0
[ 9.020115] driver_probe_device+0x5c/0xc0
[ 9.031537] __driver_attach_async_helper+0x64/0x70
[ 9.031545] async_run_entry_fn+0x48/0x150
[ 9.031551] process_one_work+0x1c0/0x4a0
[ 9.031555] worker_thread+0x50/0x420
[ 9.031565] kthread+0x148/0x170
[ 9.051570] ret_from_fork+0x10/0x18
[ 9.051602] Code: 91010108 54ffff4a 8b040108 cb050042 (d50b7428)
[ 9.061283] —[ end trace 17f5044bf53b2d2c ]—
[ 9.061289] Kernel panic - not syncing: Oops: Fatal exception
Could you please help to check what’s wrong? Thanks.

hello weileng,

here’s the failure.

may I know all the details you’ve built the kernel, and also the steps to update the kernel image.
thanks

Hello Jerry

we used the default tegra defconfig as follows
make ARCH=arm64 O=${TEGRA_KERNEL_OUT} tegra_defconfig
it will generate Image.

Using the image to replace boot/Image as follows.
./Linux_for_Tegra/rootfs/boot/Image

kernel.log (140.4 KB)
Attached kernel log.

Do you still have the default kernel? If so, start with its “/proc/config.gz” instead of “tegra_defconfig”. There are many differences in 5.x between what it ships with and tegra_defconfig.

hello weileng,

please refer to developer guide, Building the Kernel.
have you installed the Jetson Linux build utilities? i.e. $ sudo apt install build-essential bc
please use the script file to build the kernel, there’s nvbuild.sh which help you to build kernel sources in the directory.
thanks

Thanks for your replay. I have tried to replace /proc/config.gz to tegra_defconfig, such issus still happened. If I used the original Image from JP5.0, the kernel can bring up.

Hi Jerry,

Prevouis we build JP4.6.1 used this method has no such kerne brings up. This issue happened on R32.5 early access v2.

hello weileng,

please refer to JetPack SDK | NVIDIA Developer.
could you please double confirm the release version, is it l4t-r34.1.1/JetPack-5.0.1 DP?

you may try below configuration and build the kernel again,

$ export TEGRA_KERNEL_OUT=$TOP/Orin+Xavier_R34.1.1_Build/Orin-out-0704
$ export CROSS_COMPILE_AARCH64=$TOP/CROSS_COMPILE/Toolchain_gcc_9.3/bin/aarch64-buildroot-linux-gnu-
$ cd Linux_for_Tegra/source/public
$ ./nvbuild.sh -o $TEGRA_KERNEL_OUT

here show the download links.
R34.1.1 public_sources, https://developer.nvidia.com/embedded/l4t/r34_release_v1.1/sources/public_sources.tbz2
GCC-9.3 toolchain, https://developer.nvidia.com/embedded/jetson-linux/bootlin-toolchain-gcc-93

From release notes, the workaround is workable as follows:

Refer to the Jetson-Linux 34.1.1 Developer Guide for more information about toolchain and
steps to compile the kernel sources. BSP kernel sources have a known issue where the
insmod of the nvgpu.ko that was compiled from the released EA sources leads to a system
crash.
Workaround
Make the following changes that are displayed in bold:
— a/kernel/nvgpu/drivers/gpu/nvgpu/Makefile.linux.configs
+++ b/kernel/nvgpu/drivers/gpu/nvgpu/Makefile.linux.configs
@@ -1,6 +1,10 @@

Turn off all other configs, if CONFIG_GK20A is not set

CONFIG_GK20A := m
+NV_BUILD_KERNEL_OPTIONS := 5.10
+

Enable the nv_sched build.

CONFIG_NVS_PRESENT := y
/build command/

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.