summaryrefslogtreecommitdiff
path: root/src/sys/arch/amd64/locore.S
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-09-13 18:57:35 -0400
committerIan Moffett <ian@osmora.org>2025-09-13 18:57:35 -0400
commit4eed9b3128b31a4583a7f94f6574cd87bcf505ff (patch)
tree75588d14250ea29b31ac3c8ac3d639a2c4797831 /src/sys/arch/amd64/locore.S
parent4326c0c6a3ad799c6dbbefd238e0577b94e9c45a (diff)
build: 'i386' -> 'amd64'
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/arch/amd64/locore.S')
-rw-r--r--src/sys/arch/amd64/locore.S42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/sys/arch/amd64/locore.S b/src/sys/arch/amd64/locore.S
new file mode 100644
index 0000000..5f7c3df
--- /dev/null
+++ b/src/sys/arch/amd64/locore.S
@@ -0,0 +1,42 @@
+ .set MAGIC, 0xe85250d6
+ .set ARCH, 0x00 // i386, protected mode
+ .set LEN, hdr_end - hdr_start
+ .set CHECKSUM, 0x100000000 - (0xe85250d6 + 0 + (hdr_end - hdr_start))
+
+ .section .multiboot
+ .align 4
+hdr_start:
+ .long MAGIC
+ .long ARCH
+ .long LEN
+ .long CHECKSUM
+hdr_end:
+
+fbtag_start:
+ .word 5 // Type
+ .word 1 // Flags
+ .long fbtag_end - fbtag_start // Length
+ .long 800 // Width
+ .long 600 // Height
+ .long 32 // Depth
+fbtag_end:
+
+ .align 8
+endtag:
+ .word 0
+ .word 0
+ .word 8
+
+ .text
+ .code32
+ .globl _start
+_start:
+ cli
+ mov stack_bottom, %esp
+ push %ebx
+ push %eax
+ jmp main
+
+ .section .bss
+stack_bottom:
+ .fill 4096 * 16, 0