summaryrefslogtreecommitdiffhomepage
path: root/dev/boot/src/HEL/AMD64/BootAPI.S
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-02 19:38:46 +0200
committerGitHub <noreply@github.com>2025-05-02 19:38:46 +0200
commit997be16e5ac9a68d54882ab69529815860d62955 (patch)
tree19d6129c2d776bb1edc5d4a7325e39ca176c3403 /dev/boot/src/HEL/AMD64/BootAPI.S
parent618104e74c195d7508a18450524f8ed7f9af8cc6 (diff)
parentb3b4b1ebdcd6adeac914869017c86d892b7a8ced (diff)
Merge pull request #28 from nekernel-org/dev
0.0.2
Diffstat (limited to 'dev/boot/src/HEL/AMD64/BootAPI.S')
-rw-r--r--dev/boot/src/HEL/AMD64/BootAPI.S47
1 files changed, 46 insertions, 1 deletions
diff --git a/dev/boot/src/HEL/AMD64/BootAPI.S b/dev/boot/src/HEL/AMD64/BootAPI.S
index 963ef46a..43775fc2 100644
--- a/dev/boot/src/HEL/AMD64/BootAPI.S
+++ b/dev/boot/src/HEL/AMD64/BootAPI.S
@@ -52,9 +52,54 @@ reset_wait:
.global boot_read_cr3
boot_read_cr3:
- mov rax, rax
+ mov rax, cr3
ret
boot_write_cr3:
mov cr3, rcx
ret
+
+.section .text
+
+.extern rt_wait_400ns
+
+.global rt_out8
+.global rt_out16
+.global rt_out32
+
+.global rt_in8
+.global rt_in16
+.global rt_in32
+
+rt_out8:
+ mov al, dl
+ mov dx, cx
+ out dx, al
+ ret
+
+rt_out16:
+ mov ax, dx
+ mov dx, cx
+ out dx, ax
+ ret
+
+rt_out32:
+ mov eax, edx
+ mov edx, ecx
+ out dx, eax
+ ret
+
+rt_in8:
+ mov dx, cx
+ in al, dx
+ ret
+
+rt_in16:
+ mov edx, ecx
+ in ax, dx
+ ret
+
+rt_in32:
+ mov rdx, rcx
+ in eax, dx
+ ret \ No newline at end of file