mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Fix kernel crash after an interrupt occurs on the BSP
This commit is contained in:
parent
046c693a52
commit
fa4713fdff
@ -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
|
||||
}
|
||||
|
||||
|
@ -74,8 +74,8 @@ LockClass mExtTrkLock;
|
||||
* - [ ] Rework the stack guard.
|
||||
*
|
||||
* ISSUES:
|
||||
* - [ ] Kernel stack is smashed when an interrupt occurs. (this bug it occurs when an interrupt like IRQ1 or IRQ12 occurs)
|
||||
* - [?] After setting the new stack pointer, the kernel crashes with an invalid opcode.
|
||||
* - [x] Kernel stack is smashed when an interrupt occurs. (this bug it occurs when an interrupt like IRQ1 or IRQ12 occurs)
|
||||
* - [x] After setting the new stack pointer, the kernel crashes with an invalid opcode.
|
||||
* - [ ] Somewhere in the kernel, the memory is wrongly freed or memcpy/memset.
|
||||
* - [ ] GlobalDescriptorTable::SetKernelStack() is not working properly.
|
||||
* - [ ] Sometimes while the kernel is inside BeforeShutdown(), we end up in a deadlock.
|
||||
|
Loading…
x
Reference in New Issue
Block a user