Added handlers for some interrupts and fixed terminal scrolling.

This commit is contained in:
2024-01-18 18:56:38 +01:00
parent c097da920d
commit 9f1f1e80f2
7 changed files with 222 additions and 22 deletions

View File

@@ -6,6 +6,7 @@
#include <cstdint>
#include "os/interrupt.hpp"
#include "os/port.hpp"
inline constexpr std::uint16_t PORT_PIC1 = 0x20;
@@ -25,17 +26,4 @@ void unmaskIRQ(std::uint8_t irq) noexcept;
return (offset & 7) == 0;
}
#if defined(__x86_64__)
struct InterruptFrame
{
std::uint64_t ip;
std::uint64_t cs;
std::uint64_t flags;
std::uint64_t sp;
std::uint64_t ss;
};
#endif
using interrupt_handler_t = __attribute__((interrupt)) void(*)(InterruptFrame*);
#endif // !defined(BAD_APPLE_OS_KERNEL_PIC_HPP_INCLUDED)