mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
Turn the syscall interrupt into a trap (by switching the gate type.)
This leaves interrupts enabled while we're in the kernel, which is precisely what we want. This uncovered a horrendous problem with kernel tasks silently overflowing their stacks. For now I've simply increased the stack size but I need a more MMU-y solution for this eventually.
This commit is contained in:
parent
2d1d01661b
commit
46ff281695
6 changed files with 116 additions and 25 deletions
|
@ -72,8 +72,8 @@ void writeGDTEntry(WORD selector, Descriptor&);
|
|||
#define LSB(x) ((x) & 0xFF)
|
||||
#define MSB(x) (((x)>>8) & 0xFF)
|
||||
|
||||
#define disableInterrupts() asm volatile("cli");
|
||||
#define enableInterrupts() asm volatile("sti");
|
||||
#define cli() asm volatile("cli")
|
||||
#define sti() asm volatile("sti")
|
||||
|
||||
/* Map IRQ0-15 @ ISR 0x50-0x5F */
|
||||
#define IRQ_VECTOR_BASE 0x50
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue