kern

view src/mboot.S @ 8:78d5c304ddd0

minor changes
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 16 Feb 2011 07:50:25 +0200
parents 662ff2170531
children af6f4adc43d6
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 /* 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