mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Update crash keyboard driver
This commit is contained in:
parent
85c0de688d
commit
3b65386399
@ -111,7 +111,7 @@ namespace CrashHandler
|
|||||||
outb(0xA1, 0xFF);
|
outb(0xA1, 0xFF);
|
||||||
#endif // defined(a86)
|
#endif // defined(a86)
|
||||||
|
|
||||||
CPU::Interrupts(CPU::Enable); // Just to be sure.
|
CPU::Interrupts(CPU::Enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
CrashKeyboardDriver::~CrashKeyboardDriver()
|
CrashKeyboardDriver::~CrashKeyboardDriver()
|
||||||
@ -176,19 +176,14 @@ namespace CrashHandler
|
|||||||
Display->Print((char)key, SBIdx);
|
Display->Print((char)key, SBIdx);
|
||||||
BackSpaceLimit++;
|
BackSpaceLimit++;
|
||||||
}
|
}
|
||||||
Display->SetBuffer(SBIdx); // Update as we type.
|
Display->SetBuffer(SBIdx); /* Update as we type. */
|
||||||
}
|
}
|
||||||
#endif // a64 || a32
|
#endif // a64 || a32
|
||||||
}
|
}
|
||||||
|
|
||||||
SafeFunction void HookKeyboard()
|
SafeFunction void HookKeyboard()
|
||||||
{
|
{
|
||||||
CrashKeyboardDriver kbd; // We don't want to allocate memory.
|
CrashKeyboardDriver kbd; /* We don't want to allocate memory. */
|
||||||
#if defined(a86)
|
CPU::Halt(true);
|
||||||
asmv("KeyboardHookLoop: nop; jmp KeyboardHookLoop;");
|
|
||||||
#elif defined(aa64)
|
|
||||||
asmv("KeyboardHookLoop: nop; b KeyboardHookLoop;");
|
|
||||||
#endif
|
|
||||||
// CPU::Halt(true); // This is an infinite loop.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user