diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-03-21 10:13:17 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-03-21 10:16:21 +0100 |
| commit | c9ce8625dd80f701e280f90cb30c30f8663473e9 (patch) | |
| tree | 08eb79b8e775fcd4ee8c334cd019caca8d6f61f3 /arch/x86_64/include | |
| parent | fcf0cd73b0978c2db3e719542cf81d7d2c0fe24e (diff) | |
| download | teachos-c9ce8625dd80f701e280f90cb30c30f8663473e9.tar.xz teachos-c9ce8625dd80f701e280f90cb30c30f8663473e9.zip | |
x86_64/cpu: fixup 8259 interrupt handling
We now mask the timer interrupt and ensure we are informing the PIC
about us having handled the interrupt.
Diffstat (limited to 'arch/x86_64/include')
| -rw-r--r-- | arch/x86_64/include/arch/cpu/legacy_pic.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/x86_64/include/arch/cpu/legacy_pic.hpp b/arch/x86_64/include/arch/cpu/legacy_pic.hpp new file mode 100644 index 0000000..9f53d86 --- /dev/null +++ b/arch/x86_64/include/arch/cpu/legacy_pic.hpp @@ -0,0 +1,19 @@ +#ifndef TEACHOS_X86_64_CPU_LEGACY_PIC_HPP +#define TEACHOS_X86_64_CPU_LEGACY_PIC_HPP + +#include "arch/device_io/port_io.hpp" + +#include <cstdint> + +namespace arch::cpu +{ + using pic_master_control_port = io::port<0x20, std::uint8_t, io::port_read, io::port_write>; + using pic_master_data_port = io::port<0x21, std::uint8_t, io::port_read, io::port_write>; + using pic_slave_control_port = io::port<0xa0, std::uint8_t, io::port_read, io::port_write>; + using pic_slave_data_port = io::port<0xa1, std::uint8_t, io::port_read, io::port_write>; + + constexpr auto pic_end_of_interrupt = std::uint8_t{0x20}; + +} // namespace arch::cpu + +#endif
\ No newline at end of file |
