hw_x86_64: fix kernel stack initialization

Fix #1533
This commit is contained in:
Stefan Kalkowski 2015-05-20 13:55:03 +02:00 committed by Christian Helmuth
parent 197be2602f
commit 4431ab7354
2 changed files with 14 additions and 2 deletions

View File

@ -234,8 +234,13 @@ extern "C" void kernel()
Kernel::Cpu_context::Cpu_context(Genode::Translation_table * const table)
{
_init(STACK_SIZE, (addr_t)table);
sp = (addr_t)kernel_stack;
ip = (addr_t)kernel;
core_pd()->admit(this);
/*
* platform specific initialization, has to be done after
* setting the registers by now
*/
_init(STACK_SIZE, (addr_t)table);
}

View File

@ -87,7 +87,14 @@ void Thread::_mmu_exception()
*************************/
void Kernel::Cpu_context::_init(size_t const stack_size, addr_t const table)
{ }
{
/*
* the stack pointer already contains the stack base address
* of all CPU's kernel stacks, on this uni-processor platform
* it is sufficient to increase it by the stack's size
*/
sp = sp + stack_size;
}
/*************************