Fix kernel crash after an interrupt occurs on the BSP

This commit is contained in:
Alex
2023-04-11 11:30:37 +03:00
parent 046c693a52
commit fa4713fdff
2 changed files with 5 additions and 2 deletions

View File

@ -63,6 +63,7 @@ namespace InterruptDescriptorTable
extern "C" __naked __used __no_stack_protector __aligned(16) void ExceptionHandlerStub()
{
asm("cld\n"
"cli\n"
"pushq %rax\n"
"pushq %rbx\n"
@ -107,6 +108,7 @@ namespace InterruptDescriptorTable
extern "C" __naked __used __no_stack_protector __aligned(16) void InterruptHandlerStub()
{
asm("cld\n"
"cli\n"
"pushq %rax\n"
"pushq %rbx\n"
@ -145,6 +147,7 @@ namespace InterruptDescriptorTable
"addq $16, %rsp\n"
"sti\n"
"iretq"); // pop CS RIP RFLAGS SS RSP
}