summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/HALKit/AMD64/HalApplicationProcessorStartup.asm
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-29 10:51:53 +0200
committerGitHub <noreply@github.com>2025-05-29 10:51:53 +0200
commit5c0bb7ee7b1b0fee02cc179fb21f4c57a61d6c2d (patch)
treecb17577bcdc9714c97a84ce417a075117097f146 /dev/kernel/HALKit/AMD64/HalApplicationProcessorStartup.asm
parentd608230b1350b064ceb01e6572519b108f6139b0 (diff)
parent3167f59dbb401d6a79b1524537e04218baf49ee3 (diff)
Merge pull request #32 from nekernel-org/dev
0.0.2e3
Diffstat (limited to 'dev/kernel/HALKit/AMD64/HalApplicationProcessorStartup.asm')
-rw-r--r--dev/kernel/HALKit/AMD64/HalApplicationProcessorStartup.asm79
1 files changed, 0 insertions, 79 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalApplicationProcessorStartup.asm b/dev/kernel/HALKit/AMD64/HalApplicationProcessorStartup.asm
deleted file mode 100644
index 09a59e4f..00000000
--- a/dev/kernel/HALKit/AMD64/HalApplicationProcessorStartup.asm
+++ /dev/null
@@ -1,79 +0,0 @@
-;; /*
-;; * ========================================================
-;; *
-;; * NeKernel
-;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
-;; *
-;; * 25/03/25: FIX: Fix warning regarding resb being used inside a non-bss area (using no-op instead).
-;; *
-;; * ========================================================
-;; */
-
-[bits 16]
-[org 0x7c000]
-
-hal_ap_start:
- mov ax, 0x0
- mov ss, ax
- mov esp, 0x7000
-
- cli
- mov eax, cr0
- or eax, 1
- mov cr0, eax
- jmp .hal_ap_start_flush
-.hal_ap_start_flush:
- mov ax, 0x10
- mov ds, ax
- mov es, ax
- mov fs, ax
- mov gs, ax
- mov ss, ax
-
- mov eax, cr4
- or eax, 1 << 5
- mov cr4, eax
-
- mov eax, cr3
- mov cr3, eax
-
- mov ecx, 0xC0000080
- rdmsr
- or eax, 1
- wrmsr
-
- mov eax, cr0
- or eax, (1 << 31)
- mov cr0, eax
-
- jmp 0x08:hal_ap_64bit_entry
-hal_ap_end:
-
-hal_ap_length:
- dq hal_ap_end - hal_ap_start
-
-[bits 64]
-
-hal_ap_64bit_entry:
- mov ax, 0x23
- mov ds, ax
- mov es, ax
- mov fs, ax
- mov gs, ax
- mov ss, ax
- mov rsp, [hal_ap_64bit_entry_stack_end]
-
- push 0x33
- push qword [hal_ap_64bit_entry_loop]
- o64 pushf
- push rsp
- push 0x33
-
- o64 iret
-
-hal_ap_64bit_entry_loop:
- jmp $
-
-hal_ap_64bit_entry_stack:
- times 8196*2 nop
-hal_ap_64bit_entry_stack_end: \ No newline at end of file