diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2024-09-27 06:02:49 -0400 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2024-09-27 06:02:49 -0400 |
commit | d43d7caf15a01dd9c2ef1d9e975df3ef7c4e9204 (patch) | |
tree | aaf1f0f3a18b6f7b3fc25022e06941a9fb4fa612 /idt.hpp |
wip: initial commit
Diffstat (limited to 'idt.hpp')
-rw-r--r-- | idt.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#ifndef IDT_HPP +#define IDT_HPP + +#include <cstddef> +#include <cstdint> + +struct Registers +{ + std::uint32_t inum; + std::uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; + std::uint32_t error; + std::uint32_t eip, cs, eflags; +} __attribute__((packed)); + +using Callback = void (*)(const Registers&); + +void idt_initialize(); +void idt_register_callback(std::size_t num, Callback cb); + +#endif // IDT_HPP + |