kern
annotate src/boot/mboot.S @ 15:7f9af8cddc96
removed redundant zero-fill in multiboot header
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 05 Mar 2011 16:59:49 +0200 |
parents | b11a86695493 |
children | 2cbc2b922e49 |
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@0 | 12 |
nuclear@1 | 13 .globl kentry |
nuclear@0 | 14 kentry: |
nuclear@0 | 15 /* setup a temporary kernel stack */ |
nuclear@0 | 16 movl $(stack + STACK_SIZE), %esp |
nuclear@0 | 17 /* reset eflags register */ |
nuclear@0 | 18 pushl $0 |
nuclear@0 | 19 popf |
nuclear@0 | 20 /* call the kernel main function */ |
nuclear@0 | 21 call kmain |
nuclear@0 | 22 /* we dropped out of main, halt the CPU */ |
nuclear@0 | 23 cli |
nuclear@0 | 24 hlt |
nuclear@0 | 25 |
nuclear@0 | 26 /* space for the temporary kernel stack */ |
nuclear@0 | 27 .comm stack, STACK_SIZE |