AARCH64 stack initialisation fails with newlib for qemu_cortex_a53 #42224
Replies: 10 comments
-
@carlocaione It looks like something happens when |
Beta Was this translation helpful? Give feedback.
-
Looks like when __init_sys_init_malloc_prepare0 begins in user space initialization phase , it is stuck forever. @stephanosio Should I disable the CONFIG_INIT_STACKS ? |
Beta Was this translation helpful? Give feedback.
-
I have tested this with both There seems to be an underlying arch port-level issue that is causing this (maybe yet another linker script alignment-related issue?). I do not have the bandwidth to analyse and fix this at the moment. I might get back to it later if this does not get resolved in time. Meanwhile, please provide a proper instruction and/or branch we can use to reproduce this. |
Beta Was this translation helpful? Give feedback.
-
Hello @stephanosio Thank you for your time. I have figured out where exactly the kernel_panic is called. It is being called from "zephyrproject_arm/zephyr/arch/arm64/core/mmu.c:48" . The arch_mem_map is unable to map memory. These are the parameters of the function: These are the critical memory configs I am using freshly downloaded Zephyr as of 02/24/2022 using updated using "west update". Requesting your kind help. |
Beta Was this translation helpful? Give feedback.
-
Hello @carlocaione @stephanosio A small update , I increased the CONFIG_MAX_XLAT_TABLES to 4096 and the above trap went off. I then went on and found another trapping location. The memset is unable to access the memory. Meaning the mapping has not ben properly updated. Looks like the mapping in arm64 needs some change. Experts please weigh in. |
Beta Was this translation helpful? Give feedback.
-
uhm, something is wrong with A53 + newlib libc. Also
Not sure if related but that would be a nice coincidence. |
Beta Was this translation helpful? Give feedback.
-
This is an interesting bug. At least for the problem I reported the problem is that In particular what's returning
The In particular in |
Beta Was this translation helpful? Give feedback.
-
This also happens with |
Beta Was this translation helpful? Give feedback.
-
Closing this in favour of #42184 since that is the root issue. |
Beta Was this translation helpful? Give feedback.
-
@AshwinKrishn FYI, #42184 (comment) Try doing a clean (pristine) build after configuration changes and see if that helps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Unable to use newlib with qemu_cortex_a53. When using minilib things work fine. The moment I change to newlib, the booting fails.
Please also mention any information which could help others to understand
the problem you're facing:
To Reproduce
Steps to reproduce the behavior:
prj.conf
CONFIG_STACK_CANARIES=n
CONFIG_INIT_STACKS=y
CONFIG_USERSPACE=y
CONFIG_TEST_USERSPACE=y
west build -b qemu_cortex_a53 blackscholes_arm/ -DCMAKE_VERBOSE_MAKEFILE=ON
west build -t run
Expected behavior
Must be able to boot successfully.
Impact
Unable to test my main work because the work requires math functions and minimal lib does not provide. Newlib provides math functions.
Logs and console output
The boot up just freezes. It gets stuck in SCV trap.
Environment (please complete the following information):
Additional context
prj.conf said as above.
Beta Was this translation helpful? Give feedback.
All reactions