mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
Initial commit: SUB-OS 64-Bit Production Monolithic Operating System with LazyBox userland suite
This commit is contained in:
commit
cd9c786d14
88 files changed
+7132
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#ifndef _ARCH_X86_64_IDT_H
|
||||
#define _ARCH_X86_64_IDT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define IDT_ENTRIES 256
|
||||
|
||||
typedef struct {
|
||||
uint16_t isr_low;
|
||||
uint16_t kernel_cs;
|
||||
uint8_t ist;
|
||||
uint8_t attributes;
|
||||
uint16_t isr_mid;
|
||||
uint32_t isr_high;
|
||||
uint32_t reserved;
|
||||
} __attribute__((packed)) idt_entry_t;
|
||||
|
||||
typedef struct {
|
||||
uint16_t limit;
|
||||
uint64_t base;
|
||||
} __attribute__((packed)) idt_ptr_t;
|
||||
|
||||
void idt_init(void);
|
||||
void idt_set_gate(uint8_t vector, void* isr, uint8_t flags);
|
||||
void idt_enable_gate(uint8_t vector);
|
||||
void idt_disable_gate(uint8_t vector);
|
||||
|
||||
#endif // _ARCH_X86_64_IDT_H
|
||||
Reference in new issue
Block a user