summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit/AXP
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-30 17:59:15 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-30 17:59:15 +0100
commit1be243700efc9e36060c5fb65c951d5db6b98e94 (patch)
tree2f57d5092f4de4798e80e80b6dd29f984edb7683 /Private/HALKit/AXP
parent1d3bed385c9666db5b1803ee8e02a2c4fdcc9f29 (diff)
Add ROADMAP details, add EFI Library for bootloader.
Add assignee to code in MailMap. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit/AXP')
-rw-r--r--Private/HALKit/AXP/CR.s11
-rw-r--r--Private/HALKit/AXP/CoreInterruptHandlerDEC.cpp0
-rw-r--r--Private/HALKit/AXP/CoreSyscallHandlerDEC.cpp21
-rw-r--r--Private/HALKit/AXP/HAL.s13
-rw-r--r--Private/HALKit/AXP/Processor.hpp10
-rw-r--r--Private/HALKit/AXP/README1
-rw-r--r--Private/HALKit/AXP/README.TXT1
-rw-r--r--Private/HALKit/AXP/SYSCALL.s10
-rw-r--r--Private/HALKit/AXP/VM.s5
9 files changed, 72 insertions, 0 deletions
diff --git a/Private/HALKit/AXP/CR.s b/Private/HALKit/AXP/CR.s
new file mode 100644
index 00000000..b01dc619
--- /dev/null
+++ b/Private/HALKit/AXP/CR.s
@@ -0,0 +1,11 @@
+.globl read_lr1
+.globl read_lr0
+
+.section .text
+ read_lr0:
+ movq %r30, %cr3
+ ret
+
+ read_cr0:
+ movq %r30, %cr0
+ ret \ No newline at end of file
diff --git a/Private/HALKit/AXP/CoreInterruptHandlerDEC.cpp b/Private/HALKit/AXP/CoreInterruptHandlerDEC.cpp
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/Private/HALKit/AXP/CoreInterruptHandlerDEC.cpp
diff --git a/Private/HALKit/AXP/CoreSyscallHandlerDEC.cpp b/Private/HALKit/AXP/CoreSyscallHandlerDEC.cpp
new file mode 100644
index 00000000..0881f9c6
--- /dev/null
+++ b/Private/HALKit/AXP/CoreSyscallHandlerDEC.cpp
@@ -0,0 +1,21 @@
+/*
+ * ========================================================
+ *
+ * HCore
+ * Copyright 2024 Mahrouss Logic, all rights reserved.
+ *
+ * ========================================================
+ */
+
+#include <ArchKit/Arch.hpp>
+#include <HALKit/Alpha/Processor.hpp>
+
+HCore::Array<void (*)(HCore::Int32 id, HCore::HAL::StackFrame *), kMaxSyscalls> kSyscalls;
+
+extern "C" void rt_syscall_handle(HCore::HAL::StackFrame *stack)
+{
+ for (HCore::SizeT index = 0UL; index < kMaxSyscalls; ++index)
+ {
+ (kSyscalls[index].Leak().Leak())(stack->ID, stack);
+ }
+}
diff --git a/Private/HALKit/AXP/HAL.s b/Private/HALKit/AXP/HAL.s
new file mode 100644
index 00000000..46127130
--- /dev/null
+++ b/Private/HALKit/AXP/HAL.s
@@ -0,0 +1,13 @@
+.globl rt_wait_for_io
+
+.section .text
+rt_wait_for_io:
+ jmp .L
+.L:
+ jmp .L2
+ wtint ;; wait for interrupt
+.L2:
+
+ ret
+
+
diff --git a/Private/HALKit/AXP/Processor.hpp b/Private/HALKit/AXP/Processor.hpp
new file mode 100644
index 00000000..e6a00db3
--- /dev/null
+++ b/Private/HALKit/AXP/Processor.hpp
@@ -0,0 +1,10 @@
+/*
+ * ========================================================
+ *
+ * HCore
+ * Copyright Mahrouss Logic, all rights reserved.
+ *
+ * ========================================================
+ */
+
+#pragma once \ No newline at end of file
diff --git a/Private/HALKit/AXP/README b/Private/HALKit/AXP/README
new file mode 100644
index 00000000..91e7b134
--- /dev/null
+++ b/Private/HALKit/AXP/README
@@ -0,0 +1 @@
+This is for DEC Alpha.
diff --git a/Private/HALKit/AXP/README.TXT b/Private/HALKit/AXP/README.TXT
new file mode 100644
index 00000000..03c2b816
--- /dev/null
+++ b/Private/HALKit/AXP/README.TXT
@@ -0,0 +1 @@
+A Toy HAL to test the Kernel portability.
diff --git a/Private/HALKit/AXP/SYSCALL.s b/Private/HALKit/AXP/SYSCALL.s
new file mode 100644
index 00000000..19cab808
--- /dev/null
+++ b/Private/HALKit/AXP/SYSCALL.s
@@ -0,0 +1,10 @@
+.section .text
+system_handle_user_call:
+ .cfi_startproc
+
+ push %r0
+ jmp %r1
+ mov %r30, %r2
+
+ .cfi_endproc
+ retsys \ No newline at end of file
diff --git a/Private/HALKit/AXP/VM.s b/Private/HALKit/AXP/VM.s
new file mode 100644
index 00000000..d8d7aa71
--- /dev/null
+++ b/Private/HALKit/AXP/VM.s
@@ -0,0 +1,5 @@
+.global flush_tlb
+
+.section .text
+flush_tlb:
+ swppal \ No newline at end of file