mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 23:39:20 +00:00
Enable compilation of project on AArch64 architecture
This commit is contained in:
@ -96,6 +96,7 @@ namespace CrashHandler
|
||||
{
|
||||
CrashKeyboardDriver::CrashKeyboardDriver() : Interrupts::Handler(1) /* IRQ1 */
|
||||
{
|
||||
#if defined(a64) || defined(a32)
|
||||
while (inb(0x64) & 0x1)
|
||||
inb(0x60);
|
||||
|
||||
@ -108,6 +109,8 @@ namespace CrashHandler
|
||||
|
||||
outb(0x21, 0xFD);
|
||||
outb(0xA1, 0xFF);
|
||||
#endif // defined(a64) || defined(a32)
|
||||
|
||||
CPU::Interrupts(CPU::Enable); // Just to be sure.
|
||||
}
|
||||
|
||||
@ -124,9 +127,10 @@ namespace CrashHandler
|
||||
#elif defined(a32)
|
||||
SafeFunction void CrashKeyboardDriver::OnInterruptReceived(CPU::x32::TrapFrame *Frame)
|
||||
#elif defined(aa64)
|
||||
SafeFunction void CrashKeyboardDriver::OnInterruptReceived(void *Frame)
|
||||
SafeFunction void CrashKeyboardDriver::OnInterruptReceived(CPU::aarch64::TrapFrame *Frame)
|
||||
#endif
|
||||
{
|
||||
#if defined(a64) || defined(a32)
|
||||
UNUSED(Frame);
|
||||
uint8_t scanCode = inb(0x60);
|
||||
if (scanCode == KEY_D_TAB ||
|
||||
@ -174,12 +178,17 @@ namespace CrashHandler
|
||||
}
|
||||
Display->SetBuffer(SBIdx); // Update as we type.
|
||||
}
|
||||
#endif // a64 || a32
|
||||
}
|
||||
|
||||
SafeFunction void HookKeyboard()
|
||||
{
|
||||
CrashKeyboardDriver kbd; // We don't want to allocate memory.
|
||||
#if defined(a64) || defined(a32)
|
||||
asmv("KeyboardHookLoop: nop; jmp KeyboardHookLoop;");
|
||||
#elif defined(aa64)
|
||||
asmv("KeyboardHookLoop: nop; b KeyboardHookLoop;");
|
||||
#endif
|
||||
// CPU::Halt(true); // This is an infinite loop.
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user