mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
parent
1da71afbf3
commit
dc1996d289
@ -26,7 +26,7 @@ namespace Board {
|
||||
|
||||
using namespace Hw::Imx6q_sabrelite_board;
|
||||
|
||||
class Global_interrupt_controller { };
|
||||
class Global_interrupt_controller { public: void init() {} };
|
||||
class Pic : public Hw::Gicv2 { public: Pic(Global_interrupt_controller &) { } };
|
||||
|
||||
using L2_cache = Hw::Pl310;
|
||||
|
@ -26,7 +26,7 @@ namespace Board {
|
||||
|
||||
using namespace Hw::Nit6_solox_board;
|
||||
|
||||
class Global_interrupt_controller { };
|
||||
class Global_interrupt_controller { public: void init() {} };
|
||||
class Pic : public Hw::Gicv2 { public: Pic(Global_interrupt_controller &) { } };
|
||||
|
||||
using L2_cache = Hw::Pl310;
|
||||
|
@ -26,7 +26,7 @@ namespace Board {
|
||||
|
||||
using namespace Hw::Pbxa9_board;
|
||||
|
||||
class Global_interrupt_controller { };
|
||||
class Global_interrupt_controller { public: void init() {} };
|
||||
class Pic : public Hw::Gicv2 { public: Pic(Global_interrupt_controller &) { } };
|
||||
|
||||
L2_cache & l2_cache();
|
||||
|
@ -29,7 +29,7 @@ namespace Board {
|
||||
|
||||
using L2_cache = Hw::Pl310;
|
||||
|
||||
class Global_interrupt_controller { };
|
||||
class Global_interrupt_controller { public: void init() {} };
|
||||
class Pic : public Hw::Gicv2 { public: Pic(Global_interrupt_controller &) { } };
|
||||
|
||||
L2_cache & l2_cache();
|
||||
|
@ -144,6 +144,7 @@ void Kernel::main_initialize_and_handle_kernel_entry()
|
||||
kernel_initialized = false;
|
||||
|
||||
Main::_instance->_serial.init();
|
||||
Main::_instance->_global_irq_ctrl.init();
|
||||
}
|
||||
|
||||
nr_of_initialized_cpus ++;
|
||||
|
@ -27,7 +27,7 @@ namespace Board {
|
||||
struct Vm_page_table {};
|
||||
struct Vm_page_table_array {};
|
||||
|
||||
class Global_interrupt_controller { };
|
||||
class Global_interrupt_controller { public: void init() {} };
|
||||
struct Pic : Hw::Pic { struct Virtual_context {}; Pic(Global_interrupt_controller &) { } };
|
||||
struct Vcpu_context { Vcpu_context(Kernel::Cpu &) {} };
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
namespace Board {
|
||||
|
||||
class Global_interrupt_controller { };
|
||||
class Global_interrupt_controller { public: void init() {} };
|
||||
class Pic;
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
namespace Board {
|
||||
|
||||
class Global_interrupt_controller { };
|
||||
class Global_interrupt_controller { public: void init() {} };
|
||||
class Pic;
|
||||
};
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
namespace Board {
|
||||
|
||||
class Global_interrupt_controller { };
|
||||
class Global_interrupt_controller { public: void init() {} };
|
||||
class Pic;
|
||||
}
|
||||
|
||||
|
@ -246,17 +246,24 @@ Global_interrupt_controller::Global_interrupt_controller()
|
||||
_irq_mode[i].trigger_mode = TRIGGER_LEVEL;
|
||||
_irq_mode[i].polarity = POLARITY_LOW;
|
||||
}
|
||||
|
||||
/* remap all IRQs managed by I/O APIC */
|
||||
if (i < _irte_count) {
|
||||
Irte::access_t irte = _create_irt_entry(i);
|
||||
write<Ioregsel>(IOREDTBL + 2 * i + 1);
|
||||
write<Iowin>((Iowin::access_t)(irte >> Iowin::ACCESS_WIDTH));
|
||||
write<Ioregsel>(IOREDTBL + 2 * i);
|
||||
write<Iowin>((Iowin::access_t)(irte));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
void Global_interrupt_controller::init()
|
||||
{
|
||||
/* remap all IRQs managed by I/O APIC */
|
||||
for (unsigned i = 0; i < _irte_count; i++)
|
||||
{
|
||||
Irte::access_t irte = _create_irt_entry(i);
|
||||
write<Ioregsel>(IOREDTBL + 2 * i + 1);
|
||||
write<Iowin>((Iowin::access_t)(irte >> Iowin::ACCESS_WIDTH));
|
||||
write<Ioregsel>(IOREDTBL + 2 * i);
|
||||
write<Iowin>((Iowin::access_t)(irte));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Global_interrupt_controller::toggle_mask(unsigned const vector,
|
||||
|
@ -114,6 +114,8 @@ class Board::Global_interrupt_controller : public Genode::Mmio
|
||||
|
||||
Global_interrupt_controller();
|
||||
|
||||
void init();
|
||||
|
||||
/**
|
||||
* Set/unset mask bit of IRTE for given vector
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user