NetBSD Problem Report #50804

From www@NetBSD.org  Sun Feb 14 20:18:01 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 8E8AF7A221
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 14 Feb 2016 20:18:01 +0000 (UTC)
Message-Id: <20160214201758.BE7747ACC0@mollari.NetBSD.org>
Date: Sun, 14 Feb 2016 20:17:58 +0000 (UTC)
From: rcbixler@nyx.net
Reply-To: rcbixler@nyx.net
To: gnats-bugs@NetBSD.org
Subject: Nouveau console doesn't come up on Dell laptop
X-Send-Pr-Version: www-1.0

>Number:         50804
>Category:       kern
>Synopsis:       Nouveau console doesn't come up on Dell laptop
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 14 20:20:00 +0000 2016
>Last-Modified:  Sat Feb 20 17:30:02 +0000 2016
>Originator:     Roy Bixler
>Release:        HEAD
>Organization:
>Environment:
NetBSD  7.99.26 NetBSD 7.99.26 (GENERIC) i386
>Description:
NetBSD 7.99.26 (GENERIC) #0: Sun Feb 14 18:37:03 UTC 2016
        root@laptop.bix.org:/usr/src/sys/arch/i386/compile/GENERIC
total memory = 1023 MB
avail memory = 988 MB
mainbus0 (root)
ACPI: RSDP 0x00000000000FC9B0 000014 (v00 DELL  )
ACPI: RSDT 0x000000003FFD8790 000040 (v01 DELL   D05      27D60314 ASL  00000061)
ACPI: FACP 0x000000003FFD9400 000074 (v01 DELL   D05      27D60314 ASL  00000061)
ACPI: DSDT 0x000000003FFDA000 00355D (v01 INT430 SYSFexxx 00001001 MSFT 0100000E)
ACPI: FACS 0x000000003FFE8800 000040ACPI: APIC 0x000000003FFD9C00 000068 (v01 DELL   D05      27D60314 ASL  00000047)
ACPI: ASF! 0x000000003FFD9800 00005B (v16 DELL   D05      27D60314 ASL  00000061)
ACPI: MCFG 0x000000003FFD9BC0 00003E (v16 DELL   D05      27D60314 ASL  00000061)
ACPI: SSDT 0x000000003FFD8BE6 0002C2 (v01 PmRef  Cpu0Ist  00003000 INTL 20030522)
ACPI: SSDT 0x000000003FFD8A0E 0001D8 (v01 PmRef  Cpu0Cst  00003001 INTL 20030522)
ACPI: SSDT 0x000000003FFD8813 0001FB (v01 PmRef  CpuPm    00003000 INTL 20030522)
ACPI: FACS 0x000000003FFE8800 000040
ACPI: APIC 0x000000003FFD9C00 000068 (v01 DELL   D05      27D60314 ASL  00000047)
ACPI: ASF! 0x000000003FFD9800 00005B (v16 DELL   D05      27D60314 ASL  00000061)
ACPI: MCFG 0x000000003FFD9BC0 00003E (v16 DELL   D05      27D60314 ASL  00000061)
ACPI: SSDT 0x000000003FFD8BE6 0002C2 (v01 PmRef  Cpu0Ist  00003000 INTL 20030522)
ACPI: SSDT 0x000000003FFD8A0E 0001D8 (v01 PmRef  Cpu0Cst  00003001 INTL 20030522)
ACPI: SSDT 0x000000003FFD8813 0001FB (v01 PmRef  CpuPm    00003000 INTL 20030522)
ACPI: 4 ACPI AML tables successfully acquired and loaded

