diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-06 09:14:11 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-06 09:14:11 +0100 |
| commit | 5339d016c07bf717ee388f4feb73544087324af0 (patch) | |
| tree | 94be6f67ed626091f24aee24ec3b3be03d01e4e7 /newBoot/Source/Arch/NewCPU | |
git: port from mercurial repo.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'newBoot/Source/Arch/NewCPU')
| -rw-r--r-- | newBoot/Source/Arch/NewCPU/Crt0.asm | 29 | ||||
| -rw-r--r-- | newBoot/Source/Arch/NewCPU/XPM.inc | 35 |
2 files changed, 64 insertions, 0 deletions
diff --git a/newBoot/Source/Arch/NewCPU/Crt0.asm b/newBoot/Source/Arch/NewCPU/Crt0.asm new file mode 100644 index 00000000..c918f5c1 --- /dev/null +++ b/newBoot/Source/Arch/NewCPU/Crt0.asm @@ -0,0 +1,29 @@ +; ===================== +; +; newBoot (c) Mahrouss Logic. +; +; ===================== + +; This file is meant to be for ARC + +extern __AppMain + +__probe_hardware_threads: + lea 0x8100000 ; same as before, this alters the rr. + ret + +__init_hardware_threads: + lea 0x8000000 ; this alters return register, do not touch it. + ret + +__start: + jmp __probe_hardware_threads ; Probe and register these threads. + jmp __init_hardware_threads ; Setup, and hang any threads. + jmp __AppMain +L0: + spi ; stop process interrupt + hlt + jmp L0 + +;; put this at the end, XPM header. +%include "XPM.inc"
\ No newline at end of file diff --git a/newBoot/Source/Arch/NewCPU/XPM.inc b/newBoot/Source/Arch/NewCPU/XPM.inc new file mode 100644 index 00000000..ac590456 --- /dev/null +++ b/newBoot/Source/Arch/NewCPU/XPM.inc @@ -0,0 +1,35 @@ +;* +; * ======================================================== +; * +; * newBoot +; * Copyright Mahrouss Logic, all rights reserved. +; * +; * ======================================================== +; * + +;; Root directory + +kBootBlockIdent: db "XPMNC", 0 +kBootBlockMagic: db "bootloader", 0 +kBootBlockGUID: db "C218439A-5939-4C9D-82AC-ADED46E9243C", 0 +kBootBlockVersion: dw 1 +kBootBlockNumBlocks: dw 1 +kBootBlockSectorSz: dw 4096 +kBootBlockSectorStart: dw 512 + +;; Boot directory + +kPartBlockName: db "bootloader_exec", 0 +kPartBlockMagic: dw 0xEDAD +kPartBlockSectorEnd: dw 0 +kPartBlockSectorStart: dw 1024 +kPartBlockSize: dw 0 +kPartBlockPartType: dw 1 +kPartBlockVer: dw 1 +kPartBlockFs: db "Files32", 0 + +kPartBlockReserved1: dq 0xFFFF +kPartBlockReserved2: dq 0xFFFF +kPartBlockReserved3: dq 0xFFFF + +;; End of directory |
