Update crash keyboard driver

This commit is contained in:
Alex 2023-06-11 12:24:30 +03:00
parent 85c0de688d
commit 3b65386399
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -111,7 +111,7 @@ namespace CrashHandler
outb(0xA1, 0xFF);
#endif // defined(a86)
CPU::Interrupts(CPU::Enable); // Just to be sure.
CPU::Interrupts(CPU::Enable);
}
CrashKeyboardDriver::~CrashKeyboardDriver()
@ -176,19 +176,14 @@ namespace CrashHandler
Display->Print((char)key, SBIdx);
BackSpaceLimit++;
}
Display->SetBuffer(SBIdx); // Update as we type.
Display->SetBuffer(SBIdx); /* Update as we type. */
}
#endif // a64 || a32
}
SafeFunction void HookKeyboard()
{
CrashKeyboardDriver kbd; // We don't want to allocate memory.
#if defined(a86)
asmv("KeyboardHookLoop: nop; jmp KeyboardHookLoop;");
#elif defined(aa64)
asmv("KeyboardHookLoop: nop; b KeyboardHookLoop;");
#endif
// CPU::Halt(true); // This is an infinite loop.
CrashKeyboardDriver kbd; /* We don't want to allocate memory. */
CPU::Halt(true);
}
}