ioapic0 at mainbus0 apid 1
cpu0 at mainbus0 apid 0
cpu0: Intel(R) Pentium(R) M processor 2.13GHz, id 0x6d8
acpi0 at mainbus0: Intel ACPICA 20160108
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0x00000000C25C3E4C 000043 (v01 LMPWR  DELLLOM  00001001 INTL 20030522)
acpiacad0 at acpi0 (AC, ACPI0003): ACPI AC Adapter
acpibat0 at acpi0 (BAT0, PNP0C0A-1): ACPI Battery
acpibat0: Sanyo LION rechargeable battery
acpibat1 at acpi0 (BAT1, PNP0C0A-2): ACPI Battery
acpilid0 at acpi0 (LID, PNP0C0D): ACPI Lid Switch
acpibut0 at acpi0 (PBTN, PNP0C0C): ACPI Power Button
acpibut1 at acpi0 (SBTN, PNP0C0E): ACPI Sleep Button
MB1 (PNP0C01) at acpi0 not configured
MB2 (PNP0C01) at acpi0 not configured
MB3 (PNP0C01) at acpi0 not configured
pckbc1 at acpi0 (PS2M, PNP0F13) (aux port): irq 12
pckbc2 at acpi0 (KBC, PNP0303) (kbd port): io 0x60,0x64,0x62,0x66 irq 1
attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43,0x50-0x53 irq 2
pcppi1 at acpi0 (SPKR, PNP0800): io 0x61,0x63,0x65,0x67
midi0 at pcppi1: PC speaker
sysbeep0 at pcppi1
MB4 (PNP0C01) at acpi0 not configured
COPR (PNP0C04) at acpi0 not configured
UAR1 (PNP0501) at acpi0 not configured
FTPM (PNP0C01) at acpi0 not configured
acpivga0 at acpi0 (VID): ACPI Display Adapter
acpiout0 at acpivga0 (TV, 0x0200): ACPI Display Output Device
acpiout1 at acpivga0 (CRT, 0x0100): ACPI Display Output Device
acpiout2 at acpivga0 (LCD, 0x0110): ACPI Display Output Device
acpiout3 at acpivga0 (DVI, 0x0120): ACPI Display Output Device
acpitz0 at acpi0 (THM)
apm0 at acpi0: Power Management spec V1.2
ACPI: Enabled 2 GPEs in block 00 to 1F
pckbd0 at pckbc2 (kbd slot)
pckbc2: using irq 1 for kbd slot
wskbd0 at pckbd0 mux 1
pms0 at pckbc2 (aux slot)
pckbc2: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer1: attached to pcppi1
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0: vendor 8086 product 2590 (rev. 0x03)
agp0 at pchb0: can't find internal VGA config space
ppb0 at pci0 dev 1 function 0: vendor 8086 product 2591 (rev. 0x03)
ppb0: PCI Express capability version 1 <Root Port of PCI-E Root Complex> x16 @ 2.5GT/s
pci1 at ppb0 bus 1
nouveau0 at pci1 dev 0 function 0: vendor 10de product 00cc (rev. 0xa2)
ppb1 at pci0 dev 28 function 0: vendor 8086 product 2660 (rev. 0x03)
ppb1: PCI Express capability version 1 <Root Port of PCI-E Root Complex> x1 @ 2.5GT/s
pci2 at ppb1 bus 2
bge0 at pci2 dev 0 function 0: Broadcom BCM5751 Gigabit Ethernet
bge0: interrupting at ioapic0 pin 16
bge0: HW config 00000155, 00004015, 00000000, 00000000 00000000
bge0: ASIC BCM5750 A1 (0x4001), Ethernet address 00:14:22:ef:2a:5d
brgphy0 at bge0 phy 1: BCM5750 1000BASE-T media interface, rev. 0
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
uhci0 at pci0 dev 29 function 0: vendor 8086 product 2658 (rev. 0x03)
uhci0: interrupting at ioapic0 pin 16
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 29 function 1: vendor 8086 product 2659 (rev. 0x03)
uhci1: interrupting at ioapic0 pin 17
usb1 at uhci1: USB revision 1.0
uhci2 at pci0 dev 29 function 2: vendor 8086 product 265a (rev. 0x03)
uhci2: interrupting at ioapic0 pin 18
usb2 at uhci2: USB revision 1.0
uhci3 at pci0 dev 29 function 3: vendor 8086 product 265b (rev. 0x03)
uhci3: interrupting at ioapic0 pin 19
usb3 at uhci3: USB revision 1.0
ehci0 at pci0 dev 29 function 7: vendor 8086 product 265c (rev. 0x03)
ehci0: interrupting at ioapic0 pin 16
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
usb4 at ehci0: USB revision 2.0
ppb2 at pci0 dev 30 function 0: vendor 8086 product 2448 (rev. 0xd3)
pci3 at ppb2 bus 3
cbb0 at pci3 dev 1 function 0: vendor 104c product 8036 (rev. 0x00)
vendor 104c product 8038 (miscellaneous communications) at pci3 dev 1 function 5 not configured
iwi0 at pci3 dev 3 function 0: vendor 8086 product 4220 (rev. 0x05)
iwi0: interrupting at ioapic0 pin 17
iwi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
cbb0: interrupting at ioapic0 pin 19
cardslot0 at cbb0
cardbus0 at cardslot0: bus 4
pcmcia0 at cardslot0
auich0 at pci0 dev 30 function 2: i82801FB (ICH6) AC-97 Audio
auich0: interrupting at ioapic0 pin 16
auich0: ac97: SigmaTel STAC9750/51 codec; headphone, 20 bit DAC, 20 bit ADC, SigmaTel 3D
auich0: ac97: ext id 0x605<AC97_22,AMAP,SPDIF,VRA>
ichlpcib0 at pci0 dev 31 function 0: vendor 8086 product 2641 (rev. 0x03)
ichlpcib0: 24-bit timer
tco0 at ichlpcib0: TCO (watchdog) timer configured.
gpio0 at ichlpcib0: 64 pins
piixide0 at pci0 dev 31 function 2: Intel 82801FBM Serial ATA Controller (ICH6) (rev. 0x03)
piixide0: primary channel interrupting at ioapic0 pin 14
atabus0 at piixide0 channel 0
piixide0: secondary channel interrupting at ioapic0 pin 15
atabus1 at piixide0 channel 1
isa0 at ichlpcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
acpicpu0 at cpu0: ACPI CPU
acpiacad0: AC adapter online.
audio0 at auich0: full duplex, playback, capture, mmap, independent
uhub0 at usb0: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1 at usb1: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2 at usb2: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3 at usb3: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub4 at usb4: vendor 8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
wd0 at atabus0 drive 0
wd0: <Hitachi HTS721080G9AT00>
wd0: 76319 MB, 155061 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 sectors
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <_NEC DVD+/-RW ND-6650A, , 102C> cdrom removable
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
kern.module.path=/stand/i386/7.99.26/modules
drm kern info: nouveau  [  DEVICE][nouveau0] BOOT0  : 0x042c00a1
drm kern info: nouveau  [  DEVICE][nouveau0] Chipset: NV42 (NV42)
drm kern info: nouveau  [  DEVICE][nouveau0] Family : NV40
drm kern info: nouveau  [   VBIOS][nouveau0] checking PRAMIN for image...
drm kern info: nouveau  [   VBIOS][nouveau0] ... appears to be valid
drm kern info: nouveau  [   VBIOS][nouveau0] using image from PRAMIN
drm kern info: nouveau  [   VBIOS][nouveau0] BIT signature found
drm kern info: nouveau  [   VBIOS][nouveau0] version 05.41.02.29.a3
drm kern info: nouveau  [     PFB][nouveau0] RAM type: DDR1
drm kern info: nouveau  [     PFB][nouveau0] RAM size: 256 MiB
drm kern info: nouveau  [     PFB][nouveau0]    ZCOMP: 189440 tags
drm kern error: nouveau E[ INSTMEM][nouveau0] unable to map PRAMIN BAR
drm kern error: nouveau E[  DEVICE][nouveau0] failed to create 0x1000400c, -14
drm kern error: nouveau E[     DRM] failed to create 0x80000080, -14
nouveau0: unable to attach drm: 14

>How-To-Repeat:
boot NetBSD-current kernel with Nouveau framebuffer enabled on this hardware (Dell Precision M70 laptop)
>Fix:
Only partial fix known.  The following 2 patches to change the PCI BAR and print some debug messages allow the PRAMIN to be mapped and the VGA fonts to be saved but, as shown below, the console still doesn't attach.

--- nouveau_subdev_instmem_nv40.c.orig  2014-08-23 08:03:34.000000000 +0000
+++ nouveau_subdev_instmem_nv40.c       2016-02-14 19:07:02.004485004 +0000
@@ -76,10 +76,12 @@
                bar = 2;
        else
                bar = 3;
+       bar = 1;

 #ifdef __NetBSD__
        priv->iomemt = nv_device_resource_tag(device, bar);
        priv->iomemsz = nv_device_resource_len(device, bar);
+nv_error(priv, "bar = %d, iomemt=%x, iomemsz=%x, start=%x\n", bar, (unsigned int) priv->iomemt,  (unsigned int) priv->iomemsz, (unsigned int) nv_device_resource_start(device, bar));
        if (bus_space_map(priv->iomemt, nv_device_resource_start(device, bar),
                priv->iomemsz, 0, &priv->iomemh)) {
                priv->iomemsz = 0;
@@ -94,6 +96,7 @@
                return -EFAULT;
        }
 #endif
