kern

annotate src/mboot.S @ 9:af6f4adc43d6

fixed a bug in strrchr and some warnings
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 16 Feb 2011 08:01:19 +0200
parents ebe5e0e44a9d
children
rev   line source
nuclear@0 1 #define MAGIC 0x1badb002
nuclear@0 2 #define FLAGS 0
nuclear@0 3 #define STACK_SIZE 0x4000
nuclear@0 4
nuclear@0 5 .text
nuclear@0 6 .align 4
nuclear@1 7
nuclear@0 8 /* multiboot header */
nuclear@0 9 .long MAGIC
nuclear@0 10 .long FLAGS
nuclear@0 11 .long -(MAGIC + FLAGS) /* checksum */
nuclear@9 12 .fill 5, 4, 0 /* fill out the rest with zeroes */
nuclear@0 13
nuclear@1 14 .globl kentry
nuclear@0 15 kentry:
nuclear@0 16 /* setup a temporary kernel stack */
nuclear@0 17 movl $(stack + STACK_SIZE), %esp
nuclear@0 18 /* reset eflags register */
nuclear@0 19 pushl $0
nuclear@0 20 popf
nuclear@0 21 /* call the kernel main function */
nuclear@0 22 call kmain
nuclear@0 23 /* we dropped out of main, halt the CPU */
nuclear@0 24 cli
nuclear@0 25 hlt
nuclear@0 26
nuclear@0 27 /* space for the temporary kernel stack */
nuclear@0 28 .comm stack, STACK_SIZE