kern

view src/boot/mboot.S @ 10:b11a86695493

interrupt handling
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 18 Feb 2011 08:42:32 +0200
parents src/mboot.S@af6f4adc43d6
children 7f9af8cddc96
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