summaryrefslogtreecommitdiffhomepage
path: root/Private/HALKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-29 17:12:41 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-29 17:12:41 +0100
commitf03986937db0b927da4b10554801e18e4dc7c43f (patch)
tree408c75b5af373b0a9a42a4b858ce5396af75703a /Private/HALKit
parent4b7cd3b0536f44a3c95e71550a77df08d9a4c088 (diff)
Kernel: Fix and unified NewBoot handover protocol.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/HALKit')
-rw-r--r--Private/HALKit/AMD64/StartSequence.asm24
1 files changed, 18 insertions, 6 deletions
diff --git a/Private/HALKit/AMD64/StartSequence.asm b/Private/HALKit/AMD64/StartSequence.asm
index 45bd1656..efb90843 100644
--- a/Private/HALKit/AMD64/StartSequence.asm
+++ b/Private/HALKit/AMD64/StartSequence.asm
@@ -8,18 +8,28 @@
;; */
[bits 64]
+
+;; Global symbol of this unit
[global Main]
+[global MainUnsupported]
+
+;; External symbols needed by this unit.
[extern RuntimeMain]
[extern __SYSTEM_STACK_END]
-section .text
+%define kTypeKernel 100
+%define kArchAmd64 122
-NewBootMagic: dw 0x55FF66
-NewBootKernel: db "h-core", 0
-NewBootVersion: dw 1
+section .NewBoot
+HandoverMagic: dq 0xBAD55
+HandoverType: dw kTypeKernel
+HandoverArch: dw kArchAmd64
;; This NewBootStart points to Main.
-NewBootStart:
+HandoverStart: dq Main
+
+section .text
+
;; Just a simple setup, we'd also need to tell some before
Main:
mov rsp, __SYSTEM_STACK_END
@@ -30,7 +40,9 @@ L0:
hlt
jmp $
-MainBIOS:
+;; @brief this one is jumped on when an unsupported then gets through the boot stage.
+;; @note: must be ISA compatible!
+MainUnsupported:
cli
hlt
jmp $