aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/interrupt_handling
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2025-05-03 09:45:45 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2025-05-03 09:45:45 +0000
commit5a8c9d2f2e4a3d2810f81c35070c6ef0926cfdd1 (patch)
treef93079bf5d250e176abbd3db9902f5d22285f6a4 /arch/x86_64/src/interrupt_handling
parent4b8674bee6089aef1e2c6b9064c6109f1cd392da (diff)
downloadteachos-5a8c9d2f2e4a3d2810f81c35070c6ef0926cfdd1.tar.xz
teachos-5a8c9d2f2e4a3d2810f81c35070c6ef0926cfdd1.zip
write wrapper function for syscall
Diffstat (limited to 'arch/x86_64/src/interrupt_handling')
-rw-r--r--arch/x86_64/src/interrupt_handling/generic_interrupt_handler.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/arch/x86_64/src/interrupt_handling/generic_interrupt_handler.cpp b/arch/x86_64/src/interrupt_handling/generic_interrupt_handler.cpp
index 60fb50c..8e2c62d 100644
--- a/arch/x86_64/src/interrupt_handling/generic_interrupt_handler.cpp
+++ b/arch/x86_64/src/interrupt_handling/generic_interrupt_handler.cpp
@@ -9,30 +9,4 @@ namespace teachos::arch::interrupt_handling
(void)frame;
video::vga::text::write("An Interrupt occurred.", video::vga::text::common_attributes::green_on_black);
}
-
- auto syscall_interrupt_handler(interrupt_frame * frame) -> void
- {
- // RDI, RSI, RDX, RCX, R8, R9
- // RDI -> SYSCALL number
- // Others are arguments
-
- // TODO: The registers are not available here. We need to set them up on the stack
- // and access them via argument.
-
- uint64_t syscall_number{};
- asm volatile("mov %%rdi, %0" : "=r"(syscall_number));
-
- // Handle system call based on the number
- switch (syscall_number)
- {
- case 1:
- video::vga::text::write("SYSCALL 1.", video::vga::text::common_attributes::green_on_black);
- break;
- default:
- // Handle unknown syscall
- break;
- }
-
- (void)frame;
- }
} // namespace teachos::arch::interrupt_handling