From e757bb6a90c98f53995e4828d68eba26a2327540 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 1 Sep 2024 09:23:10 +0200 Subject: [ IMP ] Found out the issue of ring 3 switch. Signed-off-by: Amlal El Mahrouss --- dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm') diff --git a/dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm b/dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm index 847c609e..89cb4078 100644 --- a/dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm +++ b/dev/ZKA/HALKit/AMD64/HalInterruptAPI.asm @@ -267,7 +267,7 @@ hal_switch_to_user_code: mov rbx, 0x28 mov es, rbx - mov rsp, [hal_user_code_stack_end] + mov rsp, hal_user_code_stack_end mov rcx, hal_user_code_start mov r11, 0x0202 @@ -275,9 +275,14 @@ hal_switch_to_user_code: o64 sysret hal_user_code_start: -L0: + hlt nop jmp $ +hal_user_code_end: + +section .data + +hal_user_code_sz: dq hal_user_code_end - hal_user_code_start section .bss -- cgit v1.2.3