NetBSD Problem Report #47309

From www@NetBSD.org  Tue Dec 11 10:44:08 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 1A65563EB39
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 11 Dec 2012 10:44:08 +0000 (UTC)
Message-Id: <20121211104406.E17D963EB39@www.NetBSD.org>
Date: Tue, 11 Dec 2012 10:44:06 +0000 (UTC)
From: g1pi@libero.it
Reply-To: g1pi@libero.it
To: gnats-bugs@NetBSD.org
Subject: NetBSD 5.2 hangs at boot in a QEMU VM when ACPI is enabled.
X-Send-Pr-Version: www-1.0

>Number:         47309
>Category:       kern
>Synopsis:       NetBSD 5.2 hangs at boot in a QEMU VM when ACPI is enabled.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 11 10:45:00 +0000 2012
>Closed-Date:    Mon Sep 02 15:33:27 +0000 2019
>Last-Modified:  Mon Sep 02 15:33:27 +0000 2019
>Originator:     g one
>Release:        5.2
>Organization:
>Environment:
NetBSD n5 5.2 NetBSD 5.2 (GENERIC) #0: Wed Nov 28 09:36:47 UTC 2012  builds@b8.netbsd.org:/home/builds/ab/netbsd-5-2-RELEASE/i386/201211280503Z-obj/home/builds/ab/netbsd-5-2-RELEASE/src/sys/arch/i386/compile/GENERIC i386
>Description:
In a QEMU VM (host OS: linux 2.6.32 32-bit, host cpu Intel(R) Core(TM)2 Duo CPU P8600  @ 2.40GHz), NetBSD hangs at boot while scanning the IDE channel.

The only way to boot either the install CD or the installed HD system, is to disable ACPI.  Booting without any HD image works too, although this is of limited use.

NetBSD 5.1.2 worked correctly on the same platform, therefore it seems a regression.


>How-To-Repeat:
qemu -hda /tmp/n.qcow2 -monitor stdio -m 128
>Fix:
Pick one:
- Disable ACPI at boot
- Upgrade to NetBSD 6.0
- Downgrade to NetBSD 5.1.2

From: Brian Buhrow <buhrow@nfbcal.org>
Date: Fri, 9 May 2014 10:50:39 -0700
To: gnats@netbsd.org
Subject: re:kern/47309
Cc: buhrow@nfbcal.org

	hello.  I've run into this problem with NetBSD-5.2, and wonder if the
following change fixes the problem.
in: src/sys/dev/acpi/acpi_pci_link.c,  I see the following block of code,
beginning around  line 537.
Somehow, the #if 0 changed to #if 1 while I updated from NetBSD-5.1 to
netbsd-5.2.  Changing it back to #if 0 seems to have solved the problem for
all the machines I was having trouble with.  Does that work for you as
well?


/*	$NetBSD: acpi_pci_link.c,v 1.13.8.1 2008/11/25 18:22:37 snj Exp $	*/
[ ... ]
	/*
	 * Try to disable this link.  If successful, set the current IRQ to
	 * zero and flags to indicate this link is not routed.  If we can't
	 * run _DIS (i.e., the method doesn't exist), assume the initial
	 * IRQ was routed by the BIOS.
	 */
#if 0	/* XXX causes spontaneaous resets on some systems. Disabled for now. */
	if (ACPI_SUCCESS(AcpiEvaluateObject(sc->pl_handle, "_DIS", NULL,
	    NULL)))
		for (i = 0; i < sc->pl_num_links; i++)
			sc->pl_links[i].l_irq = PCI_INVALID_IRQ;
	else
#endif
		for (i = 0; i < sc->pl_num_links; i++)
			if (PCI_INTERRUPT_VALID(sc->pl_links[i].l_irq))
				sc->pl_links[i].l_routed = TRUE;
	if (boothowto & AB_VERBOSE) {
		printf("%s: Links after disable:\n", sc->pl_name);
		acpi_pci_link_dump(sc);
	}



>Release-Note:

>Audit-Trail:

Brian Buhrow provided feedback with a potential fix.  Changed the state 
to feedback.

State-Changed-From-To: open->feedback
State-Changed-By: buhrow@NetBSD.org
State-Changed-When: Tue, 13 May 2014 19:55:19 +0000
State-Changed-Why:
A potential fix is included with the change.


From: g1pi@libero.it
To: gnats-bugs@gnats.netbsd.org
Cc: 
Subject: Re: kern/47309
Date: Tue, 20 May 2014 15:48:48 +0200

 I've built a couple of kernels with '#if 0' and '#if 1', and both hang at
 boot.

 By the way, unless I'm mistaken, the current 5.2.2 source (tgz bundle) has
 '#if 0'.

 Best regards,
 	g1

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 30 May 2014 08:26:04 +0000
State-Changed-Why:
feedback received - apparently it's not the same problem


State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 02 Sep 2019 15:33:27 +0000
State-Changed-Why:
Assuming fixed. QEMU + NetBSD is used very extensively. I don't want to ping submitter to check again. Please reply if you are still having issues.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.