Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Sep 2000 22:41:54 -0700 (PDT)
From:      mzaki@e-mail.ne.jp
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/21657: nexus without initialization causes booting failed
Message-ID:  <20000930054154.23B7137B503@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         21657
>Category:       i386
>Synopsis:       nexus without initialization causes booting failed
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 29 22:50:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Motomichi Matsuzaki
>Release:        FreeBSD-current (Sep 29 2000)
>Organization:
>Environment:
FreeBSD localhost 5.0-CURRENT FreeBSD 5.0-CURRENT #7: Sat Sep 30 14:01:29 JST 2000
root@localhost:/usr/src/sys/compile/LIBRETTO i386
>Description:
I've updated my laptop (TOSHIBA Libretto) to -current (21:00 29 Sep
GMT) from of 28 Aug, then it wouldn't boot because trap 12 happened.

The boottime messages were shown that:
 :
 :
npx0: INT 16 interface
isa0: <ISA bus>
               ^
               normally is succeeded "on motherboard" but isn't


And the trap 12 (page fault) occured at: 

(sys/i386/i386/nexus.c)
static int
nexus_print_all_resources(device_t dev)
{
        struct  nexus_device *ndev = DEVTONX(dev);
        struct resource_list *rl = &ndev->nx_resources;
                                   ~~~~~~~
                                   This dereference (ndev was NULL!!)

This 'struct nexus_device *ndev' is IVAR of nexus,
and initialized in nexus_add_child(),
but never called this function in my laptop.

>How-To-Repeat:

>Fix:
In nexus_attach(), ISA bus directly binded to nexus is
connected via calling device_add_child(),
but this is probably WRONG. This causes uninitialized IVAR of nexus
because of skipping nexus_add_child().

I changed this to calling nexus_add_child() directly,
and my laptop successfully booted.

--- /usr/src/sys/i386/i386/nexus.c	Fri Sep 29 06:02:31 2000
+++ nexus.c	Sat Sep 30 14:41:11 2000
@@ -259,7 +259,7 @@
 	}
 #endif
 	if (!devclass_get_device(devclass_find("isa"), 0)) {
-		child = device_add_child(dev, "isa", 0);
+		child = nexus_add_child(dev, 0, "isa", 0);
 		if (child == NULL)
 			panic("nexus_attach isa");
 		device_probe_and_attach(child);



>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000930054154.23B7137B503>