diff options
| author | Fabian Imhof <fabian.imhof@ost.ch> | 2025-04-17 14:15:39 +0000 |
|---|---|---|
| committer | Fabian Imhof <fabian.imhof@ost.ch> | 2025-04-17 14:15:39 +0000 |
| commit | 65718b1470a9b6bfac3520587263c5374f4a4419 (patch) | |
| tree | cfd952c4bec62cc5210faa0aacd10f3381026943 /arch/x86_64/include | |
| parent | 8975c5fe091150245fd58a0a42a83b4f41d454e0 (diff) | |
| parent | 576a7a95b2462ec4938de9fe344657ca04b2ba34 (diff) | |
| download | teachos-65718b1470a9b6bfac3520587263c5374f4a4419.tar.xz teachos-65718b1470a9b6bfac3520587263c5374f4a4419.zip | |
Merge branch 'syscall_interrupt_handler' into feat_inital_context_switching
Diffstat (limited to 'arch/x86_64/include')
| -rw-r--r-- | arch/x86_64/include/arch/interrupt_handling/generic_interrupt_handler.hpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/x86_64/include/arch/interrupt_handling/generic_interrupt_handler.hpp b/arch/x86_64/include/arch/interrupt_handling/generic_interrupt_handler.hpp index 6c1db12..309acbb 100644 --- a/arch/x86_64/include/arch/interrupt_handling/generic_interrupt_handler.hpp +++ b/arch/x86_64/include/arch/interrupt_handling/generic_interrupt_handler.hpp @@ -13,12 +13,12 @@ namespace teachos::arch::interrupt_handling */ struct [[gnu::packed]] interrupt_frame { - uint64_t error_code; ///< Error code pushed by some exceptions. - uint64_t ip; ///< Instruction pointer at the time of the interrupt. - uint64_t cs; ///< Code segment selector indicating privilege level. - uint64_t flags; ///< CPU flags (RFLAGS) storing processor state. - uint64_t sp; ///< Stack pointer at the time of the interrupt. - uint64_t ss; ///< Stack segment selector, usually unused in 64-bit mode. + // uint64_t error_code; ///< Error code pushed by some exceptions. + uint64_t ip; ///< Instruction pointer at the time of the interrupt. + uint64_t cs; ///< Code segment selector indicating privilege level. + uint64_t flags; ///< CPU flags (RFLAGS) storing processor state. + uint64_t sp; ///< Stack pointer at the time of the interrupt. + uint64_t ss; ///< Stack segment selector, usually unused in 64-bit mode. }; /** @@ -29,6 +29,14 @@ namespace teachos::arch::interrupt_handling [[gnu::interrupt]] auto generic_interrupt_handler(struct interrupt_frame * frame) -> void; + /** + * @brief Interrupt handler function for syscalls (INT 0x80). + * + * @param frame Pointer to the interrupt frame containing CPU state. + */ + [[gnu::interrupt]] + auto syscall_interrupt_handler(struct interrupt_frame * frame) -> void; + } // namespace teachos::arch::interrupt_handling #endif // TEACHOS_ARCH_X86_64_INTERRUPT_HANDLING_GENERIC_INTERRUPT_HANDLER_HPP |
