#include
.global multiboot_entry
.section .boot
/*Multiboot header, 32-bit aligned.*/
.align 4
.long (MULTIBOOT_HEADER_MAGIC)
.long (MULTIBOOT_HEADER_FLAGS)
.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
.align 4
multiboot_entry:
mov $boot_stack_top,%esp
push %eax /*magic value*/
push %ebx /*Multiboot information structure*/
call setup_param
/* Enter kernel. */
sti
call kmain
hang:
cli
hlt
jmp hang
.align 4096
dummy:
.fill 4096*8,1,0 /*stack must big enough~~*/
boot_stack_top:
阅读(1104) | 评论(0) | 转发(0) |