diff options
Diffstat (limited to 'sys/inc/arch')
| -rw-r--r-- | sys/inc/arch/amd64/idt.h | 7 | ||||
| -rw-r--r-- | sys/inc/arch/amd64/lapic.h | 7 |
2 files changed, 14 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_ */ diff --git a/sys/inc/arch/amd64/lapic.h b/sys/inc/arch/amd64/lapic.h index 35ba778..d22a560 100644 --- a/sys/inc/arch/amd64/lapic.h +++ b/sys/inc/arch/amd64/lapic.h @@ -31,6 +31,7 @@ #define _MACHINE_LAPIC_H_ 1 #include <sys/types.h> +#include <lib/stdbool.h> #include <mu/cpu.h> #define LAPIC_TMR_VEC 0x81 @@ -91,6 +92,12 @@ struct lapic_ipi { }; /* + * Put the local APIC timer in one shot mode and fire it + * off + */ +void lapic_oneshot_usec(struct mcb *mcb, size_t usec); + +/* * Read the current local APIC id */ uint32_t lapic_read_id(struct mcb *mcb); |
