hw_x86_64: Add virt_base paramater to Idt::setup function

Use parameter instead of class member variable because it would get
stored into the mtc region otherwise. In a further iteration only the
actual IDT should be saved into the mtc, not the complete class
instance. Currently the class instance size is equal to the IDT table
size.
This commit is contained in:
Reto Buerki 2015-02-27 11:26:18 +01:00 committed by Christian Helmuth
parent 1102b2b562
commit a5efe04656
3 changed files with 5 additions and 3 deletions

View File

@ -52,7 +52,7 @@ class Genode::Cpu
{
if (primary_id() == executing_id()) {
_idt = new (&_mt_idt) Idt();
_idt->setup();
_idt->setup(Cpu::exception_entry);
_tss = new (&_mt_tss) Tss();
_tss->load();

View File

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

View File

@ -8,7 +8,7 @@ extern int _mt_idt;
using namespace Genode;
void Idt::setup()
void Idt::setup(addr_t const virt_base)
{
/* TODO: Calculate from _mt_isrs label */
uint64_t base = 0;