feat: add interrupts handling, PIC and PIT

This commit is contained in:
2026-10-20 15:20:26 +02:00
parent 8da0918108
commit 811ce51c2c
10 changed files with 428 additions and 12 deletions
+20
View File
@@ -0,0 +1,20 @@
#ifndef ARCH_X86_64_IO_HPP
#define ARCH_X86_64_IO_HPP
#include "types.hpp"
namespace x86_64 {
struct io {
static u8 inb(u16 port) {
u8 value{};
asm volatile("inb %1, %0" : "=a"(value) : "Nd"(port));
return value;
}
static void outb(u16 port, u8 value) { asm volatile("outb %0, %1" : : "a"(value), "Nd"(port)); }
};
} // namespace x86_64
#endif // ARCH_X86_64_IO_HPP