diff options
author | bde <bde@FreeBSD.org> | 1994-12-18 19:14:19 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1994-12-18 19:14:19 +0000 |
commit | 761d6c11bdaeaa61befd4a9481f13b314f0fa34f (patch) | |
tree | f09d253b3f7978fb50e1cb3270242402307bf88e | |
parent | 30a0fe9c6678c8a036489ab7a1158bc052d2cf77 (diff) | |
download | FreeBSD-src-761d6c11bdaeaa61befd4a9481f13b314f0fa34f.zip FreeBSD-src-761d6c11bdaeaa61befd4a9481f13b314f0fa34f.tar.gz |
Pass the slice number of the boot device to the kernel in the previously
unused bitfields for the adaptor and the controller. It should go in
the bitfield for the partition but that would not be backwards compatible.
-rw-r--r-- | sys/i386/boot/biosboot/Makefile | 4 | ||||
-rw-r--r-- | sys/i386/boot/biosboot/boot.c | 12 | ||||
-rw-r--r-- | sys/i386/boot/biosboot/boot.h | 4 | ||||
-rw-r--r-- | sys/i386/boot/biosboot/disk.c | 5 |
4 files changed, 16 insertions, 9 deletions
diff --git a/sys/i386/boot/biosboot/Makefile b/sys/i386/boot/biosboot/Makefile index 15a2e30..d147e75 100644 --- a/sys/i386/boot/biosboot/Makefile +++ b/sys/i386/boot/biosboot/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.21 1994/10/28 07:54:13 rgrimes Exp $ +# $Id: Makefile,v 1.22 1994/11/05 21:06:16 ache Exp $ # PROG= boot @@ -7,7 +7,7 @@ SRCS= start.S table.c boot2.S boot.c asm.S bios.S io.c disk.c sys.c BINDIR= /usr/mdec BINMODE= 444 -CFLAGS= -O -DDO_BAD144 -DBOOTWAIT=${BOOTWAIT} +CFLAGS= -O -DDO_BAD144 -DBOOTWAIT=${BOOTWAIT} CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK} CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../.. CLEANFILES+= boot.nohdr boot.strip boot1 boot2 diff --git a/sys/i386/boot/biosboot/boot.c b/sys/i386/boot/biosboot/boot.c index cd33609..9c9ce4c 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.26 1994/11/18 13:40:19 jkh Exp $ + * $Id: boot.c,v 1.27 1994/11/26 09:08:48 phk Exp $ */ @@ -221,13 +221,19 @@ loadprog(howto) addr += i; } #endif LOADSYMS + /********************************************************/ /* and note the end address of all this */ /********************************************************/ - total = ((addr+sizeof(int)-1))&~(sizeof(int)-1); printf("total=0x%x ", total); - bootdev = (MAKEBOOTDEV(maj, 0, 0, unit, part)) ; + + /* + * For backwards compatibility, use the previously-unused adaptor + * and controller bitfields to hold the slice number. + */ + bootdev = MAKEBOOTDEV(maj, (slice >> 4), slice & 0xf, unit, part); + /****************************************************************/ /* copy that first page and overwrite any BIOS variables */ /****************************************************************/ diff --git a/sys/i386/boot/biosboot/boot.h b/sys/i386/boot/biosboot/boot.h index 2046990..ad51cc5 100644 --- a/sys/i386/boot/biosboot/boot.h +++ b/sys/i386/boot/biosboot/boot.h @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, Revision 2.2 92/04/04 11:35:03 rpd - * $Id: boot.h,v 1.3 1993/10/16 19:11:32 rgrimes Exp $ + * $Id: boot.h,v 1.4 1994/08/21 17:47:26 paul Exp $ */ #include <sys/types.h> @@ -37,5 +37,5 @@ extern char *devs[], *name, *iodest; extern struct fs *fs; extern struct inode inode; -extern int dosdev, unit, part, maj, boff, poff, bnum, cnt; +extern int dosdev, unit, slice, part, maj, boff, poff, bnum, cnt; extern long int ouraddr; diff --git a/sys/i386/boot/biosboot/disk.c b/sys/i386/boot/biosboot/disk.c index a63ca5a..5669262 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: disk.c,v 1.4 1994/02/22 22:59:40 rgrimes Exp $ + * $Id: disk.c,v 1.5 1994/05/16 03:06:00 ache Exp $ */ /* @@ -63,7 +63,7 @@ int spt, spc; char *iodest; struct fs *fs; struct inode inode; -int dosdev, unit, part, maj, boff, poff, bnum, cnt; +int dosdev, unit, slice, part, maj, boff, poff, bnum, cnt; /*#define EMBEDDED_DISKLABEL 1*/ extern struct disklabel disklabel; @@ -93,6 +93,7 @@ devopen() sector = LABELSECTOR; for (i = 0; i < NDOSPART; i++, dptr++) if (dptr->dp_typ == DOSPTYP_386BSD) { + slice = 1 + i; sector = dptr->dp_start + LABELSECTOR; break; } |