summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/gptboot
diff options
context:
space:
mode:
authorrnordier <rnordier@FreeBSD.org>1998-11-08 15:36:35 +0000
committerrnordier <rnordier@FreeBSD.org>1998-11-08 15:36:35 +0000
commit040db5b721b3675b8704bc732d5a12fd787e9bae (patch)
tree4077a757170bbbf58cdb7718462ea20b90ac187d /sys/boot/i386/gptboot
parented31c0e42c68d25c0677c288695549d32c405eac (diff)
downloadFreeBSD-src-040db5b721b3675b8704bc732d5a12fd787e9bae.zip
FreeBSD-src-040db5b721b3675b8704bc732d5a12fd787e9bae.tar.gz
boot1: Eliminate EDD detection and optional use of disk packet
interface. Do some general consistency fixes and space optimizations. Use of some freed-up space to defend against possible BIOS misfeatures. boot2: Revise disk read interface to provide for boot1 changes. Free up space for this.
Diffstat (limited to 'sys/boot/i386/gptboot')
-rw-r--r--sys/boot/i386/gptboot/Makefile5
-rw-r--r--sys/boot/i386/gptboot/gptboot.c13
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/boot/i386/gptboot/Makefile b/sys/boot/i386/gptboot/Makefile
index b7823bf..d3711b0 100644
--- a/sys/boot/i386/gptboot/Makefile
+++ b/sys/boot/i386/gptboot/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.8 1998/10/20 20:20:48 rnordier Exp $
+# $Id: Makefile,v 1.9 1998/11/05 20:52:25 rnordier Exp $
PROG= boot2
NOMAN=
@@ -11,7 +11,6 @@ CLEANFILES+= boot1 boot1.out boot1.o \
M4?= m4
-B1INT13X?= 0
B2SIOPRT?= 0x3f8
B2SIOFMT?= 0x3
B2SIODIV?= 0xc
@@ -42,7 +41,7 @@ boot1.out: boot1.o
${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o
boot1.o: boot1.m4 boot1.s
- (cd ${.CURDIR}; ${M4} -DFLAGS=${B1INT13X} boot1.m4 boot1.s) | \
+ (cd ${.CURDIR}; ${M4} boot1.m4 boot1.s) | \
${AS} ${AFLAGS} -o ${.TARGET}
boot2: boot2.ldr boot2.bin
diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c
index 03aa3b2..db6f1fc 100644
--- a/sys/boot/i386/gptboot/gptboot.c
+++ b/sys/boot/i386/gptboot/gptboot.c
@@ -14,7 +14,7 @@
*/
/*
- * $Id: boot2.c,v 1.12 1998/10/17 11:25:05 rnordier Exp $
+ * $Id: boot2.c,v 1.13 1998/10/27 20:16:36 rnordier Exp $
*/
#include <sys/param.h>
@@ -297,7 +297,7 @@ load(const char *fname)
addr = hdr.eh.e_entry & 0xffffff;
}
bootinfo.bi_esymtab = VTOP(p);
- printf("]\nentry=0x%x\n", addr);
+ printf("]\n");
bootinfo.bi_kernelname = VTOP(fname);
__exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK),
MAKEBOOTDEV(dsk.type, 0, dsk.slice, dsk.unit, dsk.part),
@@ -748,10 +748,11 @@ drvread(void *buf, unsigned lba, unsigned nblk)
printf("%c\b", c = c << 8 | c >> 24);
v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS;
v86.addr = 0x604;
- v86.eax = nblk;
- v86.ebx = VTOPSEG(buf) << 16 | VTOPOFF(buf);
- v86.ecx = lba;
- v86.edx = 0x100 | dsk.drive;
+ v86.es = VTOPSEG(buf);
+ v86.eax = lba;
+ v86.ebx = VTOPOFF(buf);
+ v86.ecx = lba >> 16;
+ v86.edx = nblk << 8 | dsk.drive;
v86int();
v86.ctl = V86_FLAGS;
if (V86_CY(v86.efl)) {
OpenPOWER on IntegriCloud