kern
view 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 |
line source
1 #define MAGIC 0x1badb002
2 #define FLAGS 0
3 #define STACK_SIZE 0x4000
5 .text
6 .align 4
8 /* multiboot header */
9 .long MAGIC
10 .long FLAGS
11 .long -(MAGIC + FLAGS) /* checksum */
12 .fill 5, 4, 0 /* fill out the rest with zeroes */
14 .globl kentry
15 kentry:
16 /* setup a temporary kernel stack */
17 movl $(stack + STACK_SIZE), %esp
18 /* reset eflags register */
19 pushl $0
20 popf
21 /* call the kernel main function */
22 call kmain
23 /* we dropped out of main, halt the CPU */
24 cli
25 hlt
27 /* space for the temporary kernel stack */
28 .comm stack, STACK_SIZE