Removed bogus padding that wasted 0x500 bytes.
Improved code and comments. Don't do anything except transfer control in the head.o module.
This commit is contained in:
parent
a87c854a14
commit
92b86cc420
@ -1,13 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
* Leader for kernel
|
* First module in a kzipped kernel.
|
||||||
* This needs to be at the beginning, so the start address is passed
|
* This needs to be at the beginning so that the boot loader calls it.
|
||||||
* to the boot loader
|
* It may be overwritten by uncompressing the kernel, so it transfers
|
||||||
|
* control to a higher address that won't be overwritten.
|
||||||
|
*
|
||||||
* Copyright (C) Serge Vakulenko
|
* Copyright (C) Serge Vakulenko
|
||||||
*/
|
*/
|
||||||
.text
|
.text
|
||||||
.globl kzstart
|
head:
|
||||||
kzstart:
|
jmp tail
|
||||||
cli # disable interrupts
|
|
||||||
call start # unpack the kernel image
|
|
||||||
# never return here.
|
|
||||||
. = kzstart + 0x500 # skip warm boot stuff
|
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
* Copyright (C) Serge Vakulenko
|
* Copyright (C) Serge Vakulenko
|
||||||
*/
|
*/
|
||||||
.text
|
.text
|
||||||
.globl start
|
.globl tail
|
||||||
start:
|
tail:
|
||||||
popl %eax # remove return addr
|
cli # disable interrupts
|
||||||
pushl 4(%esp) # pass howto arg
|
pushl 4(%esp) # pass howto arg
|
||||||
call _boot # unpack the kernel image
|
call _boot # unpack the kernel image
|
||||||
popl %eax # discard howto arg
|
popl %eax # discard howto arg
|
||||||
ljmp $CSEG, $KADDR # jump to unpacked kernel
|
ljmp $CSEG, $KADDR # jump to unpacked kernel
|
||||||
|
Loading…
Reference in New Issue
Block a user