diff options
Diffstat (limited to 'Private/HALKit/AXP')
| -rw-r--r-- | Private/HALKit/AXP/CR.s | 11 | ||||
| -rw-r--r-- | Private/HALKit/AXP/CoreInterruptHandlerDEC.cpp | 0 | ||||
| -rw-r--r-- | Private/HALKit/AXP/CoreSyscallHandlerDEC.cpp | 21 | ||||
| -rw-r--r-- | Private/HALKit/AXP/HAL.s | 13 | ||||
| -rw-r--r-- | Private/HALKit/AXP/Processor.hpp | 10 | ||||
| -rw-r--r-- | Private/HALKit/AXP/README | 1 | ||||
| -rw-r--r-- | Private/HALKit/AXP/README.TXT | 1 | ||||
| -rw-r--r-- | Private/HALKit/AXP/SYSCALL.s | 10 | ||||
| -rw-r--r-- | Private/HALKit/AXP/VM.s | 5 |
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 |
