Initial commit

This commit is contained in:
bdbrd 2025-10-22 15:51:24 +02:00
commit cbc51f523e
125 changed files with 34817 additions and 0 deletions

13
src/hal/ioapic.h Normal file
View file

@ -0,0 +1,13 @@
#include "error.h"
#include <stdint.h>
void ioapic_init(void);
void write_redir_entry(uint8_t reg, uint64_t data);
kstatus set_redir_entry(uint8_t pin, uint8_t vector, uint8_t delivery, uint8_t trigger, uint8_t destination_field, uint8_t destination_mode);
#define IOREGSEL 0x0
#define IOWIN 0x10
#define IOAPICID 0x0
#define IOAPICVER 0x1
#define IOAPICARB 0x2
#define IOREDTBL(x) (0x10 + (x * 2)) // 0-23 registers