-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Today, I pulled and synchronized the latest NuttX, but after successfully compiling it, I found that it failed to run. Through the process of bisecting, the issue was ultimately pinpointed to Pull Request #15437
These are the outcomes of my tests on the ZCU111 board regarding the jtag and nsh configurations:
Description / Steps to reproduce the issue
JTAG:
1 tools/configure.sh zcu111:jtag
2 make
3 download to the ZCU111 by JTAG and run:
- Ready to Boot Primary CPU
- Boot from EL3
- Boot to C runtime for OS Initialize
nx_start: Entry
up_allocate_heap: heap_start=0x0x1b6000, heap_size=0x7fd4a000
gic_validate_dist_version: GICv2 detected
arm64_exception_handler: CurrentEL: MODE_EL3
arm64_exception_handler: ESR_ELn: 0x9a000000
arm64_exception_handler: FAR_ELn: 0x1130278421201907
arm64_exception_handler: ELR_ELn: 0x189284
print_ec_cause: SP Alignment
print_ec_cause: SP alignment fault exception
dump_assert_info: Current Version: NuttX 10.2.0 d22e6d7489-dirty Feb 3 2025 14:58:41
dump_assert_info: Assertion failed panic: at file: common/arm64_fatal.c:572 tas8
up_dump_register: stack = 0x1b4590
up_dump_register: x0: 0x8 x1: 0x1ad360
up_dump_register: x2: 0x8 x3: 0x2
up_dump_register: x4: 0x11ce50 x5: 0x1b6398
up_dump_register: x6: 0xe80e300a92404231 x7: 0x115f2a882441f401
up_dump_register: x8: 0xe87aa41a1403000d x9: 0x4000c01640681404
up_dump_register: x10: 0x801a589c11200f07 x11: 0x844000d124244195
up_dump_register: x12: 0x9cb48130485458d7 x13: 0x857d0d0430d89326
up_dump_register: x14: 0x32504a0c66650520 x15: 0xff000000
up_dump_register: x16: 0x2470010282020ec1 x17: 0x99ae11ed219421c1
up_dump_register: x18: 0x857d0d0430d89310 x19: 0x44b40228d801404
up_dump_register: x20: 0x40b3692634057008 x21: 0x387030af24609919
up_dump_register: x22: 0x48088006128e49c3 x23: 0x100064
up_dump_register: x24: 0x1b4cb0 x25: 0x101c30
up_dump_register: x26: 0x2d5119104944c158 x27: 0x70ea896aa3521102
up_dump_register: x28: 0xf0fc07a8100183ce x29: 0x1b4c40
up_dump_register: x30: 0x106800
up_dump_register:
up_dump_register: STATUS Registers:
up_dump_register: SPSR: 0x800003cd
up_dump_register: ELR: 0x189284
up_dump_register: SP_EL0: 0x1b4cb0
up_dump_register: SP_ELX: 0x1b48c8
up_dump_register: EXE_DEPTH: 0x0
up_dump_register: SCTLR_EL1: 0xc52838
sched_dumpstack: backtrace| 0: 0x0000000000189284 0x000000000010522c 0x000000000
dump_tasks: PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK D
dump_tasks: ---- --- --- -------- ------- --- ------- ---------- ----------q
dump_task: 0 0 0 FIFO Kthread - Running 0000000000k
sched_dumpstack: backtrace| 0: 0x0000000000189284 0x000000000010522c 0x000000000
nsh:
1 tools/configure.sh zcu111:nsh
2 make
3 flash to the QSPI flash of ZCU111 and boot:
NOTICE: BL31: Built : 09:38:30, Dec 20 2024
- Ready to Boot Primary CPU
- Boot from EL1
- Boot to C runtime for OS Initialize
psc��_start: Entry
up_allocate_heap: heap_start=0x0x156000, heap_size=0x7fdaa000
gic_validate_dist_version: GICv2 detected
uart_registerarm64_el1_exception_handler: 64-bit el1h sync, esr = 0x26
arm64_exception_handler: CurrentEL: MODE_EL1
arm64_exception_handler: ESR_ELn: 0x9a000000
arm64_exception_handler: FAR_ELn: 0x0
arm64_exception_handler: ELR_ELn: 0x132284
print_ec_cause: SP Alignment
print_ec_cause: SP alignment fault exception
dump_assert_info: Current Version: NuttX 10.2.0 e5e9032ea0-dirty Feb 3 2025 14
dump_assert_info: Assertion failed panic: at file: common/arm64_fatal.c:572 tas0
up_dump_register: stack = 0x1552e0
up_dump_register: x0: 0xff000030 x1: 0x72
up_dump_register: x2: 0x141010 x3: 0x120edc
up_dump_register: x4: 0x155ad0 x5: 0x155c90
up_dump_register: x6: 0x1503b0 x7: 0x74
up_dump_register: x8: 0xa00 x9: 0x88
up_dump_register: x10: 0x3 x11: 0xffffc363
up_dump_register: x12: 0x4 x13: 0x145000
up_dump_register: x14: 0x156000 x15: 0x143000
up_dump_register: x16: 0x1332d4 x17: 0x1
up_dump_register: x18: 0xfffffff7 x19: 0x72
up_dump_register: x20: 0x240 x21: 0xd
up_dump_register: x22: 0x135602 x23: 0x108a4c
up_dump_register: x24: 0x0 x25: 0x155b38
up_dump_register: x26: 0x135602 x27: 0xd
up_dump_register: x28: 0x0 x29: 0x155950
up_dump_register: x30: 0x108a90
up_dump_register:
up_dump_register: STATUS Registers:
up_dump_register: SPSR: 0x3c5
up_dump_register: ELR: 0x132284
up_dump_register: SP_EL0: 0x155d40
up_dump_register: SP_ELX: 0x155618
up_dump_register: EXE_DEPTH: 0x0
sched_dumpstack: backtrace| 0: 0x0000000000132284 0x000000000012e498 0x000000000
sched_dumpstack: backtrace| 0: 0x000000000010aaa8 0x0000000000107e9c 0x000000004
dump_tasks: PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK D
dump_tasks: ---- --- --- -------- ------- --- ------- ---------- ----------q
dump_task: 0 0 0 FIFO Kthread - Running 0000000000k
sched_dumpstack: backtrace| 0: 0x0000000000132284 0x000000000012e498 0x000000000
sched_dumpstack: backtrace| 0: 0x000000000010aaa8 0x0000000000107e9c 0x000000004
The pull request #15437 changes ARM64_CONTEXT_REGS from 36 to 37, resulting in the stack no longer being 16-byte aligned, which appears to violate the ARMv8-A architecture's requirement for 16-byte stack alignment.
On which OS does this issue occur?
[OS: Linux]
What is the version of your OS?
ubuntu22.04
NuttX Version
Current Version: NuttX 10.2.0 d22e6d7-dirty Feb 3 2025 14:58:41 arm64
Issue Architecture
[Arch: arm64]
Issue Area
[Area: Board support]
Host information
file sysinfo.h not exists
Traceback (most recent call last):
File "/home/zouboan/d/FeedForward/nuttx/tools/host_info_dump.py", line 575, in
header = generate_header(args)
File "/home/zouboan/d/FeedForward/nuttx/tools/host_info_dump.py", line 466, in generate_header
sys.path.append(os.path.abspath(vendor_specific_module_path))
UnboundLocalError: local variable 'vendor_specific_module_path' referenced before assignment
make: *** [tools/Unix.mk:644: host_info] Error 1
Verification
- I have verified before submitting the report.