diff options
author | Mats O Jansson <maja@cvs.openbsd.org> | 1997-09-10 11:54:43 +0000 |
---|---|---|
committer | Mats O Jansson <maja@cvs.openbsd.org> | 1997-09-10 11:54:43 +0000 |
commit | 6872085ee6a866a1f903e87bab7d09e8720640c2 (patch) | |
tree | 982676f152de2dd4ac67a4d99eb8dc9e06cce24d /sys/arch | |
parent | cb02f2816e26d841fb60e726ceae630d865b44d8 (diff) |
Sync with NetBSD 970516. -moj
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/vax/mscp/mscp_disk.c | 17 | ||||
-rw-r--r-- | sys/arch/vax/mscp/mscpreg.h | 6 |
2 files changed, 18 insertions, 5 deletions
diff --git a/sys/arch/vax/mscp/mscp_disk.c b/sys/arch/vax/mscp/mscp_disk.c index 54c3f01484b..de7f63beda6 100644 --- a/sys/arch/vax/mscp/mscp_disk.c +++ b/sys/arch/vax/mscp/mscp_disk.c @@ -1,5 +1,5 @@ -/* $OpenBSD: mscp_disk.c,v 1.3 1997/08/08 21:46:56 niklas Exp $ */ -/* $NetBSD: mscp_disk.c,v 1.7 1997/01/11 11:20:32 ragge Exp $ */ +/* $OpenBSD: mscp_disk.c,v 1.4 1997/09/10 11:54:42 maja Exp $ */ +/* $NetBSD: mscp_disk.c,v 1.10 1997/03/15 16:32:19 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * Copyright (c) 1988 Regents of the University of California. @@ -58,6 +58,10 @@ #include <sys/fcntl.h> #include <sys/proc.h> #include <sys/systm.h> +#include <sys/reboot.h> + +#include <machine/cpu.h> +#include <machine/rpb.h> #include <ufs/ffs/fs.h> /* For some disklabel stuff */ @@ -121,7 +125,7 @@ struct mscp_device ra_device = { #define raminor(u, p) (((u) << UNITSHIFT) | (p)) struct cfdriver ra_cd = { - NULL, "ra", DV_DULL + NULL, "ra", DV_DISK }; struct cfattach ra_ca = { @@ -187,6 +191,13 @@ raattach(parent, self, aux) dl->d_ntracks = mp->mscp_guse.guse_ngpc; dl->d_secpercyl = dl->d_nsectors * dl->d_ntracks; disk_printtype(mp->mscp_unit, mp->mscp_guse.guse_mediaid); + /* + * Find out if we booted from this disk. + */ + if ((B_TYPE(bootdev) == BDEV_UDA) && (ra->ra_hwunit == B_UNIT(bootdev)) + && (mi->mi_ctlrnr == B_CONTROLLER(bootdev)) + && (mi->mi_adapnr == B_ADAPTOR(bootdev))) + booted_from = self; } /* diff --git a/sys/arch/vax/mscp/mscpreg.h b/sys/arch/vax/mscp/mscpreg.h index b98a4653847..065996ada8d 100644 --- a/sys/arch/vax/mscp/mscpreg.h +++ b/sys/arch/vax/mscp/mscpreg.h @@ -1,5 +1,5 @@ -/* $OpenBSD: mscpreg.h,v 1.2 1997/05/29 00:05:04 niklas Exp $ */ -/* $NetBSD: mscpreg.h,v 1.1 1996/07/01 20:41:37 ragge Exp $ */ +/* $OpenBSD: mscpreg.h,v 1.3 1997/09/10 11:54:42 maja Exp $ */ +/* $NetBSD: mscpreg.h,v 1.2 1997/03/15 16:39:20 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * Copyright (c) 1988 Regents of the University of California. @@ -46,10 +46,12 @@ * If you get warnings about your command ring being too small, * try increasing the values by one. */ +#ifndef NRSP #define NRSPL2 5 #define NCMDL2 5 #define NRSP (1 << NRSPL2) #define NCMD (1 << NCMDL2) +#endif /* * Communication area definition. This seems to be the same for |