From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 12 21:40:02 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55B6D527 for ; Sat, 12 Apr 2014 21:40:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DB4C121B for ; Sat, 12 Apr 2014 21:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CLe2xc022018 for ; Sat, 12 Apr 2014 21:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3CLe2F1022017; Sat, 12 Apr 2014 21:40:02 GMT (envelope-from gnats) Resent-Date: Sat, 12 Apr 2014 21:40:02 GMT Resent-Message-Id: <201404122140.s3CLe2F1022017@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yuri Zaporozhets Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 896A9386 for ; Sat, 12 Apr 2014 21:35:31 +0000 (UTC) Received: from emh01.mail.saunalahti.fi (emh01.mail.saunalahti.fi [62.142.5.107]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "emh07.mail.saunalahti.fi", Issuer "emh07.mail.saunalahti.fi" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 189DC11FA for ; Sat, 12 Apr 2014 21:35:30 +0000 (UTC) Received: from guardian.highbaud.com (a91-155-238-23.elisa-laajakaista.fi [91.155.238.23]) by emh01.mail.saunalahti.fi (Postfix) with ESMTP id A92FA90021 for ; Sun, 13 Apr 2014 00:26:22 +0300 (EEST) Received: from guardian.highbaud.com (localhost [127.0.0.1]) by guardian.highbaud.com (8.14.8/8.14.8) with ESMTP id s3CLOc9f002503 for ; Sun, 13 Apr 2014 00:24:38 +0300 (EEST) (envelope-from yuriz@guardian.highbaud.com) Received: (from yuriz@localhost) by guardian.highbaud.com (8.14.8/8.14.8/Submit) id s3CLOcTk002502; Sun, 13 Apr 2014 00:24:38 +0300 (EEST) (envelope-from yuriz) Message-Id: <201404122124.s3CLOcTk002502@guardian.highbaud.com> Date: Sun, 13 Apr 2014 00:24:38 +0300 (EEST) From: Yuri Zaporozhets To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: kern/188534: Revision 262226 of /sys/dev/pci/pci.c causes kernel hang on an Asus CUBX board X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Yuri Zaporozhets List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 21:40:02 -0000 >Number: 188534 >Category: kern >Synopsis: Revision 262226 of /sys/dev/pci/pci.c causes kernel hang on an Asus CUBX board >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 12 21:40:01 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Yuri Zaporozhets >Release: FreeBSD 8.4-STABLE i386 >Organization: >Environment: System: FreeBSD guardian.localdomain 8.4-STABLE FreeBSD 8.4-STABLE #7 r262226M: Sat Apr 12 15:07:08 EEST 2014 yuriz@guardian.localdomain:/usr/home/yuriz/freebsd/sys/i386/compile/GUARDIAN i386 Machine: ASUS CUBX ACPI BIOS Revision 1008 Beta 004 PCI devices: hostb0@pci0:0:0:0: class=0x060000 card=0x80251043 chip=0x71908086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = '82443BX/ZX 440BX/ZX CPU to PCI Bridge (AGP Implemented)' pcib1@pci0:0:1:0: class=0x060400 card=0x00000000 chip=0x71918086 rev=0x03 hdr=0x01 vendor = 'Intel Corporation' device = '440BX/ZX AGPset PCI-to-PCI bridge (82443BX/ZX)' isab0@pci0:0:4:0: class=0x060100 card=0x00000000 chip=0x71108086 rev=0x02 hdr=0x00 vendor = 'Intel Corporation' device = 'PIIX4/4E/4M ISBridgeA (82371AB/EB/MB)' atapci0@pci0:0:4:1: class=0x010180 card=0x00000000 chip=0x71118086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = 'PIIX4/4E/4M IDE Controller (82371AB/EB/MB)' uhci0@pci0:0:4:2: class=0x0c0300 card=0x00000000 chip=0x71128086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = 'PIIX4/4E/4M USB Interface (82371AB/EB/MB)' none0@pci0:0:4:3: class=0x068000 card=0x00000000 chip=0x71138086 rev=0x02 hdr=0x00 vendor = 'Intel Corporation' atapci1@pci0:0:7:0: class=0x010400 card=0x80251043 chip=0x06481095 rev=0x01 hdr=0x00 vendor = 'Silicon Image Inc (Was: CMD Technology Inc)' device = 'Bus Master Ultra DMA PCI-IDE/ATA Chip (PCI-648)' fxp0@pci0:0:10:0: class=0x020000 card=0x00408086 chip=0x12298086 rev=0x0c hdr=0x00 vendor = 'Intel Corporation' device = '82550/1/7/8/9 EtherExpress PRO/100(B) Ethernet Adapter' vgapci0@pci0:0:11:0: class=0x030000 card=0x00000000 chip=0x56315333 rev=0x06 hdr=0x00 vendor = 'S3 Graphics Co., Ltd' device = 'Virge 3D (86C325)' fxp1@pci0:0:13:0: class=0x020000 card=0xb0d70e11 chip=0x12298086 rev=0x05 hdr=0x00 vendor = 'Intel Corporation' device = '82550/1/7/8/9 EtherExpress PRO/100(B) Ethernet Adapter' >Description: Revision 262226 of pci.c causes the kernel to hang/crash early during boot. The following line causes the crash (pci.c, near the line number 2743): flags = RF_ALIGNMENT_LOG2(mapsize); Setting flags to zero (as it was in the previous release) fixes the problem completely. >How-To-Repeat: Just boot the system using r262226 or any later 8.4-STABLE kernel. The sign that something is wrong is visible on the screen immediately after boot: some text characters on the screen become overwritten by some apparently random symbols. >Fix: Setting flags variable to zero fixes the problem (as it was in the previous release of this file, r262134). I added some debug print near the line where flags is set, namely flags = RF_ALIGNMENT_LOG2(mapsize); +device_printf(bus, "slot=0x%X, flags=0x%X\n", pci_get_slot(dev), flags); +flags = 0; and here are the values I got upon successful boot: pci0: slot=0x0, flags=0x6800 pci0: slot=0x4, flags=0x1000 pci0: slot=0x4, flags=0x1400 pci0: slot=0x4, flags=0x1000 pci0: slot=0x7, flags=0xC00 pci0: slot=0x7, flags=0x800 pci0: slot=0x7, flags=0xC00 pci0: slot=0x7, flags=0x800 pci0: slot=0x7, flags=0x1000 pci0: slot=0xA, flags=0x3000 pci0: slot=0xA, flags=0x1800 pci0: slot=0xA, flags=0x4400 pci0: slot=0xB, flags=0x6800 pci0: slot=0xD, flags=0x3000 pci0: slot=0xD, flags=0x1400 pci0: slot=0xD, flags=0x5000 >Release-Note: >Audit-Trail: >Unformatted: