NetBSD Problem Report #38729

From abs@absd.org  Thu May 22 13:08:34 2008
Return-Path: <abs@absd.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 41F7363BA66
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 22 May 2008 13:08:34 +0000 (UTC)
Message-Id: <E1JzAWy-0006RA-LF@absd.org>
Date: Thu, 22 May 2008 14:08:28 +0100
From: abs@absd.org
Sender: David Brownlee <abs@absd.org>
Reply-To: abs@absd.org
To: gnats-bugs@gnats.NetBSD.org
Subject: ACPI kernel booted under qemu cannot detect devices
X-Send-Pr-Version: 3.95

>Number:         38729
>Category:       port-i386
>Synopsis:       ACPI kernel booted under qemu cannot detect devices
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    tsutsui
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 22 15:53:17 +0000 2008
>Closed-Date:    Sun Jun 21 16:41:53 +0000 2009
>Last-Modified:  Sun Jun 21 16:41:53 +0000 2009
>Originator:     David Brownlee
>Release:        NetBSD 4.99.63
>Organization:

>Environment:


System: NetBSD onyx.absd.org 4.0_STABLE NetBSD 4.0_STABLE (_ACPI_) #4: Sun Apr 20 17:33:56 BST 2008 root@iris.absd.org:/var/obj/i386/home/netbsd/4/sys/arch/i386/compile/_ACPI_ i386
Architecture: i386
Machine: i386
>Description:
	When an ACPI enabled kernel is booted under qemu it cannot detect
	the network or disk devices. Booting a kernel with ACPI disabled,
	or running qemu with -no-acpi does not show the issue.

	Its quite likely this is a qemu bug, but it could also be qemu
	showing up an edge case in NetBSD's ACPI support.

	Other devices, including the emulated CD drive appear to be
	detected fine

>How-To-Repeat:

	- Install qemu
	- Download the latest i386 boot.iso from
	  ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-daily/HEAD/.../i386/installation/cdrom/boot.iso
	- Create a virtual disk 'qemu-img create -f qcow2 test.img 1G'
	- Boot the ISO image 'qemu -hda test.img -cdrom boot.iso -boot d'

	If you want to interrupt the boot to disable ACPI then you need to
	hit space *extremely* quickly after the qemu window opens, as the
	boot timer countdown runs much faster under qemu.

>Fix:

>Release-Note:

>Audit-Trail:
From: Izumi Tsutsui <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/38729 CVS commit: src/sys/arch
Date: Sat, 13 Jun 2009 13:35:11 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Sat Jun 13 13:35:11 UTC 2009

 Modified Files:
 	src/sys/arch/amd64/amd64: mainbus.c
 	src/sys/arch/i386/i386: mainbus.c
 	src/sys/arch/x86/x86: mp.c

 Log Message:
 Apply fixes from jmcneill@ for PR port-i386/38729
 (ACPI kernel booted under qemu cannot detect devices):
 - make MP SCANPCI function for ACPI_SCANPCI and MPBIOS_SCANPCI
   return a number of attached PCI busses
 - if no valid PCI busses are attached in the MP SCANPCI function,
   try to probe and attach pci0 at mainbus as well as kernels
   with no SCANPCI options

 "Feel free to check it in" from jmcneill@.
 Tested in pkgsrc qemu-0.9.1 (both i386 and x86_64) on NetBSD/i386.

 Note original jmcneill's patch was posted on March:
 http://mail-index.NetBSD.org/port-i386/2009/03/24/msg001281.html
 and I also applied it to amd64:
 http://mail-index.NetBSD.org/port-i386/2009/03/24/msg001283.html
 but x86 MP attach functions have been reorganized by dyoung@ on April:
 http://mail-index.NetBSD.org/source-changes/2009/04/17/msg219992.html
 so I've modified the original patches to adapt the changes.
 (mpacpi_scan_pci() and mpbios_scan_pci() have been merged into
  common mp_pci_scan() in new arch/x86/x86/mp.c)
 For netbsd-5 and netbsd-5-0 branches, the original patches should be
 applied cleanly, and they have been tested by abs@ on a selection of
 i386 boxes and in qemu.


 To generate a diff of this commit:
 cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amd64/amd64/mainbus.c
 cvs rdiff -u -r1.84 -r1.85 src/sys/arch/i386/i386/mainbus.c
 cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x86/x86/mp.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: port-i386-maintainer->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Thu, 18 Jun 2009 19:19:32 +0900
Responsible-Changed-Why:
I've committed fix from Jared.


