Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/arch/x86/x86 Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/83cb12747846
branches:  netbsd-6
changeset: 774346:83cb12747846
user:      riz <riz%NetBSD.org@localhost>
date:      Fri Jul 20 23:57:38 2012 +0000

description:
Pull up following revision(s) (requested by mhitch in ticket #429):
        sys/arch/x86/x86/x86_autoconf.c: revision 1.64
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 5bf16e5a9927 -r 83cb12747846 sys/arch/x86/x86/x86_autoconf.c
--- a/sys/arch/x86/x86/x86_autoconf.c   Fri Jul 20 23:55:54 2012 +0000
+++ b/sys/arch/x86/x86/x86_autoconf.c   Fri Jul 20 23:57:38 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: x86_autoconf.c,v 1.62.8.1 2012/07/05 18:12:47 riz Exp $        */
+/*     $NetBSD: x86_autoconf.c,v 1.62.8.2 2012/07/20 23:57:38 riz 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.62.8.1 2012/07/05 18:12:47 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.62.8.2 2012/07/20 23:57:38 riz 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