2 #include <sys/i386_intr.h>
4 #include "sys/x86_isa.h"
6 #include "sys/x86_isa.h"
8 #include <lunaix/generic/isrm.h>
9 #include <lunaix/mm/vmm.h>
10 #include <lunaix/process.h>
11 #include <lunaix/sched.h>
12 #include <lunaix/syslog.h>
17 update_thread_context(struct hart_state* state)
19 if (!current_thread) {
23 struct hart_state* parent = current_thread->hstate;
24 hart_push_state(parent, state);
25 current_thread->hstate = state;
28 state->depth = parent->depth + 1;
33 intr_handler(struct hart_state* state)
35 update_thread_context(state);
37 volatile struct exec_param* execp = state->execp;
38 if (execp->vector <= 255) {
39 isr_cb subscriber = isrm_get(execp->vector);
44 ERROR("INT %u: (%x) [%p: %p] Unknown",
52 if (execp->vector > IV_BASE_END) {
53 isrm_notify_eoi(0, execp->vector);