On Wed, 5 Sep 2007 17:25:53 +0200
Lubo? Dole?el <lubos at dolezel.info> wrote:
> Hello,
>
> I have a dual-GPU card GeForce 7950 GX2 (PCI ID 10de:0294).
> Unfortunately, I cannot make a dump using renouveau, because the
> program crashes. The backtrace looks like this:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000004153af in read_fb_ramin (instanceMem=4, offset=2) at
> objects.c:4089
> 4089 return fb[((fb_size - (ramin_block*512*1024) +
> ramin_inst)/4)
> + offset];
> (gdb) bt
> #0 0x00000000004153af in read_fb_ramin (instanceMem=4, offset=2) at
> objects.c:4089
> #1 0x0000000000415901 in find_object_type_in_ramin (name=3203352833)
> at objects.c:4314
> #2 0x0000000000415ccb in find_object_type (name=3203352833) at
> objects.c:4441 #3 0x0000000000403caf in set_subchannel (channel=0,
> name=3203352833) at re.c:546
> #4 0x0000000000403fbc in dump_fifo (map=0x3567f50, dump_startup=1)
> at re.c:642
> #5 0x0000000000404423 in dump_after (dump_startup=1) at re.c:744
> #6 0x000000000040bae7 in test_startup () at tests.c:3326
> #7 0x000000000041055e in run_opengl_tests () at main.c:390
> #8 0x0000000000410529 in main (argc=1, argv=0x7fff397bb538) at
> main.c:372
>
> And the "fb" variable is a NULL pointer.
>
> Is there any way I can help, do some testing, etc.?
> Please CC me in response, as I'm not a list member.
>
> Regards,
This is happening because we try to map > 256MB of the frame buffer
(fb) and it fails. I think that mapping only the last 256MB of the
frame buffer might work.
Could you try this patch?
Index: re.c
==================================================================RCS file:
/cvsroot/nouveau/renouveau/re.c,v
retrieving revision 1.125
diff -u -r1.125 re.c
--- re.c 28 Aug 2007 11:41:31 -0000 1.125
+++ re.c 6 Sep 2007 03:17:53 -0000
@@ -294,13 +294,26 @@
printf("vram_size\t%d\n",vid_ram);
printf("BOOT0\t0x%08x\n",all_regs[0]);
- if (0!=vid_ram && fb_size != vid_ram*(1024*1024))
+ if (0 != vid_ram)
{
- printf("# Reported FB size from the PCI config of %dMB is "
- "different from the actual VRAM size of %dMB\n",
- fb_size/(1024*1024), vid_ram);
- printf("# Adjusting FB size to match VRAM\n");
- fb_size = vid_ram * 1024 * 1024;
+ if (vid_ram <= 256)
+ {
+ if (fb_size != vid_ram*(1024*1024))
+ {
+ printf("# Reported FB size from the PCI config of %dMB is "
+ "different from the actual VRAM size of %dMB\n",
+ fb_size/(1024*1024), vid_ram);
+ printf("# Adjusting FB size to match VRAM\n");
+ fb_size = vid_ram * 1024 * 1024;
+ }
+ }
+ else
+ {
+ // Force us to read the last 256MB from vram.
+ // This should be where ramin is for G70/NV40 cards.
+ fb_phys += (vid_ram - 256) * 1024 * 1024;
+ fb_size = 256;
+ }
}
printf("fb_size\t%d\n",fb_size>>20);
jb17bsome