diff options
| author | Ian Moffett <ian@osmora.org> | 2025-11-18 16:04:19 -0500 |
|---|---|---|
| committer | Ian Moffett <ian@osmora.org> | 2025-11-18 16:04:19 -0500 |
| commit | 32a88e354f6936ae0e2ab9c564293a09c6d77902 (patch) | |
| tree | c907292e7fc72bf4266d1dfd3217811cc64b9fa4 /sys/inc | |
| parent | fb57d2c9e35ce9f6e6bdc79c2366915dc9034db1 (diff) | |
kern/amd64: idt: Make idt.h includable in ASM
This also moves the interrupt gate defines to the idt.h header so that
they can be used within C code
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/inc')
| -rw-r--r-- | sys/inc/arch/amd64/idt.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/inc/arch/amd64/idt.h b/sys/inc/arch/amd64/idt.h index 69ca30a..1099310 100644 --- a/sys/inc/arch/amd64/idt.h +++ b/sys/inc/arch/amd64/idt.h @@ -30,11 +30,18 @@ #ifndef _MACHINE_IDT_H_ #define _MACHINE_IDT_H_ 1 +#define INT_GATE 0x8E +#define TRAP_GATE 0x8F + +#if !defined(__ASSEMBLER__) #include <sys/types.h> +#endif /* __ASSEMBLER__ */ +#if !defined(__ASSEMBLER__) /* * Set an interrupt gate */ void idt_set_gate(uint8_t vector, uint8_t type, uintptr_t isr, uint8_t ist); +#endif /* !__ASSEMBLER__ */ #endif /* !_MACHINE_IDT_H_ */ |
