|
|
|
|
@ -10,9 +10,11 @@
|
|
|
|
|
#include "../device/ps2controller.h"
|
|
|
|
|
|
|
|
|
|
#include "../sync/ticketlock.h"
|
|
|
|
|
#include "../arch/core_interrupt.h"
|
|
|
|
|
#include "epilogues.h"
|
|
|
|
|
#include "guard.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Key kout_key = Key();
|
|
|
|
|
|
|
|
|
|
void printContext(const InterruptContext *context) {
|
|
|
|
|
@ -77,6 +79,7 @@ void handle_keyboard() {
|
|
|
|
|
LAPIC::endOfInterrupt();
|
|
|
|
|
if (kout_key.ctrl() && kout_key.alt() && kout_key.scancode == Key::KEY_DEL)
|
|
|
|
|
System::reboot();
|
|
|
|
|
|
|
|
|
|
Guard::relay(Epilogues::keyboard);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
@ -98,6 +101,7 @@ void handle_keyboard() {
|
|
|
|
|
[[gnu::interrupt]] void handle_assassin(InterruptContext *context) {
|
|
|
|
|
(void)context;
|
|
|
|
|
LAPIC::endOfInterrupt();
|
|
|
|
|
DBG << "assassin handler\n"<< endl;
|
|
|
|
|
Guard::relay(Epilogues::assassin);
|
|
|
|
|
}
|
|
|
|
|
[[gnu::interrupt]] void handle_wakeup(InterruptContext *context) {
|
|
|
|
|
@ -126,6 +130,8 @@ void initInterruptHandlers() {
|
|
|
|
|
IDT::InterruptDescriptor::Returning(handle_keyboard_asm));
|
|
|
|
|
IDT::set(Core::Interrupt::Vector::TIMER,
|
|
|
|
|
IDT::InterruptDescriptor::Returning(handle_timer));
|
|
|
|
|
IDT::set(Core::Interrupt::Vector::ASSASSIN,
|
|
|
|
|
IDT::InterruptDescriptor::Returning(handle_assassin));
|
|
|
|
|
// Load the idt pointer
|
|
|
|
|
IDT::load();
|
|
|
|
|
}
|
|
|
|
|
|