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:
parent
15d131b723
commit
9c44d32dd9
|
@ -58,7 +58,7 @@ class Genode::Cpu
|
||||||
_tss->load();
|
_tss->load();
|
||||||
}
|
}
|
||||||
_idt->load(Cpu::exception_entry);
|
_idt->load(Cpu::exception_entry);
|
||||||
_tss->setup();
|
_tss->setup(Cpu::exception_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr addr_t exception_entry = 0x0; /* XXX */
|
static constexpr addr_t exception_entry = 0x0; /* XXX */
|
||||||
|
|
|
@ -35,8 +35,10 @@ class Genode::Tss
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup 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.
|
* Load TSS into TR.
|
||||||
|
|
|
@ -4,7 +4,7 @@ using namespace Genode;
|
||||||
|
|
||||||
extern char kernel_stack[];
|
extern char kernel_stack[];
|
||||||
|
|
||||||
void Tss::setup()
|
void Tss::setup(addr_t const virt_base)
|
||||||
{
|
{
|
||||||
this->rsp0 = (addr_t)kernel_stack;
|
this->rsp0 = (addr_t)kernel_stack;
|
||||||
this->rsp1 = (addr_t)kernel_stack;
|
this->rsp1 = (addr_t)kernel_stack;
|
||||||
|
|
Loading…
Reference in New Issue