kernel: Interrupts are disabled while in system calls #32

Closed
opened 2023-07-20 18:35:21 +00:00 by asleepymoon · 1 comment
Owner

In x86_64's IDT.cpp, IDT_TA_TrapGate and IDT_TA_InterruptGate are used wrongly. Interrupt gates are called with interrupts disabled, trap gates are not. Thus, syscalls should have a new IDT_TA_UserCallableTrapGate value. IRQs should probably be configurable. Exceptions should stay this way (interrupts enabled on entry, as per the OSDev wiki.

In x86_64's [IDT.cpp](kernel/src/arch/x86_64/init/IDT.cpp), IDT_TA_TrapGate and IDT_TA_InterruptGate are used wrongly. Interrupt gates are called with interrupts disabled, trap gates are not. Thus, syscalls should have a new IDT_TA_UserCallableTrapGate value. IRQs should probably be configurable. Exceptions should stay this way (interrupts enabled on entry, as per the [OSDev wiki](https://wiki.osdev.org/IDT#Trap_Gate).
asleepymoon changed title from kernel: Interrupts are disabled while in system calls and enabled in exceptions to kernel: Interrupts are disabled while in system calls 2023-07-20 18:35:41 +00:00
Author
Owner

I'm pretty sure this is intended behaviour.

I'm pretty sure this is intended behaviour.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: asleepymoon/Luna#32
No description provided.