diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-16 09:51:24 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-16 10:08:17 +0200 |
| commit | 5b2ec031ab578caec8fbbdbe5350b9c0df493fd3 (patch) | |
| tree | a0aab7bea6ef32aaa48ece6bdf287974dd67c8eb /dev/kernel/HALKit/AMD64/HalHandoverStub.asm | |
| parent | b7c6e7aef4c2c647623520f65d78921841bdffaa (diff) | |
feat(kernel/ap): Improved and fixed the AP boot flow, also made sure that the segment
loading for the long mode stub works.
TODO:
- Stack pointer shall be set when jumping to AP routine.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/HALKit/AMD64/HalHandoverStub.asm')
| -rw-r--r-- | dev/kernel/HALKit/AMD64/HalHandoverStub.asm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalHandoverStub.asm b/dev/kernel/HALKit/AMD64/HalHandoverStub.asm new file mode 100644 index 00000000..a337a223 --- /dev/null +++ b/dev/kernel/HALKit/AMD64/HalHandoverStub.asm @@ -0,0 +1,30 @@ +;; /* +;; * ======================================================== +;; * +;; * NeKernel +;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. +;; * +;; * ======================================================== +;; */ + +[bits 64] + +%define kTypeKernel 100 +%define kArchAmd64 122 +%define kHandoverMagic 0xBADCC + +global _HandoverMagic +global _HandoverType +global _HandoverPad +global _HandoverArch + +section .ldr + +_HandoverMagic: + dq kHandoverMagic +_HandoverType: + dw kTypeKernel +_HandoverPad: + dw 0 +_HandoverArch: + dw kArchAmd64 |
