mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-07 11:50:24 +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
@ -16,8 +16,10 @@
|
|||||||
#include <kernel/thread.h>
|
#include <kernel/thread.h>
|
||||||
|
|
||||||
enum Cpu_exception {
|
enum Cpu_exception {
|
||||||
PAGE_FAULT = 0x0e,
|
PAGE_FAULT = 0x0e,
|
||||||
SUPERVISOR_CALL = 0x80,
|
SUPERVISOR_CALL = 0x80,
|
||||||
|
INTERRUPTS_START = 0x20,
|
||||||
|
INTERRUPTS_END = 0xff,
|
||||||
};
|
};
|
||||||
|
|
||||||
using namespace Kernel;
|
using namespace Kernel;
|
||||||
@ -38,6 +40,9 @@ void Thread::exception(unsigned const cpu)
|
|||||||
if (trapno == SUPERVISOR_CALL) {
|
if (trapno == SUPERVISOR_CALL) {
|
||||||
_call();
|
_call();
|
||||||
return;
|
return;
|
||||||
|
} else if (trapno >= INTERRUPTS_START && trapno <= INTERRUPTS_END) {
|
||||||
|
_interrupt(cpu);
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
PWRN("unknown exception 0x%lx", trapno);
|
PWRN("unknown exception 0x%lx", trapno);
|
||||||
_stop();
|
_stop();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user