diff options
author | bde <bde@FreeBSD.org> | 1995-11-18 05:25:24 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-11-18 05:25:24 +0000 |
commit | 2d5609b7aed6e690a08c48c37241ac94d79e3579 (patch) | |
tree | 1e5df8356b8b82fbbe26d5c36f3d097bb6a7b46f /sys/i386/boot/kzipboot | |
parent | ba88374c643085c4054ad6d53256a572cbe37ca5 (diff) | |
download | FreeBSD-src-2d5609b7aed6e690a08c48c37241ac94d79e3579.zip FreeBSD-src-2d5609b7aed6e690a08c48c37241ac94d79e3579.tar.gz |
Removed bogus padding that wasted 0x500 bytes.
Improved code and comments. Don't do anything except transfer control
in the head.o module.
Diffstat (limited to 'sys/i386/boot/kzipboot')
-rw-r--r-- | sys/i386/boot/kzipboot/head.S | 16 | ||||
-rw-r--r-- | sys/i386/boot/kzipboot/tail.S | 10 |
2 files changed, 12 insertions, 14 deletions
diff --git a/sys/i386/boot/kzipboot/head.S b/sys/i386/boot/kzipboot/head.S index 66d29b1..914e5e2 100644 --- a/sys/i386/boot/kzipboot/head.S +++ b/sys/i386/boot/kzipboot/head.S @@ -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 diff --git a/sys/i386/boot/kzipboot/tail.S b/sys/i386/boot/kzipboot/tail.S index 1a34541..5dcee9c 100644 --- a/sys/i386/boot/kzipboot/tail.S +++ b/sys/i386/boot/kzipboot/tail.S @@ -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 |