summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-01 11:21:55 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-01 11:21:55 +0200
commit1af5efb5c96af6f3246c8eae42912b2fbcd7f006 (patch)
tree9cf4cf8d7ed93eef0ff3daac211879cb9a961c81 /dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm
parente757bb6a90c98f53995e4828d68eba26a2327540 (diff)
Many bug fixes, and wip fixes.
RoadMap: - Ring-3 switch [ Still gives GPF ] - Make timer interrupt on non SMP profile. - Work on SMP support, to offload tasks to other cores. - Validate kernel and components (compiler, dlls, programs...) Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm')
-rw-r--r--dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm52
1 files changed, 1 insertions, 51 deletions
diff --git a/dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm b/dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm
index 89cb4078..2eae172a 100644
--- a/dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm
+++ b/dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm
@@ -4,7 +4,7 @@
;; * Copyright ZKA Technologies., all rights reserved.
;; *
;; * File: HalInterruptAPI.asm
-;; * Purpose: Interrupt routing, redirect raw interrupts into their handlers.
+;; * Purpose: Interrupt API, redirect raw interrupts into their handlers.
;; *
;; * ---------------------------------------------------
;; */
@@ -240,56 +240,6 @@ hal_load_idt:
sti
ret
-[global hal_switch_to_user_code]
-
-hal_switch_to_user_code:
- ; Enable SCE that enables sysret and syscall
- mov rcx, 0xc0000082
- wrmsr
- mov rcx, 0xc0000080
- rdmsr
- or eax, 1
- wrmsr
- mov rcx, 0xc0000081
- rdmsr
- mov edx, 0x00180008
- wrmsr
-
- mov rbx, 0x28
- mov ds, rbx
-
- mov rbx, 0x28
- mov fs, rbx
-
- mov rbx, 0x28
- mov gs, rbx
-
- mov rbx, 0x28
- mov es, rbx
-
- mov rsp, hal_user_code_stack_end
- mov rcx, hal_user_code_start
-
- mov r11, 0x0202
-
- o64 sysret
-
-hal_user_code_start:
- hlt
- nop
- jmp $
-hal_user_code_end:
-
-section .data
-
-hal_user_code_sz: dq hal_user_code_end - hal_user_code_start
-
-section .bss
-
-hal_user_code_stack:
- resb 4096*4
-hal_user_code_stack_end:
-
section .data
kInterruptVectorTable: