View Single Post
Old 11-26-08, 10:56 AM   #13
sPOiDar
Registered User
 
Join Date: Nov 2008
Posts: 15
Default Re: Problems with 9300M GS on Sony Vaio Z11

OK, some more information coming here, no solutions at this stage sadly. I have a VAIO VGN-Z17GN/B, the Australian designation for the Z11, nvidia drivers 180.08_beta, kernel 2.6.27.7 (gentoo-sources-2.6.27-r4). Booting linux enables both Intel 4500MHD and nVidia 9300GS, at which point the Intel is functional, but the nVidia is not. Booting into WinXP, then rebooting disables the Intel, allowing the nVidia to function correctly until next reboot.

First, this just doesn't look right, we're trying to allocate 1 byte where end < start:
Code:
Nov 27 19:02:43 ballista pci 0000:01:00.0: BAR 6: can't allocate mem resource [0xd0000000-0xcfffffff]
This occurs both with the BIOS forcing POSTing the nVidia card (after booting XP), and also when the Intel card is POSTed with both cards are present. It doesn't seem to cause a problem, but it is erroneous behaviour.

Next, when booted with both cards enabled (the BIOS sets Intel to primary), we get the nVidia card allocating memory for the BIOS:
Code:
Nov 27 19:02:43 ballista PCI: 0000:01:00.0 reg 30 32bit mmio: [fffe0000, ffffffff]
Code:
pci bus 0x0001 cardnum 0x00 function 0x00: vendor 0x10de device 0x06e5
 nVidia Corporation  Device unknown
 CardVendor 0x104d card 0x9025 (Card unknown)
  STATUS    0x0010  COMMAND 0x0007
  CLASS     0x03 0x00 0x00  REVISION 0xa1
  BIST      0x00  HEADER 0x00  LATENCY 0x00  CACHE 0x00
  BASE0     0xe4000000  addr 0xe4000000  MEM
  BASE1     0x00000000c000000c  addr 0x00000000c0000000  MEM PREFETCHABLE 64BIT
  BASE3     0x00000000e2000004  addr 0x00000000e2000000  MEM 64BIT
  BASE5     0x00007001  addr 0x00007000  I/O
  BASEROM   0xfffe0000  addr 0xfffe0000  not-decode-enabled
  MAX_LAT   0x00  MIN_GNT 0x00  INT_PIN 0x01  INT_LINE 0x0a
  BYTE_0    0x4d  BYTE_1  0x10  BYTE_2  0x25  BYTE_3  0x90
And attempting to start X gives us our old friend:
Code:
Nov 27 00:44:23 ballista 0: NVRM: failed to copy vbios to system memory.
Nov 27 00:44:23 ballista 0: NVRM: RmInitAdapter failed! (0x30:0xffffffff:891)
Nov 27 00:44:23 ballista 0: NVRM: rm_init_adapter(0) failed
However, there is no 'rom' entry in sysfs for the card as there is when it's properly initialized (I tried setting various COMMAND states via setpci to no effect). And I believe that's why the driver is unable to load it - it's not been decoded. Here's the first 512b memory at 0xfffe0000:
Code:
00000000  4d 5a 90 00 03 00 00 00  04 00 00 00 ff ff 00 00  |MZ..............|
00000010  b8 00 00 00 00 00 00 00  40 00 00 00 00 00 00 00  |........@.......|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 c0 00 00 00  |................|
00000040  0e 1f ba 0e 00 b4 09 cd  21 b8 01 4c cd 21 54 68  |........!..L.!Th|
00000050  69 73 20 70 72 6f 67 72  61 6d 20 63 61 6e 6e 6f  |is program canno|
00000060  74 20 62 65 20 72 75 6e  20 69 6e 20 44 4f 53 20  |t be run in DOS |
00000070  6d 6f 64 65 2e 0d 0d 0a  24 00 00 00 00 00 00 00  |mode....$.......|
00000080  c1 45 3c dc 85 24 52 8f  85 24 52 8f 85 24 52 8f  |.E<..$R..$R..$R.|
00000090  80 28 5d 8f 84 24 52 8f  80 28 31 8f 81 24 52 8f  |.(]..$R..(1..$R.|
000000a0  80 28 08 8f 84 24 52 8f  52 69 63 68 85 24 52 8f  |.(...$R.Rich.$R.|
000000b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000c0  50 45 00 00 4c 01 02 00  62 54 6a 48 00 00 00 00  |PE..L...bTjH....|
000000d0  00 00 00 00 e0 00 0f 21  0b 01 07 0a 60 51 00 00  |.......!....`Q..|
000000e0  e0 0c 00 00 00 00 00 00  00 00 00 00 20 02 00 00  |............ ...|
000000f0  80 53 00 00 00 00 00 00  20 00 00 00 20 00 00 00  |.S...... ... ...|
00000100  04 00 00 00 00 00 00 00  04 00 00 00 00 00 00 00  |................|
00000110  60 60 00 00 20 02 00 00  00 00 00 00 03 00 00 00  |``.. ...........|
00000120  00 00 10 00 00 10 00 00  00 00 10 00 00 10 00 00  |................|
00000130  00 00 00 00 10 00 00 00  00 00 00 00 00 00 00 00  |................|
00000140  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001b0  00 00 00 00 00 00 00 00  2e 74 65 78 74 00 00 00  |.........text...|


000001c0  56 51 00 00 20 02 00 00  60 51 00 00 20 02 00 00  |VQ.. ...`Q.. ...|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 20 00 00 60  |............ ..`|
000001e0  2e 64 61 74 61 00 00 00  ce 0c 00 00 80 53 00 00  |.data........S..|
000001f0  e0 0c 00 00 80 53 00 00  00 00 00 00 00 00 00 00  |.....S..........|
When the nvidia card is correctly initialised, extracting the BIOS via sysfs gives:
Code:
00000000  55 aa 72 eb 4b 37 34 30  30 e9 4c 19 77 cc 56 49  |U.r.K7400.L.w.VI|
00000010  44 45 4f 20 0d 00 00 00  f0 01 3a 1d 00 00 49 42  |DEO ......:...IB|
00000020  4d 20 56 47 41 20 43 6f  6d 70 61 74 69 62 6c 65  |M VGA Compatible|
00000030  01 00 00 00 c1 00 78 be  30 36 2f 32 36 2f 30 38  |......x.06/26/08|
00000040  00 00 00 00 00 00 00 00  00 10 00 00 00 00 00 00  |................|
00000050  e9 f6 34 00 4d 10 25 90  ff ff ff 7f 00 00 00 00  |..4.M.%.........|
00000060  ff ff ff 7f 00 00 00 80  22 00 a5 c1 e9 4b a7 e9  |........"....K..|
00000070  52 a7 50 4d 49 44 6c 00  6f 00 00 00 00 a0 00 b0  |R.PMIDl.o.......|
00000080  00 b8 00 c0 00 33 62 24  4f 05 02 00 7c 00 00 00  |.....3b$O...|...|
00000090  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
000000e0  ff ff ff ff ff ff ff ff  48 57 45 41 53 6f 6e 79  |........HWEASony|
000000f0  20 6d 6f 62 69 6c 65 20  41 20 4e 42 39 4d 2d 47  | mobile A NB9M-G|
00000100  53 20 56 47 41 20 42 49  4f 53 0d 0a 00 00 00 00  |S VGA BIOS......|
00000110  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000130  00 00 00 00 00 00 00 00  00 00 00 00 00 56 65 72  |.............Ver|
00000140  73 69 6f 6e 20 36 32 2e  39 38 2e 33 43 2e 30 30  |sion 62.98.3C.00|
00000150  2e 30 38 20 0d 0a 00 43  6f 70 79 72 69 67 68 74  |.08 ...Copyright|
00000160  20 28 43 29 20 31 39 39  36 2d 32 30 30 38 20 4e  | (C) 1996-2008 N|
00000170  56 49 44 49 41 20 43 6f  72 70 2e 0d 0a 00 00 00  |VIDIA Corp......|
00000180  00 01 ff ff 00 c0 00 70  47 39 38 20 42 6f 61 72  |.......pG98 Boar|
00000190  64 20 2d 20 6e 62 39 6d  2d 36 65 35 00 00 00 00  |d - nb9m-6e5....|
000001a0  00 00 00 00 00 00 00 00  00 00 00 4d 33 39 4d 47  |...........M39MG|
000001b0  5f 32 32 0d 0a 00 00 00  00 00 00 00 00 00 00 ba  |_22.............|
000001c0  91 98 96 91 9a 9a 8d 96  91 98 df ad 9a 93 9a 9e  |................|
000001d0  8c 9a df d2 df b1 90 8b  df b9 90 8d df af 8d 90  |................|
000001e0  9b 8a 9c 8b 96 90 91 df  aa 8c 9a f2 f5 ff 00 00  |................|
000001f0  50 43 49 52 de 10 e5 06  00 00 18 00 00 00 00 03  |PCIR............|
Which is much more like what we're looking for, and if the driver is just trying to read the BIOS from 0xfffe0000, then it's obviously not going to find what it's looking for...

Short story long, I think this is a combination of factors biting us - a poor system BIOS that is completely unconfigurable (I've never seen a BIOS with fewer options), that relies on detecting Windows versions to determine operation (this is something we may be able to leverage, though it's really an ugly hack). Plus the long-standing poor handling of multiple VGA adapters under linux, and probably some xorg and nvidia-drivers deficiencies in int10 initialization.

All that said, I've never looked at any of this code before, so I could be completely wrong in all of my assertions. My theory and hope though is, if Vista can initialize the card when booted in the same state we get it in Linux, then we should be able to do so too...

We could probably work around these problems temporarily with the bios-from-file hack, but BiosLocation has now been removed completely for being 'dangerous' (don't use it unless you need it, but don't remove it while it's still useful!), and various other sections have changed. I may look at implementing some analogue (maybe just mmap the bios dump and point BiosBase at it would work?) against the current code...

I have some register dumps from Windows when flicking the stamina/speed switch if they're at all usefull, but I've not been able to trace the ACPI calls involved since my Vista seems to hang after about 30 seconds when debug is enabled.

I also have register dumps from linux when booting with the intel card enabled, and disabled by the BIOS (WinXP detection) if they're of any use.

I've attached the requisite nvidia-bug-report, one for a working nvidia state (good), one non-working (bad).

Not really sure where I should be taking these issues now... anyone from NV give us some ideas on where to next?


PS - Another oddity on this thing is that dumping the rom from what's meant to be the Ricoh CardBus bridge actually gives us the Intel VGA BIOS!!
Code:
00000000  55 aa 80 e9 1b f4 30 30  30 30 30 30 30 30 30 30  |U.....0000000000|
00000010  30 30 4c 22 e9 65 21 ba  40 00 e0 0a 30 30 49 42  |00L".e!.@...00IB|
00000020  4d 20 56 47 41 20 43 6f  6d 70 61 74 69 62 6c 65  |M VGA Compatible|
00000030  20 42 49 4f 53 2e 20 03  5a 00 6a 00 78 00 8b c0  | BIOS. .Z.j.x...|
00000040  50 43 49 52 86 80 42 2a  00 00 18 00 00 00 00 03  |PCIR..B*........|
<snip>
00000ae0  24 56 42 54 20 43 41 4e  54 49 47 41 20 20 20 20  |$VBT CANTIGA    |
00000af0  20 20 20 20 64 00 30 00  0e 0f ce 00 30 00 00 00  |    d.0.....0...|
00000b00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000b10  42 49 4f 53 5f 44 41 54  41 5f 42 4c 4f 43 4b 20  |BIOS_DATA_BLOCK |
00000b20  8d 00 16 00 de 0e fe ea  00 00 64 01 01 0d 07 31  |..........d....1|
00000b30  36 32 39 49 6e 74 65 6c  28 72 29 43 61 6e 74 69  |629Intel(r)Canti|
00000b40  67 61 20 50 43 49 20 41  63 63 65 6c 65 72 61 74  |ga PCI Accelerat|
00000b50  65 64 20 53 56 47 41 20  42 49 4f 53 0d 0a 42 75  |ed SVGA BIOS..Bu|
00000b60  69 6c 64 20 4e 75 6d 62  65 72 3a 20 31 36 32 39  |ild Number: 1629|
00000b70  20 50 43 20 31 34 2e 33  34 20 20 30 34 2f 30 39  | PC 14.34  04/09|
00000b80  2f 32 30 30 38 20 20 30  34 3a 32 32 3a 32 33 0d  |/2008  04:22:23.|
00000b90  0a 44 45 43 4f 4d 50 49  4c 41 54 49 4f 4e 20 4f  |.DECOMPILATION O|
00000ba0  52 20 44 49 53 41 53 53  45 4d 42 4c 59 20 50 52  |R DISASSEMBLY PR|
00000bb0  4f 48 49 42 49 54 45 44  0d 0a 00 00 00 00 00 00  |OHIBITED........|
00000bc0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 43 6f  |..............Co|
00000bd0  70 79 72 69 67 68 74 20  28 43 29 20 32 30 30 30  |pyright (C) 2000|
00000be0  2d 32 30 30 33 20 49 6e  74 65 6c 20 43 6f 72 70  |-2003 Intel Corp|
00000bf0  2e 20 41 6c 6c 20 52 69  67 68 74 73 20 52 65 73  |. All Rights Res|
00000c00  65 72 76 65 64 2e 0d 0a  0d 0a 00 00 c0 03 08 04  |erved...........|
00000c10  20 00 00 01 05 00 07 17  00 01 01 fe 20 00 01 01  | ........... ...|
Attached Files
File Type: log bad-nvidia-bug-report.log (110.2 KB, 416 views)
File Type: log good-nvidia-bug-report.log (135.6 KB, 398 views)
sPOiDar is offline   Reply With Quote