On Sun, Dec 27, 2015 at 10:45:18AM -0700, Roy Bixler wrote: > On Sat, Dec 26, 2015 at 10:54:34PM +0900, Makoto Fujiwara wrote: > > options MSGBUFSIZE=1048576 > > Good idea. I put this in my NOUVEAU kernel configuration and was able > to get some more dmesg output. I'm not set up with a serial console > and there is voluminous output on bootup, so I'll just attach a few > screenshots. The first one shows that the nouveau0 device attaches to > the card and doesn't show any errors. The second one shows that the > initialisation of the nouveau driver appears to be successful and > finds its PRAMIN image. The final image shows the failure to "map > PRAMIN BAR". I put an additional debug message in the code in > /usr/src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nouveau_subdev_instmem_nv40.c: > > #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; > nv_error(priv, "unable to map PRAMIN BAR\n"); > return -EFAULT; > } > > which shows that > > bar = 2, iomemt=c1077780, iomemsz=10, start=0 I tried a further experiment with some intriguing results. With the attached patch, which sets "bar = 1" and adds debugging statements with some delays, I at least got the "nv40_instmem_ctor()" function to succeed. The result of the above statement also looks more sensible: bar = 1, iomemt=c107c700, iomemsz=1000000, start=c0000000 Afterwards, the video mode changes, but then I only get a blank screen. Screen shots showing the debug output also attached. I suppose that, to make any further progress, I'll need to get a null modem cable and set up a serial console. -- Roy Bixler <rcbixler%nyx.net@localhost> "The fundamental principle of science, the definition almost, is this: the sole test of the validity of any idea is experiment." -- Richard P. Feynman
--- nouveau_subdev_instmem_nv40.c.orig 2015-11-12 11:34:08.000000000 +0000 +++ nouveau_subdev_instmem_nv40.c 2015-12-29 15:21:39.000000000 +0000 @@ -76,10 +76,13 @@ 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)); +mdelay(5000); if (bus_space_map(priv->iomemt, nv_device_resource_start(device, bar), priv->iomemsz, 0, &priv->iomemh)) { priv->iomemsz = 0; @@ -94,6 +97,8 @@ return -EFAULT; } #endif +nv_error(priv, "ioremap succeeded\n"); +mdelay(1000); /* PRAMIN aperture maps over the end of vram, reserve enough space * to fit graphics contexts for every channel, the magics come @@ -115,18 +120,24 @@ if (ret) return ret; +nv_error(priv, "mm_init succeeded\n"); +mdelay(1000); /* 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"); +mdelay(1000); /* 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"); +mdelay(15000); /* 0x18000-0x18200: reserve for RAMRO * 0x18200-0x20000: padding */ @@ -135,6 +146,8 @@ if (ret) return ret; +nv_error(priv, "gpuobj2 succeeded\n"); +mdelay(1000); /* 0x20000-0x21000: reserve for RAMFC * 0x21000-0x40000: padding and some unknown crap */ @@ -142,6 +155,8 @@ NVOBJ_FLAG_ZERO_ALLOC, &priv->ramfc); if (ret) return ret; +nv_error(priv, "instmem_ctor succeeded\n"); +mdelay(15000); return 0; }
Attachment:
20151229_092310.jpeg
Description: JPEG image
Attachment:
20151229_091846.jpeg
Description: JPEG image