From 94709d1d93bffa2560b6d5891088e00fdbdcdac0 Mon Sep 17 00:00:00 2001 From: KATO Takenori Date: Thu, 4 Mar 1999 16:38:12 +0000 Subject: [PATCH] Make loader be able to load 1.2MB fd on machines w/ 1.44MB fdd. Sumbmitted by: IMAI Takeshi --- sys/boot/pc98/libpc98/biosdisk.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/boot/pc98/libpc98/biosdisk.c b/sys/boot/pc98/libpc98/biosdisk.c index 453c0b4d535f..3fa04c359fd3 100644 --- a/sys/boot/pc98/libpc98/biosdisk.c +++ b/sys/boot/pc98/libpc98/biosdisk.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: biosdisk.c,v 1.1 1999/02/03 08:39:09 kato Exp $ + * $Id: biosdisk.c,v 1.2 1999/03/04 10:48:14 kato Exp $ */ /* @@ -182,9 +182,12 @@ bd_init(void) if (bdinfo[nbdinfo].bd_flags & BD_FLOPPY){ bdinfo[nbdinfo].bd_drive = 'A' + (unit & 0xf); - if (*(u_char *)PTOV(0x5AE) & (1<<(unit & 0xf))) - /* available 1.44MB access */ - bdinfo[nbdinfo].bd_unit = 0x30 + (unit & 0xf); + /* available 1.44MB access? */ + if (*(u_char *)PTOV(0xA15AE) & (1<<(unit & 0xf))){ + /* boot media 1.2MB FD? */ + if ((*(u_char *)PTOV(0xA1584) & 0xf0) != 0x90) + bdinfo[nbdinfo].bd_unit = 0x30 + (unit & 0xf); + } } else bdinfo[nbdinfo].bd_drive = 'C' + hd_drive++;