+nv_error(priv, "ioremap succeeded\n");

        /* PRAMIN aperture maps over the end of vram, reserve enough space
         * to fit graphics contexts for every channel, the magics come
@@ -115,18 +118,21 @@
        if (ret)
                return ret;

+nv_error(priv, "mm_init succeeded\n");
        /* 0x00000-0x10000: reserve for probable vbios image */
        ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x10000, 0, 0,
                                &priv->vbios);
        if (ret)
                return ret;

+nv_error(priv, "gpuobj succeeded\n");
        /* 0x10000-0x18000: reserve for RAMHT */
        ret = nouveau_ramht_new(nv_object(priv), NULL, 0x08000, 0,
                               &priv->ramht);
        if (ret)
                return ret;

+nv_error(priv, "ramht succeeded\n");
        /* 0x18000-0x18200: reserve for RAMRO
         * 0x18200-0x20000: padding
         */
@@ -135,6 +141,7 @@
        if (ret)
                return ret;

+nv_error(priv, "gpuobj2 succeeded\n");
        /* 0x20000-0x21000: reserve for RAMFC
         * 0x21000-0x40000: padding and some unknown crap
         */
@@ -142,6 +1


--- nouveau_dispnv04_hw.c.orig  2014-08-06 15:01:34.000000000 +0000
+++ nouveau_dispnv04_hw.c       2016-02-14 19:09:52.154908771 +0000
@@ -352,9 +352,9 @@

        /* map first 64KiB of VRAM, holds VGA fonts etc */
 #ifdef __NetBSD__
