summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/AMD64/HalCoreSyscallHandlerAMD64.cpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-03 20:39:06 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-03 20:39:06 +0100
commitf99e383775fa43c5c1354067962b1590ff2abdae (patch)
treef83a9b232c0424963fc9989b517e53f903ee036f /Private/HALKit/AMD64/HalCoreSyscallHandlerAMD64.cpp
parent0ca5d0d92ee326f3deda797403c27090bd0784ab (diff)
NewBoot: Will work on AHCI instead, ATA is not getting any further in
the future. Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit/AMD64/HalCoreSyscallHandlerAMD64.cpp')
-rw-r--r--Private/HALKit/AMD64/HalCoreSyscallHandlerAMD64.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/Private/HALKit/AMD64/HalCoreSyscallHandlerAMD64.cpp b/Private/HALKit/AMD64/HalCoreSyscallHandlerAMD64.cpp
new file mode 100644
index 00000000..4f1ed4da
--- /dev/null
+++ b/Private/HALKit/AMD64/HalCoreSyscallHandlerAMD64.cpp
@@ -0,0 +1,23 @@
+/*
+ * ========================================================
+ *
+ * HCore
+ * Copyright Mahrouss Logic, all rights reserved.
+ *
+ * ========================================================
+ */
+
+#include <ArchKit/ArchKit.hpp>
+#include <HALKit/AMD64/Processor.hpp>
+#include <KernelKit/PermissionSelector.hxx>
+
+HCore::Array<void (*)(HCore::Int32 id, HCore::HAL::StackFrame *), kMaxSyscalls>
+ kSyscalls;
+
+// IDT System Call Handler.
+// NOTE: don't trust the user.
+extern "C" void rt_syscall_handle(HCore::HAL::StackFrame *stack) {
+ for (HCore::SizeT index = 0UL; index < kMaxSyscalls; ++index) {
+ (kSyscalls[index].Leak().Leak())(stack->R15, stack);
+ }
+}