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
|
||||
* This needs to be at the beginning, so the start address is passed
|
||||
* to the boot loader
|
||||
* First module in a kzipped kernel.
|
||||
* This needs to be at the beginning so that the boot loader calls it.
|
||||
* 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
|
||||
*/
|
||||
.text
|
||||
.globl kzstart
|
||||
kzstart:
|
||||
cli # disable interrupts
|
||||
call start # unpack the kernel image
|
||||
# never return here.
|
||||
. = kzstart + 0x500 # skip warm boot stuff
|
||||
head:
|
||||
jmp tail
|
||||
|
@ -3,10 +3,10 @@
|
||||
* Copyright (C) Serge Vakulenko
|
||||
*/
|
||||
.text
|
||||
.globl start
|
||||
start:
|
||||
popl %eax # remove return addr
|
||||
.globl tail
|
||||
tail:
|
||||
cli # disable interrupts
|
||||
pushl 4(%esp) # pass howto arg
|
||||
call _boot # unpack the kernel image
|
||||
call _boot # unpack the kernel image
|
||||
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