I’m trying to get seL4 running on an NVIDIA Jetson Nano and trying to get the stock sel4test project running as a first step. The Nano is very similar to the TX1 (they use the same TRM but the Linux device trees appear to be slightly different). I have the same issue (described below) whether I use the tx1 platform or the new nvnano platform I created (following the steps in the porting instructions and using a new dts and the existing tx1 implementation as a template).
The boot process makes it through the elfloader, and control is successfully passed off to the kernel, but during the execution of create_initial_thread
, the following function call leads to an assertion failure:
cteInsert(
root_cnode_cap,
SLOT_PTR(pptr_of_cap(root_cnode_cap), seL4_CapInitThreadCNode),
SLOT_PTR(rootserver.tcb, tcbCTable)
);
The assertion triggered is in cteInsert
in cnode.c
:
/* Haskell error: "cteInsert to non-empty destination" */
assert(cap_get_capType(destSlot->cap) == cap_null_cap);
destSlot
is the third argument to the function, so rootserver.tcb
, which is initialized earlier in create_rootserver_objects
.
I think I’m working with something that’s close to a supported platform for which verification is in progress (AARCH64 via the TX2), so I’m guessing this is signalling that something is still wrong with my platform configuration, but I’m running low on ideas about what that could be since this is still very early startup, so I thought I’d see if this is something anyone else has seen before, or if there are any suggestions of areas to look at to try and track down what could be setting that memory unexpectedly.
Here’s the startup debug serial output from U-Boot until the failure:
U-Boot 2020.04-g46e4604c78 (Jul 26 2021 - 12:09:42 -0700)
SoC: tegra210
Model: NVIDIA Jetson Nano 2GB Developer Kit
Board: NVIDIA P3541-0000
DRAM: 2 GiB
MMC: sdhci@700b0000: 1, sdhci@700b0600: 0
Loading Environment from SPI Flash... SF: Detected mx25u3235f with page size 256 Bytes, erase size 4 KiB, total 4 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: No ethernet found.
Hit any key to stop autoboot: 0
Tegra210 (P3541-0000) # fatload mmc 1 0x82000000 sel4test-driver-image-arm-nvnano
5210384 bytes read in 249 ms (20 MiB/s)
Tegra210 (P3541-0000) # go 0x82000000
## Starting application at 0x82000000 ...
ELF-loader started on CPU: ARM Ltd. Cortex-A57 r1p1
paddr=[80a57000..80f4f10f]
No DTB passed in from boot loader.
Looking for DTB in CPIO archive...found at 80b7f900.
Loaded DTB from 80b7f900.
paddr=[8023f000..80253fff]
ELF-loading image 'kernel' to 80000000
paddr=[80000000..8023efff]
vaddr=[ffffff8080000000..ffffff808023efff]
virt_entry=ffffff8080000000
ELF-loading image 'sel4test-driver' to 80254000
paddr=[80254000..8065afff]
vaddr=[400000..806fff]
virt_entry=40f0b8
Enabling MMU and paging
Jumping to kernel-image entry point...
Bootstrapping kernel
seL4 failed assertion 'cap_get_capType(destSlot->cap) == cap_null_cap' at /home/eleanor/work/kernel/src/object/cnode.c:426 in function cteInsert
halting...
Kernel entry via Interrupt, irq 0