Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 fix the comparison to determine if a biosde...
details: https://anonhg.NetBSD.org/src/rev/2606683a67e3
branches: trunk
changeset: 780157:2606683a67e3
user: christos <christos%NetBSD.org@localhost>
date: Fri Jul 13 16:31:49 2012 +0000
description:
fix the comparison to determine if a biosdev is a cdrom (from mhitch)
diffstat:
sys/arch/x86/x86/x86_autoconf.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r e7efd5f64024 -r 2606683a67e3 sys/arch/x86/x86/x86_autoconf.c
--- a/sys/arch/x86/x86/x86_autoconf.c Fri Jul 13 16:21:38 2012 +0000
+++ b/sys/arch/x86/x86/x86_autoconf.c Fri Jul 13 16:31:49 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_autoconf.c,v 1.63 2012/06/10 17:05:18 mlelstv Exp $ */
+/* $NetBSD: x86_autoconf.c,v 1.64 2012/07/13 16:31:49 christos Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.63 2012/06/10 17:05:18 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.64 2012/07/13 16:31:49 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -454,14 +454,20 @@
* No booted device found; check CD-ROM boot at last.
*
* Our bootloader assumes CD-ROM boot if biosdev is larger
- * than the number of hard drives recognized by the BIOS.
- * The number of drives can be found in BTINFO_BIOSGEOM here.
+ * or equal than the number of hard drives recognized by the
+ * BIOS. The number of drives can be found in BTINFO_BIOSGEOM
+ * here. For example, if we have wd0, wd1, and cd0:
+ *
+ * big->num = 2 (for wd0 and wd1)
+ * bid->biosdev = 0x80 (wd0)
+ * bid->biosdev = 0x81 (wd1)
+ * bid->biosdev = 0x82 (cd0)
*
* See src/sys/arch/i386/stand/boot/devopen.c and
* src/sys/arch/i386/stand/lib/bootinfo_biosgeom.c .
*/
if ((big = lookup_bootinfo(BTINFO_BIOSGEOM)) != NULL &&
- bid->biosdev > 0x80 + big->num) {
+ bid->biosdev >= 0x80 + big->num) {
/*
* XXX
* There is no proper way to detect which unit is
Home |
Main Index |
Thread Index |
Old Index