State-Changed-From-To: open->pending-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Thu, 18 Jun 2009 19:19:32 +0900
State-Changed-Why:
pullup-5 #819
pullup-4 #1327


From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/38729 CVS commit: [netbsd-5] src/sys/arch
Date: Fri, 19 Jun 2009 21:33:57 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Fri Jun 19 21:33:57 UTC 2009

 Modified Files:
 	src/sys/arch/amd64/amd64 [netbsd-5]: mainbus.c
 	src/sys/arch/i386/i386 [netbsd-5]: mainbus.c
 	src/sys/arch/x86/x86 [netbsd-5]: mpacpi.c mpbios.c

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #819):
 	sys/arch/amd64/amd64/mainbus.c: revision 1.28 via patch
 	sys/arch/i386/i386/mainbus.c: revision 1.85 via patch
 	sys/arch/x86/x86/mpacpi.c: patch
 	sys/arch/x86/x86/mpbios.c: patch
 Apply fixes from jmcneill@ for PR port-i386/38729
 (ACPI kernel booted under qemu cannot detect devices):
 - make MP SCANPCI function for ACPI_SCANPCI and MPBIOS_SCANPCI
   return a number of attached PCI busses
 - if no valid PCI busses are attached in the MP SCANPCI function,
   try to probe and attach pci0 at mainbus as well as kernels
   with no SCANPCI options


 To generate a diff of this commit:
 cvs rdiff -u -r1.24 -r1.24.8.1 src/sys/arch/amd64/amd64/mainbus.c
 cvs rdiff -u -r1.77 -r1.77.8.1 src/sys/arch/i386/i386/mainbus.c
 cvs rdiff -u -r1.69.4.1 -r1.69.4.2 src/sys/arch/x86/x86/mpacpi.c
 cvs rdiff -u -r1.47 -r1.47.4.1 src/sys/arch/x86/x86/mpbios.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/38729 CVS commit: [netbsd-4] src/sys/arch
Date: Sun, 21 Jun 2009 11:21:12 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Sun Jun 21 11:21:12 UTC 2009

 Modified Files:
 	src/sys/arch/amd64/amd64 [netbsd-4]: mainbus.c
 	src/sys/arch/i386/i386 [netbsd-4]: mainbus.c
 	src/sys/arch/x86/x86 [netbsd-4]: mpacpi.c mpbios.c

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #1327):
 	sys/arch/amd64/amd64/mainbus.c: revision 1.28 via patch
 	sys/arch/x86/x86/mp.c: revision 1.2 via patch
 	sys/arch/i386/i386/mainbus.c: revision 1.85 via patch
 	sys/arch/x86/x86/mpacpi.c: patch
 	sys/arch/x86/x86/mpbios.c patch
 Apply fixes from jmcneill@ for PR port-i386/38729
 (ACPI kernel booted under qemu cannot detect devices):
 - make MP SCANPCI function for ACPI_SCANPCI and MPBIOS_SCANPCI
   return a number of attached PCI busses
 - if no valid PCI busses are attached in the MP SCANPCI function,
   try to probe and attach pci0 at mainbus as well as kernels
   with no SCANPCI options
 "Feel free to check it in" from jmcneill@.
 Tested in pkgsrc qemu-0.9.1 (both i386 and x86_64) on NetBSD/i386.
 Note original jmcneill's patch was posted on March:
 http://mail-index.NetBSD.org/port-i386/2009/03/24/msg001281.html
 and I also applied it to amd64:
 http://mail-index.NetBSD.org/port-i386/2009/03/24/msg001283.html
 but x86 MP attach functions have been reorganized by dyoung@ on April:
 http://mail-index.NetBSD.org/source-changes/2009/04/17/msg219992.html
 so I've modified the original patches to adapt the changes.
 (mpacpi_scan_pci() and mpbios_scan_pci() have been merged into
  common mp_pci_scan() in new arch/x86/x86/mp.c)
 For netbsd-5 and netbsd-5-0 branches, the original patches should be
 applied cleanly, and they have been tested by abs@ on a selection of
 i386 boxes and in qemu.


 To generate a diff of this commit:
 cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/sys/arch/amd64/amd64/mainbus.c
 cvs rdiff -u -r1.70 -r1.70.2.1 src/sys/arch/i386/i386/mainbus.c
 cvs rdiff -u -r1.44.2.2 -r1.44.2.3 src/sys/arch/x86/x86/mpacpi.c
 cvs rdiff -u -r1.32 -r1.32.2.1 src/sys/arch/x86/x86/mpbios.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 21 Jun 2009 16:41:53 +0000
State-Changed-Why:
Pullups completed, thanks everyone :-)


>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.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.