hw_x86_64: Add virt_base paramater to Tss::setup function

The stack pointers (RSP) for privilege levels 0-2 must be setup using an
address in the mtc region to make stack switching work for non-core
threads.
This commit is contained in:
Reto Buerki 2015-02-27 11:47:26 +01:00 committed by Christian Helmuth
parent 15d131b723
commit 9c44d32dd9
3 changed files with 5 additions and 3 deletions

View File

@ -58,7 +58,7 @@ class Genode::Cpu
_tss->load();
}
_idt->load(Cpu::exception_entry);
_tss->setup();
_tss->setup(Cpu::exception_entry);
}
static constexpr addr_t exception_entry = 0x0; /* XXX */

View File

@ -35,8 +35,10 @@ class Genode::Tss
/**
* Setup TSS.
*
* \param virt_base virtual base address of mode transition pages
*/
void setup();
void setup(addr_t const virt_base);
/**
* Load TSS into TR.

View File

@ -4,7 +4,7 @@ using namespace Genode;
extern char kernel_stack[];
void Tss::setup()
void Tss::setup(addr_t const virt_base)
{
this->rsp0 = (addr_t)kernel_stack;
this->rsp1 = (addr_t)kernel_stack;