summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-09-11 17:39:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-09-11 17:39:36 +0000
commitecd42c89177afb4c4aa0d1cd3cd759bbb8f3f5bf (patch)
tree8341c58ff91832d3c961fa2310ada8f8f7038390 /sys/arch/i386
parentc9446e7902324e979f99db1ea5a9e09450681e8a (diff)
handle case where bios EDD support only supports a subset; from fgsch,
ok toby, and now tested for lots of machines
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/stand/boot/conf.c4
-rw-r--r--sys/arch/i386/stand/libsa/biosdev.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/sys/arch/i386/stand/boot/conf.c b/sys/arch/i386/stand/boot/conf.c
index 757eec8771b..4a9116aa3ea 100644
--- a/sys/arch/i386/stand/boot/conf.c
+++ b/sys/arch/i386/stand/boot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.23 2003/06/03 20:22:11 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.24 2003/09/11 17:39:33 deraadt Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -42,7 +42,7 @@
#include <biosdev.h>
#include <dev/cons.h>
-const char version[] = "2.01";
+const char version[] = "2.02";
int debug = 1;
diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c
index f90c03379ca..a822266e795 100644
--- a/sys/arch/i386/stand/libsa/biosdev.c
+++ b/sys/arch/i386/stand/libsa/biosdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosdev.c,v 1.60 2003/08/11 06:23:09 deraadt Exp $ */
+/* $OpenBSD: biosdev.c,v 1.61 2003/09/11 17:39:35 deraadt Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -140,6 +140,13 @@ bios_getdiskinfo(int dev, bios_diskinfo_t *pdi)
pdi->bios_edd = (bm & 0xffff) | ((rv & 0xff) << 16);
else
pdi->bios_edd = -1;
+
+ /*
+ * If extended disk access functions are not supported
+ * there is not much point on doing EDD.
+ */
+ if (!(pdi->bios_edd & 1))
+ pdi->bios_edd = -1;
} else
pdi->bios_edd = -1;