summaryrefslogtreecommitdiffstats
path: root/sys/i386/boot/kzipboot
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-10-06 02:57:26 +0000
committerpeter <peter@FreeBSD.org>1995-10-06 02:57:26 +0000
commitd76ed025851872b45fc81bd8a17258ed239a8bbd (patch)
treed4f732b74bc57e66c4bf966087cd3d698c32df52 /sys/i386/boot/kzipboot
parentedc5cbc960eb072befe775f7b08491807b8e943e (diff)
downloadFreeBSD-src-d76ed025851872b45fc81bd8a17258ed239a8bbd.zip
FreeBSD-src-d76ed025851872b45fc81bd8a17258ed239a8bbd.tar.gz
Part 2 of the overlapping kzip changes.
Submitted by: Gary Jones(?) <gj@freefall>
Diffstat (limited to 'sys/i386/boot/kzipboot')
-rw-r--r--sys/i386/boot/kzipboot/Makefile17
-rw-r--r--sys/i386/boot/kzipboot/head.S15
-rw-r--r--sys/i386/boot/kzipboot/tail.S12
3 files changed, 31 insertions, 13 deletions
diff --git a/sys/i386/boot/kzipboot/Makefile b/sys/i386/boot/kzipboot/Makefile
index 7295df1..4259d8f 100644
--- a/sys/i386/boot/kzipboot/Makefile
+++ b/sys/i386/boot/kzipboot/Makefile
@@ -1,8 +1,10 @@
-# $Id: Makefile,v 1.2 1995/05/29 01:38:03 phk Exp $
+# $Id: Makefile,v 1.3 1995/08/15 19:36:02 joerg Exp $
-PROG= kzip.o
+PROG= kztail.o kzhead.o
BINMODE = 444 # target is a relocatable object
-SRCS= head.S boot.c unzip.c misc.c malloc.c inflate.c
+SRCS= tail.S head.S boot.c unzip.c misc.c malloc.c inflate.c
+OBJS_KZHEAD= head.o
+OBJS_KZTAIL= tail.o boot.o unzip.o misc.o malloc.o inflate.o
BINDIR= /usr/lib
.PATH: ${.CURDIR}/../../../kern
NOMAN= toobad
@@ -13,12 +15,15 @@ KADDR = 0x100000
# What segment our code lives in
CSEG = 0x8
-STRIP= # very important!! don't let kzip.o be stripped
+STRIP= # very important!! don't let kz*.o be stripped
CFLAGS+= -DKADDR=$(KADDR) -DCSEG=$(CSEG)
CFLAGS+= -DKZIP -DCOMCONSOLE=0x3F8
-kzip.o: ${OBJS}
- $(LD) -r -x -o kzip.o $(OBJS)
+kztail.o: ${OBJS_KZTAIL}
+ $(LD) -r -x -o kztail.o $(OBJS_KZTAIL)
+
+kzhead.o: ${OBJS_KZHEAD}
+ $(LD) -r -x -o kzhead.o $(OBJS_KZHEAD)
.include <bsd.prog.mk>
diff --git a/sys/i386/boot/kzipboot/head.S b/sys/i386/boot/kzipboot/head.S
index e720082..66d29b1 100644
--- a/sys/i386/boot/kzipboot/head.S
+++ b/sys/i386/boot/kzipboot/head.S
@@ -1,12 +1,13 @@
/*
- * Boot unpacker startup routine.
+ * Leader for kernel
+ * This needs to be at the beginning, so the start address is passed
+ * to the boot loader
* Copyright (C) Serge Vakulenko
*/
.text
-start:
+ .globl kzstart
+kzstart:
cli # disable interrupts
- pushl 4(%esp) # pass howto arg
- call _boot # unpack the kernel image
- popl %eax # discard howto arg
- ljmp $CSEG, $KADDR # jump to unpacked kernel
- . = start + 0x500 # skip over warm boot shit
+ call start # unpack the kernel image
+ # never return here.
+ . = kzstart + 0x500 # skip warm boot stuff
diff --git a/sys/i386/boot/kzipboot/tail.S b/sys/i386/boot/kzipboot/tail.S
new file mode 100644
index 0000000..1a34541
--- /dev/null
+++ b/sys/i386/boot/kzipboot/tail.S
@@ -0,0 +1,12 @@
+/*
+ * Boot unpacker startup routine.
+ * Copyright (C) Serge Vakulenko
+ */
+ .text
+ .globl start
+start:
+ popl %eax # remove return addr
+ pushl 4(%esp) # pass howto arg
+ call _boot # unpack the kernel image
+ popl %eax # discard howto arg
+ ljmp $CSEG, $KADDR # jump to unpacked kernel
OpenPOWER on IntegriCloud