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:
parent
1102b2b562
commit
a5efe04656
|
@ -52,7 +52,7 @@ class Genode::Cpu
|
||||||
{
|
{
|
||||||
if (primary_id() == executing_id()) {
|
if (primary_id() == executing_id()) {
|
||||||
_idt = new (&_mt_idt) Idt();
|
_idt = new (&_mt_idt) Idt();
|
||||||
_idt->setup();
|
_idt->setup(Cpu::exception_entry);
|
||||||
|
|
||||||
_tss = new (&_mt_tss) Tss();
|
_tss = new (&_mt_tss) Tss();
|
||||||
_tss->load();
|
_tss->load();
|
||||||
|
|
|
@ -43,8 +43,10 @@ class Genode::Idt
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup 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.
|
* Load IDT into IDTR.
|
||||||
|
|
|
@ -8,7 +8,7 @@ extern int _mt_idt;
|
||||||
using namespace Genode;
|
using namespace Genode;
|
||||||
|
|
||||||
|
|
||||||
void Idt::setup()
|
void Idt::setup(addr_t const virt_base)
|
||||||
{
|
{
|
||||||
/* TODO: Calculate from _mt_isrs label */
|
/* TODO: Calculate from _mt_isrs label */
|
||||||
uint64_t base = 0;
|
uint64_t base = 0;
|
||||||
|
|
Loading…
Reference in New Issue