summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1998-04-12 04:48:11 +0000
committerkato <kato@FreeBSD.org>1998-04-12 04:48:11 +0000
commit03caf63ff9e14043cda0cdebf99f4c3e4f0e9203 (patch)
tree8d20c338116027da820de6054e4439531c119610 /sys/pc98
parentff82497e668ce877683f4982d4da5a31b9b80db3 (diff)
downloadFreeBSD-src-03caf63ff9e14043cda0cdebf99f4c3e4f0e9203.zip
FreeBSD-src-03caf63ff9e14043cda0cdebf99f4c3e4f0e9203.tar.gz
Fix the problem when SCSI ID is not contiguous.
Submitted by: URATA Shuichiro <s-urata@nmit.tmg.nec.co.jp>
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/boot/biosboot/boot.c16
-rw-r--r--sys/pc98/boot/biosboot/sys.c18
2 files changed, 20 insertions, 14 deletions
diff --git a/sys/pc98/boot/biosboot/boot.c b/sys/pc98/boot/biosboot/boot.c
index c1adea0..2f47a43 100644
--- a/sys/pc98/boot/biosboot/boot.c
+++ b/sys/pc98/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.15 1997/09/01 10:38:30 kato Exp $
+ * $Id: boot.c,v 1.16 1998/02/02 07:56:14 kato Exp $
*/
@@ -86,6 +86,10 @@ void
boot(int drive)
{
int ret;
+#ifdef PC98
+ int i;
+ unsigned char disk_equips;
+#endif
/* Pick up the story from the Bios on geometry of disks */
@@ -118,7 +122,15 @@ boot(int drive)
dosdev = drive;
#ifdef PC98
maj = (drive&0x70) >> 3; /* a good first bet */
- unit = drive & 0x0f;
+ if (maj == 4) { /* sd */
+ disk_equips = *(unsigned char *)V(0xA1482);
+ unit = 0;
+ for (i=0; i<(drive&0x0f); i++) {
+ unit += (disk_equips >> i) & 1;
+ }
+ } else {
+ unit = drive & 0x0f;
+ }
#else /* IBM-PC */
maj = 2;
unit = drive & 0x7f;
diff --git a/sys/pc98/boot/biosboot/sys.c b/sys/pc98/boot/biosboot/sys.c
index afdc547..9ec7767 100644
--- a/sys/pc98/boot/biosboot/sys.c
+++ b/sys/pc98/boot/biosboot/sys.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:34 rpd
- * $Id: sys.c,v 1.12 1997/05/28 09:23:00 kato Exp $
+ * $Id: sys.c,v 1.13 1997/06/09 13:44:04 kato Exp $
*/
/*
@@ -204,11 +204,6 @@ openrd(void)
char **devp, *name0 = name, *cp = name0;
int biosdrive, dosdev_copy, ret;
-#ifdef PC98
- int i;
- unsigned char disk_equips;
- int sdunit = 0;
-#endif
/*******************************************************\
* If bracket given look for preceding device name *
\*******************************************************/
@@ -266,7 +261,11 @@ openrd(void)
}
biosdrive = biosdrivedigit - '0';
if (biosdrivedigit == '\0') {
+#ifdef PC98
+ biosdrive = dosdev & 0x0f;
+#else
biosdrive = unit;
+#endif
#if BOOT_HD_BIAS > 0
/* XXX */
if (maj == 4)
@@ -277,12 +276,7 @@ openrd(void)
{
#ifdef PC98
case 4: /* sd */
- dosdev_copy = unit | 0xa0;
- disk_equips = *(unsigned char *)V(0xA1482);
- sdunit = unit;
- unit = 0;
- for (i = 0; i < sdunit; i++)
- unit += ((disk_equips >> i) & 0x01);
+ dosdev_copy = biosdrive | 0xa0;
#else /* IBM-PC */
case 0:
case 4:
OpenPOWER on IntegriCloud