kern

annotate src/boot/mboot.S @ 40:710739e33da8

- now read_rtc doesn't try to read weekday as it's probably wrong anyway, and doesn't set yearday either - mktime now fixes yearday and weekday - moved init_timer and init_rtc just before enabling the interrupts in main
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 12 Jun 2011 15:45:21 +0300
parents 7f9af8cddc96
children
rev   line source
nuclear@0 1 #define MAGIC 0x1badb002
nuclear@16 2 /* flags with bit 1 set means we need memory info */
nuclear@16 3 #define FLAGS 2
nuclear@0 4 #define STACK_SIZE 0x4000
nuclear@0 5
nuclear@0 6 .text
nuclear@0 7 .align 4
nuclear@1 8
nuclear@0 9 /* multiboot header */
nuclear@0 10 .long MAGIC
nuclear@0 11 .long FLAGS
nuclear@0 12 .long -(MAGIC + FLAGS) /* checksum */
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@16 21 /* call the kernel main function. ebx points to the
nuclear@16 22 * multiboot information structure */
nuclear@16 23 push %ebx
nuclear@0 24 call kmain
nuclear@0 25 /* we dropped out of main, halt the CPU */
nuclear@0 26 cli
nuclear@0 27 hlt
nuclear@0 28
nuclear@0 29 /* space for the temporary kernel stack */
nuclear@0 30 .comm stack, STACK_SIZE