diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1994-02-22 22:59:40 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1994-02-22 22:59:40 +0000 |
commit | b1f89ae5ebb76e02231ab1d8763b28f93f1733ab (patch) | |
tree | 4328c1e4fc20e76bb7d438a49872aada74fbe29e | |
parent | 491fafd482812fcd9caf7dabe0786c849b0d2634 (diff) | |
download | FreeBSD-src-b1f89ae5ebb76e02231ab1d8763b28f93f1733ab.zip FreeBSD-src-b1f89ae5ebb76e02231ab1d8763b28f93f1733ab.tar.gz |
Bump boot block revision to 1.9 by a dummy edit on disk.c and:
>From: bde@kralizec.zeta.org.au (Bruce Evans)
Subject: cache botch in bootstrap
Date: Sun, 20 Feb 94 18:14:35 +1100
The cache in the bootstrap loader didn't allow for the device changing.
This caused surprisingly little trouble - the cache is only for a single
track (or part of a track), and the first access to a new device is
always for an early sector, so there is no problem unless the last access
to the old device was for an early sector. I saw the problem on a system
with BSD on wd1 and no label on wd0. Everything worked if the the device
name wd(1,a) was specified before the default of wd(0,a) was tried, but
when the default was tried, it failed on the first sector because there
was no label, and then the first sector on wd0 was always used instead
of the first sector on wd1, so there was apparently no label on wd1
either.
Bruce
-rw-r--r-- | sys/i386/boot/biosboot/boot.c | 4 | ||||
-rw-r--r-- | sys/i386/boot/biosboot/disk.c | 6 | ||||
-rw-r--r-- | sys/i386/boot/boot.c | 4 | ||||
-rw-r--r-- | sys/i386/boot/disk.c | 6 |
4 files changed, 12 insertions, 8 deletions
diff --git a/sys/i386/boot/biosboot/boot.c b/sys/i386/boot/biosboot/boot.c index 1e15ab7..34aedce 100644 --- a/sys/i386/boot/biosboot/boot.c +++ b/sys/i386/boot/biosboot/boot.c @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, [92/04/03 16:51:14 rvb] - * $Id: boot.c,v 1.7 1993/10/15 12:33:03 rgrimes Exp $ + * $Id: boot.c,v 1.8 1993/10/16 19:11:31 rgrimes Exp $ */ @@ -76,7 +76,7 @@ int drive; ouraddr, argv[7] = memsize(0), argv[8] = memsize(1), - "$Revision: 1.7 $"); + "$Revision: 1.9 $"); printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n"); gateA20(); loadstart: diff --git a/sys/i386/boot/biosboot/disk.c b/sys/i386/boot/biosboot/disk.c index a8d1602..36358ab 100644 --- a/sys/i386/boot/biosboot/disk.c +++ b/sys/i386/boot/biosboot/disk.c @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, Revision 2.2 92/04/04 11:35:49 rpd - * $Id$ + * $Id: disk.c,v 1.3 1993/10/16 19:11:34 rgrimes Exp $ */ #include "boot.h" @@ -166,13 +166,14 @@ devread() */ #define RA_SECTORS 18 static char ra_buf[RA_SECTORS * BPS]; +static int ra_dev; static int ra_end; static int ra_first; Bread(dosdev,sector) int dosdev,sector; { - if (sector < ra_first || sector >= ra_end) + if (dosdev != ra_dev || sector < ra_first || sector >= ra_end) { int cyl, head, sec, nsec; @@ -192,6 +193,7 @@ Bread(dosdev,sector) twiddle(); } } + ra_dev = dosdev; ra_first = sector; ra_end = sector + nsec; } diff --git a/sys/i386/boot/boot.c b/sys/i386/boot/boot.c index 1e15ab7..34aedce 100644 --- a/sys/i386/boot/boot.c +++ b/sys/i386/boot/boot.c @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, [92/04/03 16:51:14 rvb] - * $Id: boot.c,v 1.7 1993/10/15 12:33:03 rgrimes Exp $ + * $Id: boot.c,v 1.8 1993/10/16 19:11:31 rgrimes Exp $ */ @@ -76,7 +76,7 @@ int drive; ouraddr, argv[7] = memsize(0), argv[8] = memsize(1), - "$Revision: 1.7 $"); + "$Revision: 1.9 $"); printf("use hd(1,a)/386bsd to boot sd0 when wd0 is also installed\n"); gateA20(); loadstart: diff --git a/sys/i386/boot/disk.c b/sys/i386/boot/disk.c index a8d1602..36358ab 100644 --- a/sys/i386/boot/disk.c +++ b/sys/i386/boot/disk.c @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, Revision 2.2 92/04/04 11:35:49 rpd - * $Id$ + * $Id: disk.c,v 1.3 1993/10/16 19:11:34 rgrimes Exp $ */ #include "boot.h" @@ -166,13 +166,14 @@ devread() */ #define RA_SECTORS 18 static char ra_buf[RA_SECTORS * BPS]; +static int ra_dev; static int ra_end; static int ra_first; Bread(dosdev,sector) int dosdev,sector; { - if (sector < ra_first || sector >= ra_end) + if (dosdev != ra_dev || sector < ra_first || sector >= ra_end) { int cyl, head, sec, nsec; @@ -192,6 +193,7 @@ Bread(dosdev,sector) twiddle(); } } + ra_dev = dosdev; ra_first = sector; ra_end = sector + nsec; } |