aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1995-11-18 05:25:24 +0000
committerBruce Evans <bde@FreeBSD.org>1995-11-18 05:25:24 +0000
commit92b86cc420f44c30bedc17aeef8278b7743f6c8c (patch)
tree1e5df8356b8b82fbbe26d5c36f3d097bb6a7b46f
parenta87c854a14a4f15e837bd3f0ae8e87f747e13861 (diff)
Notes
-rw-r--r--sys/i386/boot/kzipboot/head.S16
-rw-r--r--sys/i386/boot/kzipboot/tail.S10
2 files changed, 12 insertions, 14 deletions
diff --git a/sys/i386/boot/kzipboot/head.S b/sys/i386/boot/kzipboot/head.S
index 66d29b1ecd96..914e5e2a9fac 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 1a345412fa2f..5dcee9c5a89f 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