"Core" thread doesn't become active in kernel initialization
Martin Stein
martin.stein at ...1...
Thu Jul 2 11:46:16 CEST 2015
Hi Bob,
On 01.07.2015 21:42, Bob Stewart wrote:
> Once the Core_thread singleton is
> created the last printf output that appears is one I inserted after the
> call to to _become_active() in the constructor. A printf inserted into
> the singleton method after the Core_thread creation never shows up on
> the console. The initialization never completes.
This might be caused by a stack corruption. I would check whether the
stack pointer (insert [1] after _become_active()) is inside the
kernel_stack array (constraints via [2]). If the AM437x's hardware
CPU-ID of your CPU is not 0, this might be a problem as this value is
used to index CPU local data like the kernel stack. Another problem
might be the CXA guard stuff that Stefan mentioned. Additional to
Stefans suggestions you can try to prevent CXA guards by replacing [3]
with [4]. This way, you can easily validate the assumption before
digging deeper into it.
Cheers,
Martin
[1]
int i = 0; PINF("SP %p", &i);
[2]
/usr/local/genode-gcc/bin/genode-arm-nm bin/core | grep "kernel_stack$"
grep -r "KERNEL_STACK_SIZE =" base-hw/
[3]
Thread & Core_thread::singleton() {
static Core_thread ct;
return ct; }
[4]
#include <unmanaged_singleton.h>
Thread & Core_thread::singleton() {
return *unmanaged_singleton<Core_thread>(); }
More information about the users
mailing list