Kernel: Fix interrupt system
I had not understood how MSIs work and I was unnecessarily routing them through IOAPIC. This is not necessary and should not be done :D Also MSIs were reserving interrupts that IOAPIC was capable of generating. Now IOAPIC and MSIs use different set of interrupts so IOAPIC can use more interrupts if needed.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <kernel/Attributes.h>
|
||||
#include <kernel/IDT.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
@@ -10,7 +11,16 @@ namespace Kernel
|
||||
ALWAYS_INLINE long syscall(int syscall, uintptr_t arg1 = 0, uintptr_t arg2 = 0, uintptr_t arg3 = 0, uintptr_t arg4 = 0, uintptr_t arg5 = 0)
|
||||
{
|
||||
long ret;
|
||||
asm volatile("int $0x80" : "=a"(ret) : "a"(syscall), "b"((uintptr_t)arg1), "c"((uintptr_t)arg2), "d"((uintptr_t)arg3), "S"((uintptr_t)arg4), "D"((uintptr_t)arg5) : "memory");
|
||||
asm volatile("int %[irq]"
|
||||
: "=a"(ret)
|
||||
: [irq]"i"(IRQ_SYSCALL)
|
||||
, "a"(syscall)
|
||||
, "b"((uintptr_t)arg1)
|
||||
, "c"((uintptr_t)arg2)
|
||||
, "d"((uintptr_t)arg3)
|
||||
, "S"((uintptr_t)arg4)
|
||||
, "D"((uintptr_t)arg5)
|
||||
: "memory");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user