-       if (pci_mapreg_map(&dev->pdev->pd_pa, PCI_BAR(1),
+       if (pci_mapreg_map(&dev->pdev->pd_pa, PCI_BAR(3),
                pci_mapreg_type(dev->pdev->pd_pa.pa_pc,
-                   dev->pdev->pd_pa.pa_tag, PCI_BAR(1)),
+                   dev->pdev->pd_pa.pa_tag, PCI_BAR(3)),
                0, &iovramt, &iovramh, NULL, &iovramsz)) {
                NV_ERROR(drm, "Failed to map VRAM, "
                                        "cannot save/restore VGA fonts.\n");


NetBSD 7.99.26 (GENERIC) #1: Sun Feb 14 19:10:45 UTC 2016
        root@laptop.bix.org:/usr/src/sys/arch/i386/compile/GENERIC
total memory = 1023 MB
avail memory = 988 MB
mainbus0 (root)
ACPI: RSDP 0x00000000000FC9B0 000014 (v00 DELL  )
ACPI: RSDT 0x000000003FFD8790 000040 (v01 DELL   D05      27D60314 ASL  00000061)
ACPI: FACP 0x000000003FFD9400 000074 (v01 DELL   D05      27D60314 ASL  00000061)
ACPI: DSDT 0x000000003FFDA000 00355D (v01 INT430 SYSFexxx 00001001 MSFT 0100000E)
ACPI: FACS 0x000000003FFE8800 000040
ACPI: APIC 0x000000003FFD9C00 000068 (v01 DELL   D05      27D60314 ASL  00000047
)
ACPI: ASF! 0x000000003FFD9800 00005B (v16 DELL   D05      27D60314 ASL  00000061)
ACPI: MCFG 0x000000003FFD9BC0 00003E (v16 DELL   D05      27D60314 ASL  00000061)
ACPI: SSDT 0x000000003FFD8BE6 0002C2 (v01 PmRef  Cpu0Ist  00003000 INTL 20030522)
ACPI: SSDT 0x000000003FFD8A0E 0001D8 (v01 PmRef  Cpu0Cst  00003001 INTL 20030522)
ACPI: SSDT 0x000000003FFD8813 0001FB (v01 PmRef  CpuPm    00003000 INTL 20030522)
ACPI: 4 ACPI AML tables successfully acquired and loaded

ioapic0 at mainbus0 apid 1
cpu0 at mainbus0 apid 0
cpu0: Intel(R) Pentium(R) M processor 2.13GHz, id 0x6d8
acpi0 at mainbus0: Intel ACPICA 20160108
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0x00000000C25C3E4C 000043 (v01 LMPWR  DELLLOM  00001001 INTL 20030522)
acpiacad0 at acpi0 (AC, ACPI0003): ACPI AC Adapter
acpibat0 at acpi0 (BAT0, PNP0C0A-1): ACPI Battery
acpibat0: Sanyo LION rechargeable battery
acpibat1 at acpi0 (BAT1, PNP0C0A-2): ACPI Battery
acpilid0 at acpi0 (LID, PNP0C0D): ACPI Lid Switch
acpibut0 at acpi0 (PBTN, PNP0C0C): ACPI Power Button
acpibut1 at acpi0 (SBTN, PNP0C0E): ACPI Sleep Button
MB1 (PNP0C01) at acpi0 not configured
MB2 (PNP0C01) at acpi0 not configured
MB3 (PNP0C01) at acpi0 not configured
pckbc1 at acpi0 (PS2M, PNP0F13) (aux port): irq 12
pckbc2 at acpi0 (KBC, PNP0303) (kbd port): io 0x60,0x64,0x62,0x66 irq 1
attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43,0x50-0x53 irq 2
pcppi1 at acpi0 (SPKR, PNP0800): io 0x61,0x63,0x65,0x67
midi0 at pcppi1: PC speaker
sysbeep0 at pcppi1
MB4 (PNP0C01) at acpi0 not configured
COPR (PNP0C04) at acpi0 not configured
UAR1 (PNP0501) at acpi0 not configured
FTPM (PNP0C01) at acpi0 not configured
acpivga0 at acpi0 (VID): ACPI Display Adapter
acpiout0 at acpivga0 (TV, 0x0200): ACPI Display Output Device
acpiout1 at acpivga0 (CRT, 0x0100): ACPI Display Output Device
acpiout2 at acpivga0 (LCD, 0x0110): ACPI Display Output Device
acpiout3 at acpivga0 (DVI, 0x0120): ACPI Display Output Device
acpitz0 at acpi0 (THM)
apm0 at acpi0: Power Management spec V1.2
ACPI: Enabled 2 GPEs in block 00 to 1F
pckbd0 at pckbc2 (kbd slot)
pckbc2: using irq 1 for kbd slot
wskbd0 at pckbd0 mux 1
pms0 at pckbc2 (aux slot)
pckbc2: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer1: attached to pcppi1
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0: vendor 8086 product 2590 (rev. 0x03)
agp0 at pchb0: can't find internal VGA config space
ppb0 at pci0 dev 1 function 0: vendor 8086 product 2591 (rev. 0x03)
ppb0: PCI Express capability version 1 <Root Port of PCI-E Root Complex> x16 @ 2.5GT/s
pci1 at ppb0 bus 1
nouveau0 at pci1 dev 0 function 0: vendor 10de product 00cc (rev. 0xa2)
ppb1 at pci0 dev 28 function 0: vendor 8086 product 2660 (rev. 0x03)
ppb1: PCI Express capability version 1 <Root Port of PCI-E Root Complex> x1 @ 2.5GT/s
pci2 at ppb1 bus 2
bge0 at pci2 dev 0 function 0: Broadcom BCM5751 Gigabit Ethernet
bge0: interrupting at ioapic0 pin 16
bge0: HW config 00000155, 00004015, 00000000, 00000000 00000000
bge0: ASIC BCM5750 A1 (0x4001), Ethernet address 00:14:22:ef:2a:5d
brgphy0 at bge0 phy 1: BCM5750 1000BASE-T media interface, rev. 0
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
uhci0 at pci0 dev 29 function 0: vendor 8086 product 2658 (rev. 0x03)
uhci0: interrupting at ioapic0 pin 16
usb0 at uhci0: USB revision 1.0
uhci1 at pci0 dev 29 function 1: vendor 8086 product 2659 (rev. 0x03)
uhci1: interrupting at ioapic0 pin 17
usb1 at uhci1: USB revision 1.0
uhci2 at pci0 dev 29 function 2: vendor 8086 product 265a (rev. 0x03)
uhci2: interrupting at ioapic0 pin 18
usb2 at uhci2: USB revision 1.0
uhci3 at pci0 dev 29 function 3: vendor 8086 product 265b (rev. 0x03)
uhci3: interrupting at ioapic0 pin 19
usb3 at uhci3: USB revision 1.0
ehci0 at pci0 dev 29 function 7: vendor 8086 product 265c (rev. 0x03)
ehci0: interrupting at ioapic0 pin 16
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
usb4 at ehci0: USB revision 2.0
ppb2 at pci0 dev 30 function 0: vendor 8086 product 2448 (rev. 0xd3)
pci3 at ppb2 bus 3
cbb0 at pci3 dev 1 function 0: vendor 104c product 8036 (rev. 0x00)
vendor 104c product 8038 (miscellaneous communications) at pci3 dev 1 function 5 not configured
iwi0 at pci3 dev 3 function 0: vendor 8086 product 4220 (rev. 0x05)
iwi0: interrupting at ioapic0 pin 17
iwi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
cbb0: interrupting at ioapic0 pin 19
cardslot0 at cbb0
cardbus0 at cardslot0: bus 4
pcmcia0 at cardslot0
auich0 at pci0 dev 30 function 2: i82801FB (ICH6) AC-97 Audio
auich0: interrupting at ioapic0 pin 16
auich0: ac97: SigmaTel STAC9750/51 codec; headphone, 20 bit DAC, 20 bit ADC, SigmaTel 3Dauich0: ac97: ext id 0x605<AC97_22,AMAP,SPDIF,VRA>
ichlpcib0 at pci0 dev 31 function 0: vendor 8086 product 2641 (rev. 0x03)
ichlpcib0: 24-bit timer
tco0 at ichlpcib0: TCO (watchdog) timer configured.
gpio0 at ichlpcib0: 64 pins
piixide0 at pci0 dev 31 function 2: Intel 82801FBM Serial ATA Controller (ICH6) (rev. 0x03)
piixide0: primary channel interrupting at ioapic0 pin 14
atabus0 at piixide0 channel 0
piixide0: secondary channel interrupting at ioapic0 pin 15
atabus1 at piixide0 channel 1
isa0 at ichlpcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
acpicpu0 at cpu0: ACPI CPU
acpiacad0: AC adapter online.
audio0 at auich0: full duplex, playback, capture, mmap, independent
uhub0 at usb0: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1 at usb1: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2 at usb2: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3 at usb3: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub4 at usb4: vendor 8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
wd0 at atabus0 drive 0
wd0: <Hitachi HTS721080G9AT00>
wd0: 76319 MB, 155061 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 sectors
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <_NEC DVD+/-RW ND-6650A, , 102C> cdrom removable
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
kern.module.path=/stand/i386/7.99.26/modules
drm kern info: nouveau  [  DEVICE][nouveau0] BOOT0  : 0x042c00a1
drm kern info: nouveau  [  DEVICE][nouveau0] Chipset: NV42 (NV42)
drm kern info: nouveau  [  DEVICE][nouveau0] Family : NV40
drm kern info: nouveau  [   VBIOS][nouveau0] checking PRAMIN for image...
drm kern info: nouveau  [   VBIOS][nouveau0] ... appears to be valid
drm kern info: nouveau  [   VBIOS][nouveau0] using image from PRAMIN
drm kern info: nouveau  [   VBIOS][nouveau0] BIT signature found
drm kern info: nouveau  [   VBIOS][nouveau0] version 05.41.02.29.a3
drm kern info: nouveau  [     PFB][nouveau0] RAM type: DDR1
drm kern info: nouveau  [     PFB][nouveau0] RAM size: 256 MiB
drm kern info: nouveau  [     PFB][nouveau0]    ZCOMP: 189440 tags
drm kern error: nouveau E[ INSTMEM][nouveau0] bar = 1, iomemt=c1136740, iomemsz=10000000, start=c0000000
drm kern error: nouveau E[ INSTMEM][nouveau0] ioremap succeeded
drm kern error: nouveau E[ INSTMEM][nouveau0] mm_init succeeded
drm kern error: nouveau E[ INSTMEM][nouveau0] gpuobj succeeded
drm kern error: nouveau E[ INSTMEM][nouveau0] ramht succeeded
drm kern error: nouveau E[ INSTMEM][nouveau0] gpuobj2 succeeded
drm kern error: nouveau E[ INSTMEM][nouveau0] instmem_ctor succeeded
drm kern info: nouveau  [  PTHERM][nouveau0] FAN control: none / external
drm kern info: nouveau  [  PTHERM][nouveau0] internal sensor: no
drm kern info: nouveau  [     CLK][nouveau0] 20: core 125 MHz shader 125 MHz memory 332 MHz
drm kern info: nouveau  [     CLK][nouveau0] 21: core 200 MHz shader 200 MHz memory 400 MHz
drm kern info: nouveau  [     CLK][nouveau0] 22: core 275 MHz shader 275 MHz memory 590 MHz
drm kern info: nouveau  [     CLK][nouveau0] --: core 200 MHz shader 200 MHz memory 401 MHz
Zone  kernel: Available graphics memory: 149120 kiB
drm kern info: nouveau  [     DRM] VRAM: 251 MiB
drm kern info: nouveau  [     DRM] GART: 512 MiB
drm kern info: nouveau  [     DRM] TMDS table version 1.1
drm kern info: nouveau  [     DRM] DCB version 3.0
drm kern info: nouveau  [     DRM] DCB outp 00: 03000323 00000004
drm kern info: nouveau  [     DRM] DCB outp 01: 01011300 00000028
drm kern info: nouveau  [     DRM] DCB outp 02: 01522312 00000100
drm kern info: nouveau  [     DRM] DCB outp 03: 020333f1 0002c070
drm kern info: nouveau  [     DRM] DCB conn 00: 0041
drm kern info: nouveau  [     DRM] DCB conn 01: 0100
drm kern info: nouveau  [     DRM] DCB conn 02: 0231
drm kern info: nouveau  [     DRM] DCB conn 03: 0310
drm kern info: nouveau  [     DRM] DCB conn 04: 0311
drm kern info: nouveau  [     DRM] Saving VGA fonts
drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
drm: Driver supports precise vblank timestamp query.
drm kern error: nouveau E[     DRM] failed to initialise sync subsystem, -35
drm kern info: nouveau  [     DRM] Calling LVDS script 6:
drm kern info: nouveau  [     DRM] 0xE146: Parsing digital output script table
drm kern info: nouveau  [     DRM] Setting dpms mode 3 on TV encoder (output 3)
drm kern error: nouveau E[     DRM] failed to map fb: -35
DRM error in nouveau_bo_del_ttm: bo 0xc29fcc0c still attached to GEM object

>Audit-Trail:
From: Roy Bixler <rcbixler@nyx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/50804: Nouveau console doesn't come up on Dell laptop
Date: Mon, 15 Feb 2016 10:15:26 -0700

 I should add that the hardware in question works perfectly with the
 Nouveau driver under Linux.

 -- 
 Roy Bixler <rcbixler@nyx.net>
 "The fundamental principle of science, the definition almost, is this: the
 sole test of the validity of any idea is experiment."
 -- Richard P. Feynman

From: Roy Bixler <rcbixler@nyx.net>
To: Taylor R Campbell <riastradh@NetBSD.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/50804: Nouveau console doesn't come up on Dell laptop
Date: Sat, 20 Feb 2016 08:45:45 -0700

 --oyUTqETQ0mS9luUI
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 On Mon, Feb 15, 2016 at 08:41:48PM +0000, Taylor R Campbell wrote:
 > Why did you change the BAR?  What suggests that BAR 1 is correct and
 > not BAR 2 or BAR 3?

 In my ignorance, I thought it worth a try.

 > I committed a tiny change to the BAR mapping code so that it will
 > print the error with which bus_space_map failed.  It might be
 > worthwhile to see what you get out of that.

 I compiled a kernel with that patch and attach the output.

 > Another change that might be worthwhile to test would be to add
 > 
 > #include <ddb/ddb.h>
 > 
 > 	if (bpa/size covers the nvidia bar)
 > 		db_stack_trace_print(
 > 		    (db_expr_t)(intptr_t)__builtin_frame_address(0),
 > 		    true, 65535, "", printf);
 > 
 > to bus_space_map in sys/arch/x86/x86/bus_space.c, so that you can see
 > who is trying to map this bus space, in case someone else has already
 > mapped it.  (You'll need to fill in what the relevant BAR's address
 > and size actually are, unless you want to increase MSGBUFSIZE and wade
 > through a stack trace for every bus space mapping in the system.)

 The thought occurred to me before, so since you agree, I'll give it a
 go.

 -- 
 Roy Bixler <rcbixler@nyx.net>
 "The fundamental principle of science, the definition almost, is this: the
 sole test of the validity of any idea is experiment."
 -- Richard P. Feynman

 --oyUTqETQ0mS9luUI
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="minicom.cap.1"

 [ Kernel symbol table invalid! ]
 multiboot: Information structure flags: 0x0000000d
 multiboot: Command line: nnetbsd root=wd0a console=com console_speed=57600
 multiboot: 636 KB lower memory, 1047392 KB upper memory
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
     The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.

 NetBSD 7.99.26 (GENERIC) #2: Sat Feb 20 15:37:36 UTC 2016
 	root@laptop.bix.org:/usr/src/sys/arch/i386/compile/GENERIC
 total memory = 1023 MB
 avail memory = 988 MB
 mainbus0 (root)
 ACPI: RSDP 0x00000000000FC9B0 000014 (v00 DELL  )
 ACPI: RSDT 0x000000003FFD8790 000040 (v01 DELL   D05      27D60314 ASL  00000061)
 ACPI: FACP 0x000000003FFD9400 000074 (v01 DELL   D05      27D60314 ASL  00000061)
 ACPI: DSDT 0x000000003FFDA000 00355D (v01 INT430 SYSFexxx 00001001 MSFT 0100000E)
 ACPI: FACS 0x000000003FFE8800 000040
 ACPI: APIC 0x000000003FFD9C00 000068 (v01 DELL   D05      27D60314 ASL  00000047)
 ACPI: ASF! 0x000000003FFD9800 00005B (v16 DELL   D05      27D60314 ASL  00000061)
 ACPI: MCFG 0x000000003FFD9BC0 00003E (v16 DELL   D05      27D60314 ASL  00000061)
 ACPI: SSDT 0x000000003FFD8BE6 0002C2 (v01 PmRef  Cpu0Ist  00003000 INTL 20030522)
 ACPI: SSDT 0x000000003FFD8A0E 0001D8 (v01 PmRef  Cpu0Cst  00003001 INTL 20030522)
 ACPI: SSDT 0x000000003FFD8813 0001FB (v01 PmRef  CpuPm    00003000 INTL 20030522)
 ACPI: 4 ACPI AML tables successfully acquired and loaded

 ioapic0 at mainbus0 apid 1
 cpu0 at mainbus0 apid 0
 cpu0: Intel(R) Pentium(R) M processor 2.13GHz, id 0x6d8
 acpi0 at mainbus0: Intel ACPICA 20160108
 ACPI: Dynamic OEM Table Load:
 ACPI: SSDT 0x00000000C25C3E4C 000043 (v01 LMPWR  DELLLOM  00001001 INTL 20030522)
 acpiacad0 at acpi0 (AC, ACPI0003): ACPI AC Adapter
 acpibat0 at acpi0 (BAT0, PNP0C0A-1): ACPI Battery
 acpibat0: Sanyo LION rechargeable battery
 acpibat1 at acpi0 (BAT1, PNP0C0A-2): ACPI Battery
 acpilid0 at acpi0 (LID, PNP0C0D): ACPI Lid Switch
 acpibut0 at acpi0 (PBTN, PNP0C0C): ACPI Power Button
 acpibut1 at acpi0 (SBTN, PNP0C0E): ACPI Sleep Button
 MB1 (PNP0C01) at acpi0 not configured
 MB2 (PNP0C01) at acpi0 not configured
 MB3 (PNP0C01) at acpi0 not configured
 pckbc1 at acpi0 (PS2M, PNP0F13) (aux port): irq 12
 pckbc2 at acpi0 (KBC, PNP0303) (kbd port): io 0x60,0x64,0x62,0x66 irq 1
 attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43,0x50-0x53 irq 2
 pcppi1 at acpi0 (SPKR, PNP0800): io 0x61,0x63,0x65,0x67
 midi0 at pcppi1: PC speaker
 sysbeep0 at pcppi1
 MB4 (PNP0C01) at acpi0 not configured
 COPR (PNP0C04) at acpi0 not configured
 UAR1 (PNP0501) at acpi0 not configured
 FTPM (PNP0C01) at acpi0 not configured
 acpivga0 at acpi0 (VID): ACPI Display Adapter
 acpiout0 at acpivga0 (TV, 0x0200): ACPI Display Output Device
 acpiout1 at acpivga0 (CRT, 0x0100): ACPI Display Output Device
 acpiout2 at acpivga0 (LCD, 0x0110): ACPI Display Output Device
 acpiout3 at acpivga0 (DVI, 0x0120): ACPI Display Output Device
 acpitz0 at acpi0 (THM)
 apm0 at acpi0: Power Management spec V1.2
 ACPI: Enabled 2 GPEs in block 00 to 1F
 pckbd0 at pckbc2 (kbd slot)
 pckbc2: using irq 1 for kbd slot
 wskbd0 at pckbd0 mux 1
 pms0 at pckbc2 (aux slot)
 pckbc2: using irq 12 for aux slot
 wsmouse0 at pms0 mux 0
 attimer1: attached to pcppi1
 pci0 at mainbus0 bus 0: configuration mode 1
 pchb0 at pci0 dev 0 function 0: vendor 8086 product 2590 (rev. 0x03)
 agp0 at pchb0: can't find internal VGA config space
 ppb0 at pci0 dev 1 function 0: vendor 8086 product 2591 (rev. 0x03)
 ppb0: PCI Express capability version 1 <Root Port of PCI-E Root Complex> x16 @ 2.5GT/s
 pci1 at ppb0 bus 1
 nouveau0 at pci1 dev 0 function 0: vendor 10de product 00cc (rev. 0xa2)
 ppb1 at pci0 dev 28 function 0: vendor 8086 product 2660 (rev. 0x03)
 ppb1: PCI Express capability version 1 <Root Port of PCI-E Root Complex> x1 @ 2.5GT/s
 pci2 at ppb1 bus 2
 bge0 at pci2 dev 0 function 0: Broadcom BCM5751 Gigabit Ethernet
 bge0: interrupting at ioapic0 pin 16
 bge0: HW config 00000155, 00004015, 00000000, 00000000 00000000
 bge0: ASIC BCM5750 A1 (0x4001), Ethernet address 00:14:22:ef:2a:5d
 brgphy0 at bge0 phy 1: BCM5750 1000BASE-T media interface, rev. 0
 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
 uhci0 at pci0 dev 29 function 0: vendor 8086 product 2658 (rev. 0x03)
 uhci0: interrupting at ioapic0 pin 16
 usb0 at uhci0: USB revision 1.0
 uhci1 at pci0 dev 29 function 1: vendor 8086 product 2659 (rev. 0x03)
 uhci1: interrupting at ioapic0 pin 17
 usb1 at uhci1: USB revision 1.0
 uhci2 at pci0 dev 29 function 2: vendor 8086 product 265a (rev. 0x03)
 uhci2: interrupting at ioapic0 pin 18
 usb2 at uhci2: USB revision 1.0
 uhci3 at pci0 dev 29 function 3: vendor 8086 product 265b (rev. 0x03)
 uhci3: interrupting at ioapic0 pin 19
 usb3 at uhci3: USB revision 1.0
 ehci0 at pci0 dev 29 function 7: vendor 8086 product 265c (rev. 0x03)
 ehci0: interrupting at ioapic0 pin 16
 ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
 usb4 at ehci0: USB revision 2.0
 ppb2 at pci0 dev 30 function 0: vendor 8086 product 2448 (rev. 0xd3)
 pci3 at ppb2 bus 3
 cbb0 at pci3 dev 1 function 0: vendor 104c product 8036 (rev. 0x00)
 vendor 104c product 8038 (miscellaneous communications) at pci3 dev 1 function 5 not configured
 iwi0 at pci3 dev 3 function 0: vendor 8086 product 4220 (rev. 0x05)
 iwi0: interrupting at ioapic0 pin 17
 iwi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
 iwi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
 cbb0: interrupting at ioapic0 pin 19
 cardslot0 at cbb0
 cardbus0 at cardslot0: bus 4
 pcmcia0 at cardslot0
 auich0 at pci0 dev 30 function 2: i82801FB (ICH6) AC-97 Audio
 auich0: interrupting at ioapic0 pin 16
 auich0: ac97: SigmaTel STAC9750/51 codec; headphone, 20 bit DAC, 20 bit ADC, SigmaTel 3D
 auich0: ac97: ext id 0x605<AC97_22,AMAP,SPDIF,VRA>
 ichlpcib0 at pci0 dev 31 function 0: vendor 8086 product 2641 (rev. 0x03)
 ichlpcib0: 24-bit timer
 tco0 at ichlpcib0: TCO (watchdog) timer configured.
 gpio0 at ichlpcib0: 64 pins
 piixide0 at pci0 dev 31 function 2: Intel 82801FBM Serial ATA Controller (ICH6) (rev. 0x03)
 piixide0: primary channel interrupting at ioapic0 pin 14
 atabus0 at piixide0 channel 0
 piixide0: secondary channel interrupting at ioapic0 pin 15
 atabus1 at piixide0 channel 1
 isa0 at ichlpcib0
 com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
 com0: console
 acpicpu0 at cpu0: ACPI CPU
 acpiacad0: AC adapter online.
 audio0 at auich0: full duplex, playback, capture, mmap, independent
 uhub0 at usb0: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub1 at usb1: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub2 at usb2: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub3 at usb3: vendor 8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub4 at usb4: vendor 8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
 wd0 at atabus0 drive 0
 wd0: <Hitachi HTS721080G9AT00>
 wd0: 76319 MB, 155061 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 sectors
 atapibus0 at atabus1: 2 targets
 cd0 at atapibus0 drive 0: <_NEC DVD+/-RW ND-6650A, , 102C> cdrom removable
 boot device: wd0
 root on wd0a dumps on wd0b
 root file system type: ffs
 kern.module.path=/stand/i386/7.99.26/modules
 drm kern info: nouveau  [  DEVICE][nouveau0] BOOT0  : 0x042c00a1
 drm kern info: nouveau  [  DEVICE][nouveau0] Chipset: NV42 (NV42)
 drm kern info: nouveau  [  DEVICE][nouveau0] Family : NV40
 drm kern info: nouveau  [   VBIOS][nouveau0] checking PRAMIN for image...
 drm kern info: nouveau  [   VBIOS][nouveau0] ... appears to be valid
 drm kern info: nouveau  [   VBIOS][nouveau0] using image from PRAMIN
 drm kern info: nouveau  [   VBIOS][nouveau0] BIT signature found
 drm kern info: nouveau  [   VBIOS][nouveau0] version 05.41.02.29.a3
 drm kern info: nouveau  [     PFB][nouveau0] RAM type: DDR1
 drm kern info: nouveau  [     PFB][nouveau0] RAM size: 256 MiB
 drm kern info: nouveau  [     PFB][nouveau0]    ZCOMP: 189440 tags
 drm kern error: nouveau E[ INSTMEM][nouveau0] unable to map PRAMIN BAR: 35
 drm kern error: nouveau E[  DEVICE][nouveau0] failed to create 0x1000400c, -14
 drm kern error: nouveau E[     DRM] failed to create 0x80000080, -14
 nouveau0: unable to attach drm: 14

 --oyUTqETQ0mS9luUI--

From: Taylor R Campbell <riastradh@NetBSD.org>
To: Roy Bixler <rcbixler@nyx.net>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/50804: Nouveau console doesn't come up on Dell laptop
Date: Sat, 20 Feb 2016 15:51:17 +0000

    Date: Sat, 20 Feb 2016 08:45:45 -0700
    From: Roy Bixler <rcbixler@nyx.net>

    On Mon, Feb 15, 2016 at 08:41:48PM +0000, Taylor R Campbell wrote:
    > Another change that might be worthwhile to test would be to add
    > 
    > #include <ddb/ddb.h>
    > 
    > 	if (bpa/size covers the nvidia bar)
    > 		db_stack_trace_print(
    > 		    (db_expr_t)(intptr_t)__builtin_frame_address(0),
    > 		    true, 65535, "", printf);
    > 
    > to bus_space_map in sys/arch/x86/x86/bus_space.c, so that you can see
    > who is trying to map this bus space, in case someone else has already
    > mapped it.  (You'll need to fill in what the relevant BAR's address
    > and size actually are, unless you want to increase MSGBUFSIZE and wade
    > through a stack trace for every bus space mapping in the system.)

    The thought occurred to me before, so since you agree, I'll give it a
    go.

 Since bus_space_map is apparently failing with EAGAIN, that is
 definitely worth a try -- EAGAIN means someone else has already mapped
 some part of the region.

From: Roy Bixler <rcbixler@nyx.net>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/50804: Nouveau console doesn't come up on Dell laptop
Date: Sat, 20 Feb 2016 09:30:16 -0700

 On Sat, Feb 20, 2016 at 09:07:47AM -0700, Roy Bixler wrote:
 > On Sat, Feb 20, 2016 at 03:55:01PM +0000, Taylor R Campbell wrote:
 > > The following reply was made to PR kern/50804; it has been noted by GNATS.
 > > 
 > > From: Taylor R Campbell <riastradh@NetBSD.org>
 > > To: Roy Bixler <rcbixler@nyx.net>
 > > Cc: gnats-bugs@NetBSD.org
 > > Subject: Re: kern/50804: Nouveau console doesn't come up on Dell laptop
 > > Date: Sat, 20 Feb 2016 15:51:17 +0000
 > > 
 > >     Date: Sat, 20 Feb 2016 08:45:45 -0700
 > >     From: Roy Bixler <rcbixler@nyx.net>
 > >  
 > >     On Mon, Feb 15, 2016 at 08:41:48PM +0000, Taylor R Campbell wrote:
 > >     > Another change that might be worthwhile to test would be to add
 > >     > 
 > >     > #include <ddb/ddb.h>
 > >     > 
 > >     > 	if (bpa/size covers the nvidia bar)
 > >     > 		db_stack_trace_print(
 > >     > 		    (db_expr_t)(intptr_t)__builtin_frame_address(0),
 > >     > 		    true, 65535, "", printf);
 > >     > 
 > >     > to bus_space_map in sys/arch/x86/x86/bus_space.c, so that you can see
 > >     > who is trying to map this bus space, in case someone else has already
 > >     > mapped it.  (You'll need to fill in what the relevant BAR's address
 > >     > and size actually are, unless you want to increase MSGBUFSIZE and wade
 > >     > through a stack trace for every bus space mapping in the system.)
 > >  
 > >     The thought occurred to me before, so since you agree, I'll give it a
 > >     go.
 > >  
 > >  Since bus_space_map is apparently failing with EAGAIN, that is
 > >  definitely worth a try -- EAGAIN means someone else has already mapped
 > >  some part of the region.
 > 
 > Just one thing here -- I took your latest version and added the debugging
 > line back in to replay the bus_space_map parameters.  Here's the result:
 > 
 > drm kern info: nouveau  [  DEVICE][nouveau0] BOOT0  : 0x042c00a1
 > drm kern info: nouveau  [  DEVICE][nouveau0] Chipset: NV42 (NV42)
 > drm kern info: nouveau  [  DEVICE][nouveau0] Family : NV40
 > drm kern info: nouveau  [   VBIOS][nouveau0] checking PRAMIN for image...
 > drm kern info: nouveau  [   VBIOS][nouveau0] ... appears to be valid
 > drm kern info: nouveau  [   VBIOS][nouveau0] using image from PRAMIN
 > drm kern info: nouveau  [   VBIOS][nouveau0] BIT signature found
 > drm kern info: nouveau  [   VBIOS][nouveau0] version 05.41.02.29.a3
 > drm kern info: nouveau  [     PFB][nouveau0] RAM type: DDR1
 > drm kern info: nouveau  [     PFB][nouveau0] RAM size: 256 MiB
 > drm kern info: nouveau  [     PFB][nouveau0]    ZCOMP: 189440 tags
 > drm kern error: nouveau E[ INSTMEM][nouveau0] bar = 2, iomemt=c1136740, iomemsz=0, start=0
 > drm kern error: nouveau E[ INSTMEM][nouveau0] unable to map PRAMIN BAR: 35
 > drm kern error: nouveau E[  DEVICE][nouveau0] failed to create 0x1000400c, -14
 > drm kern error: nouveau E[     DRM] failed to create 0x80000080, -14
 > nouveau0: unable to attach drm: 14
 > 
 > So, the size and start of 0 definitely seem wrong.  I suppose I'll try
 > my experiment with bar = 1.

 I added a comparison of bpa == c0000000 to bus_space_map and it didn't
 trigger until I set bar = 1 in nouveau_subdev_instmem_nv40.c:

 drm kern info: nouveau  [  DEVICE][nouveau0] BOOT0  : 0x042c00a1
 drm kern info: nouveau  [  DEVICE][nouveau0] Chipset: NV42 (NV42)
 drm kern info: nouveau  [  DEVICE][nouveau0] Family : NV40
 drm kern info: nouveau  [   VBIOS][nouveau0] checking PRAMIN for image...
 drm kern info: nouveau  [   VBIOS][nouveau0] ... appears to be valid
 drm kern info: nouveau  [   VBIOS][nouveau0] using image from PRAMIN
 drm kern info: nouveau  [   VBIOS][nouveau0] BIT signature found
 drm kern info: nouveau  [   VBIOS][nouveau0] version 05.41.02.29.a3
 drm kern info: nouveau  [     PFB][nouveau0] RAM type: DDR1
 drm kern info: nouveau  [     PFB][nouveau0] RAM size: 256 MiB
 drm kern info: nouveau  [     PFB][nouveau0]    ZCOMP: 189440 tags
 ?(c287480c,0,c11caa44,0,c,da9fdd6c,c0fad4c8,c29cebec,c,c287495c) at c0b9c737
 uvm_fault(0xc12a1560, 0xb0cbf000, 1) -> 0xe
 fatal page fault in supervisor mode
 trap type 6 code 0 eip c013e358 cs 8 eflags 10246 cr2 b0cbff50 ilevel 0 esp c0b1679a
 curlwp 0xc287d2a0 pid 0 lid 47 lowest kstack 0xda9fb2c0
 kernel: supervisor trap page fault, code=0
 Stopped in pid 0.47 (system) at c013e358:       movl    0(%ecx),%eax
 db{0}> 

 -- 
 Roy Bixler <rcbixler@nyx.net>
 "The fundamental principle of science, the definition almost, is this: the
 sole test of the validity of any idea is experiment."
 -- Richard P. Feynman

From: Roy Bixler <rcbixler@nyx.net>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: kern/50804: Nouveau console doesn't come up on Dell laptop
Date: Sat, 20 Feb 2016 09:07:47 -0700

 On Sat, Feb 20, 2016 at 03:55:01PM +0000, Taylor R Campbell wrote:
 > The following reply was made to PR kern/50804; it has been noted by GNATS.
 > 
 > From: Taylor R Campbell <riastradh@NetBSD.org>
 > To: Roy Bixler <rcbixler@nyx.net>
 > Cc: gnats-bugs@NetBSD.org
 > Subject: Re: kern/50804: Nouveau console doesn't come up on Dell laptop
 > Date: Sat, 20 Feb 2016 15:51:17 +0000
 > 
 >     Date: Sat, 20 Feb 2016 08:45:45 -0700
 >     From: Roy Bixler <rcbixler@nyx.net>
 >  
 >     On Mon, Feb 15, 2016 at 08:41:48PM +0000, Taylor R Campbell wrote:
 >     > Another change that might be worthwhile to test would be to add
 >     > 
 >     > #include <ddb/ddb.h>
 >     > 
 >     > 	if (bpa/size covers the nvidia bar)
 >     > 		db_stack_trace_print(
 >     > 		    (db_expr_t)(intptr_t)__builtin_frame_address(0),
 >     > 		    true, 65535, "", printf);
 >     > 
 >     > to bus_space_map in sys/arch/x86/x86/bus_space.c, so that you can see
 >     > who is trying to map this bus space, in case someone else has already
 >     > mapped it.  (You'll need to fill in what the relevant BAR's address
 >     > and size actually are, unless you want to increase MSGBUFSIZE and wade
 >     > through a stack trace for every bus space mapping in the system.)
 >  
 >     The thought occurred to me before, so since you agree, I'll give it a
 >     go.
 >  
 >  Since bus_space_map is apparently failing with EAGAIN, that is
 >  definitely worth a try -- EAGAIN means someone else has already mapped
 >  some part of the region.

 Just one thing here -- I took your latest version and added the debugging
 line back in to replay the bus_space_map parameters.  Here's the result:

 drm kern info: nouveau  [  DEVICE][nouveau0] BOOT0  : 0x042c00a1
 drm kern info: nouveau  [  DEVICE][nouveau0] Chipset: NV42 (NV42)
 drm kern info: nouveau  [  DEVICE][nouveau0] Family : NV40
 drm kern info: nouveau  [   VBIOS][nouveau0] checking PRAMIN for image...
 drm kern info: nouveau  [   VBIOS][nouveau0] ... appears to be valid
 drm kern info: nouveau  [   VBIOS][nouveau0] using image from PRAMIN
 drm kern info: nouveau  [   VBIOS][nouveau0] BIT signature found
 drm kern info: nouveau  [   VBIOS][nouveau0] version 05.41.02.29.a3
 drm kern info: nouveau  [     PFB][nouveau0] RAM type: DDR1
 drm kern info: nouveau  [     PFB][nouveau0] RAM size: 256 MiB
 drm kern info: nouveau  [     PFB][nouveau0]    ZCOMP: 189440 tags
 drm kern error: nouveau E[ INSTMEM][nouveau0] bar = 2, iomemt=c1136740, iomemsz=0, start=0
 drm kern error: nouveau E[ INSTMEM][nouveau0] unable to map PRAMIN BAR: 35
 drm kern error: nouveau E[  DEVICE][nouveau0] failed to create 0x1000400c, -14
 drm kern error: nouveau E[     DRM] failed to create 0x80000080, -14
 nouveau0: unable to attach drm: 14

 So, the size and start of 0 definitely seem wrong.  I suppose I'll try
 my experiment with bar = 1.

 -- 
 Roy Bixler <rcbixler@nyx.net>
 "The fundamental principle of science, the definition almost, is this: the
 sole test of the validity of any idea is experiment."
 -- Richard P. Feynman

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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.