summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1998-05-02 02:06:08 +0000
committerkato <kato@FreeBSD.org>1998-05-02 02:06:08 +0000
commitbaae1397256ee57a982ceee6c1411d850793a01f (patch)
treeec84ff3cf42e2e72a4bda558a650224ad5051456 /sys
parent60e8af1f2fbede010858f0b1da02becba1388a23 (diff)
downloadFreeBSD-src-baae1397256ee57a982ceee6c1411d850793a01f.zip
FreeBSD-src-baae1397256ee57a982ceee6c1411d850793a01f.tar.gz
Support 1.44MB floppy disk.
Submitted by: Nobuyuki Koganemaru <kogane@koganemaru.co.jp>, NOKUBI Hirotaka <hnokubi@yyy.or.jp>
Diffstat (limited to 'sys')
-rw-r--r--sys/pc98/boot/biosboot/bios.S13
-rw-r--r--sys/pc98/boot/biosboot/start.S7
-rw-r--r--sys/pc98/boot/biosboot/sys.c7
-rw-r--r--sys/pc98/boot/biosboot/table.c4
4 files changed, 25 insertions, 6 deletions
diff --git a/sys/pc98/boot/biosboot/bios.S b/sys/pc98/boot/biosboot/bios.S
index d3c444f..2d45651 100644
--- a/sys/pc98/boot/biosboot/bios.S
+++ b/sys/pc98/boot/biosboot/bios.S
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:34:26 rpd
- * $Id: bios.S,v 1.7 1997/05/18 12:28:38 kato Exp $
+ * $Id: bios.S,v 1.8 1997/07/13 12:13:01 kato Exp $
*/
/*
@@ -123,8 +123,11 @@ ENTRY(biosread)
movb 0x08(%ebp), %al /* DA/UA */
movb $0x06, %ah
andb $0xf0, %al
+ cmpb $0x30, %al
+ jz fd
cmpb $0x90, %al
jnz 1f
+fd:
incb %dl
movb $0x02, %ch
movb $0xd6, %ah
@@ -357,6 +360,8 @@ ENTRY(get_diskinfo)
movb %dl, %al /* ask for disk info */
andb $0xf0, %al
+ cmpb $0x30, %al
+ jz fdd4
cmpb $0x90, %al
jz fdd
@@ -370,7 +375,12 @@ ENTRY(get_diskinfo)
* Urk. Call failed. It is not supported for floppies by old BIOS's.
* Guess it's a 15-sector floppy.
*/
+fdd4:
+ movb $18, %dl
+ jmp 1f
fdd:
+ movb $15, %dl /* max sector */
+1:
subb %ah, %ah /* %ax = 0 */
movb %al, %al
movb %ah, %bh /* %bh = 0 */
@@ -379,7 +389,6 @@ fdd:
movb $79, %ch /* max track */
movb $1, %cl /* # floppy drives installed */
movb $2, %dh /* max head */
- movb $15, %dl /* max sector */
/* es:di = parameter table */
/* carry = 0 */
ok:
diff --git a/sys/pc98/boot/biosboot/start.S b/sys/pc98/boot/biosboot/start.S
index 0a57627..2a545b5 100644
--- a/sys/pc98/boot/biosboot/start.S
+++ b/sys/pc98/boot/biosboot/start.S
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:29 rpd
- * $Id$
+ * $Id: start.S,v 1.4 1997/02/22 09:43:09 peter Exp $
*/
/*
@@ -195,6 +195,9 @@ nothireso:
/* bootstrap passes */
mov %cs, %bx
data32
+ cmp $0x1fe0, %ebx
+ jz fd
+ data32
cmp $0x1fc0, %ebx
jnz hd
data32
@@ -204,6 +207,8 @@ nothireso:
addr32
movb 0x584, %al
andb $0xf0, %al
+ cmpb $0x30, %al
+ jz fd
cmpb $0x90, %al
jnz hd
fd:
diff --git a/sys/pc98/boot/biosboot/sys.c b/sys/pc98/boot/biosboot/sys.c
index 9ec7767..ab70bbe 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.13 1997/06/09 13:44:04 kato Exp $
+ * $Id: sys.c,v 1.14 1998/04/12 04:48:11 kato Exp $
*/
/*
@@ -292,6 +292,11 @@ openrd(void)
dosdev_copy = biosdrive;
#endif
break;
+#ifdef PC98
+ case 6:/* 1.44MB FD */
+ dosdev_copy = (maj << 3) | unit;
+ break;
+#endif
default:
printf("Unknown device\n");
return 1;
diff --git a/sys/pc98/boot/biosboot/table.c b/sys/pc98/boot/biosboot/table.c
index 12451b1..120d7ef 100644
--- a/sys/pc98/boot/biosboot/table.c
+++ b/sys/pc98/boot/biosboot/table.c
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:43 rpd
- * $Id$
+ * $Id: table.c,v 1.5 1997/02/22 09:43:11 peter Exp $
*/
/*
@@ -145,5 +145,5 @@ struct pseudo_desc Idtr_real = { 0x400 - 1, 0x0, 0x0 };
* All initialized data is defined in one file to reduce space wastage from
* fragmentation.
*/
-char *devs[] = { "wd", "dk", "fd", "wt", "sd", 0 };
+char *devs[] = { "wd", "dk", "fd", "wt", "sd", "dk", "fd", 0 };
unsigned long tw_chars = 0x5C2D2F7C; /* "\-/|" */
OpenPOWER on IntegriCloud