mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-19 03:06:39 +00:00
hw_x86_64: Forward interrupts to _interrupt function
Extend the Thread::exception function to forward external interrupts to the _interrupt function for processing.
This commit is contained in:
parent
d0024e1893
commit
2ecdf4f729
@ -18,6 +18,8 @@
|
||||
enum Cpu_exception {
|
||||
PAGE_FAULT = 0x0e,
|
||||
SUPERVISOR_CALL = 0x80,
|
||||
INTERRUPTS_START = 0x20,
|
||||
INTERRUPTS_END = 0xff,
|
||||
};
|
||||
|
||||
using namespace Kernel;
|
||||
@ -38,6 +40,9 @@ void Thread::exception(unsigned const cpu)
|
||||
if (trapno == SUPERVISOR_CALL) {
|
||||
_call();
|
||||
return;
|
||||
} else if (trapno >= INTERRUPTS_START && trapno <= INTERRUPTS_END) {
|
||||
_interrupt(cpu);
|
||||
return;
|
||||
} else {
|
||||
PWRN("unknown exception 0x%lx", trapno);
|
||||
_stop();
|
||||
|
Loading…
Reference in New Issue
Block a user