Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 02-04-04, 05:37 AM   #13
gilboa
Linux addict...
 
Join Date: Jan 2004
Posts: 540
Default

I've rebuilt the driver to generate full debug info.
Here's the output.

[root@gilboa-home-dev gilboa]# dmesg -c
[root@gilboa-home-dev gilboa]# modprobe nvidia
[root@gilboa-home-dev gilboa]# X

XFree86 Version 4.3.0 (Red Hat Linux 9 release: 4.3.0-2.90.43)
Release Date: 15 August 2003
X Protocol Version 11, Revision 0, Release 6.6
Build Operating System: Linux 2.4.21-2.ELsmp i686 [ELF]
Build Date: 07 November 2003
Build Host: porky.devel.redhat.com
...
Module Loader present
OS Kernel: Linux version 2.6.1 (root@gilboa-home-dev) (gcc version 3.2.2 200302
2 (Red Hat Linux 3.2.2-5)) #2 SMP Wed Feb 4 09:16:12 IST 2004 P
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/XFree86.0.log", Time: Wed Feb 4 13:30:26 2004
(==) Using config file: "/etc/X11/XF86Config"
(EE) NVIDIA(0): Failed to map framebuffer memory
(EE) NVIDIA(0): *** Aborting ***

Fatal server error:
AddScreen/ScreenInit failed for driver 0
...

[root@gilboa-home-dev gilboa]# rmmod nvidia
[root@gilboa-home-dev gilboa]# dmesg -c
nvidia: module license 'NVIDIA' taints kernel.
(pci_read_config_dword returns the following values)
1: NVRM: 01:05.0 10de:0331 - 0xb6000000 [size=16M]
1: NVRM: 01:05.0 10de:0331 - 0xb8000000 [size=64M]
1: NVRM: found 1 device
1: nvidia: loading NVIDIA Linux x86 NVIDIA Kernel Module 1.0-5336 Wed Jan 14
8:29:26 PST 2004
1: nvidia_init_module: major number 195
1: nv_kern_open...
1: nv_kern_ctl_open
1: ioctl(0xc8, 0x82f18f4)
1: done with ioctl
1: ioctl(0xcb, 0xbffff968)
1: done with ioctl
1: ioctl(0x22, 0xbffff9a4)
1: done with ioctl
1: ioctl(0x4d, 0xbffff970)
1: done with ioctl
1: nv_kern_open...
1: nv_kern_open on device 0
1: NVRM: RmInitAdapter:
1: NVRM: RmSetupRegisters for 0x10de:0x331
1: NVRM: pci config info:
1: NVRM: registers look like: 0xb6000000 0x1000000
1: NVRM: fb looks like: 0xb8000000 0x4000000
1: NVRM: Successfully mapped framebuffer and registers
1: NVRM: final mappings:
1: NVRM: regs: 0xb6000000 0x1000000 0xf905a000
1: osCallVideoBIOS: 0x4f14 0x8e
1: nv_alloc_pages: 183 pages
1: NVRM: initializing rc timer
1: NVRM: rc timer initialized
1: NVRM: RmInitAdapter succeeded!
1: ioctl(0x23, 0xbffff994)
1: done with ioctl
1: ioctl(0xca, 0x82f18f0)
1: done with ioctl
1: ioctl(0x32, 0xbffff9b4)
1: done with ioctl
1: ioctl(0x32, 0xbffff9b0)
1: done with ioctl
1: ioctl(0x37, 0xbffff9b0)
1: done with ioctl
1: ioctl(0x32, 0xbffff9b8)
1: done with ioctl
1: ioctl(0x37, 0xbffff974)
1: done with ioctl
1: ioctl(0x32, 0xbffff97c)
1: done with ioctl
1: ioctl(0x32, 0xbffff97c)
1: done with ioctl
1: ioctl(0x32, 0xbffff97c)
1: done with ioctl
1: ioctl(0x32, 0xbffff97c)
1: done with ioctl
1: ioctl(0x32, 0xbffff97c)
1: done with ioctl
1: ioctl(0x32, 0xbffff988)
1: done with ioctl
1: ioctl(0x32, 0xbffff97c)
1: done with ioctl
1: ioctl(0x32, 0xbffff988)
1: done with ioctl
1: ioctl(0x32, 0xbffff97c)
1: done with ioctl
1: ioctl(0x32, 0xbffff988)
1: done with ioctl
1: ioctl(0x37, 0xbffff984)
1: done with ioctl
1: ioctl(0x27, 0xbffff98c)
1: nv_alloc_pages: 1 pages
1: nvos_malloc_pages: 1 pages
1: page_table: 0xf8b01000
1: done with ioctl
1: mmap([0x4067a000-0x4067b000] off=0x2900c000)
1: remapping 1 system pages for at 0xf6ad6640
1: ioctl(0x24, 0xbffff9a0)
1: done with ioctl
1: ioctl(0x32, 0xbffff9b0)
1: done with ioctl
1: ioctl(0x32, 0xbffff9b8)
1: done with ioctl
1: ioctl(0x37, 0xbffff988)
1: done with ioctl
1: ioctl(0x37, 0xbffff994)
1: done with ioctl
1: ioctl(0x37, 0xbffff968)
1: done with ioctl
1: ioctl(0x37, 0xbffff904)
1: done with ioctl
1: ioctl(0x37, 0xbffff904)
1: done with ioctl
1: ioctl(0x37, 0xbffff904)
1: done with ioctl
1: ioctl(0x37, 0xbffff828)
1: done with ioctl
1: ioctl(0x37, 0xbffff978)
1: done with ioctl
1: ioctl(0x37, 0xbffff99c)
1: done with ioctl
1: ioctl(0x29, 0xbffff9c8)
1: done with ioctl
1: ioctl(0x29, 0xbffff9bc)
1: nv_free_pages: 0x2900c000 0x1
1: nvos_free_pages: 1 pages
1: done with ioctl
1: vma_release for 0x4067a000 - 0x4067b000, offset 0x2900c000
1: at 0xf6ad6640, usage count 0, page_table 0xf8b01000
1: nvos_unlock_pages: 1 pages
1: nv_kern_close on device 0
1: NVRM: stopping rc timer
1: NVRM: rc timer stopped
1: nv_free_pages: 0xf8c16000 0xb7
1: tearing down registers
1: ioctl(0x22, 0xbffff970)
1: done with ioctl
1: ioctl(0x4d, 0xbffff93c)
1: done with ioctl
1: nv_kern_open...
1: nv_kern_open on device 0
1: NVRM: RmInitAdapter:
1: NVRM: RmSetupRegisters for 0x10de:0x331
1: NVRM: pci config info:
1: NVRM: registers look like: 0xb6000000 0x1000000
(16MB here.)
1: NVRM: fb looks like: 0xb8000000 0x4000000
(64MB here. Is this the wrong passed to the binary closed source driver?)
1: NVRM: Successfully mapped framebuffer and registers
1: NVRM: final mappings:
1: NVRM: regs: 0xb6000000 0x1000000 0xf905a000
1: osCallVideoBIOS: 0x4f14 0x8e
1: nv_alloc_pages: 183 pages
1: NVRM: initializing rc timer
1: NVRM: rc timer initialized
1: NVRM: RmInitAdapter succeeded!
1: ioctl(0x23, 0xbffff960)
1: done with ioctl
1: ioctl(0xca, 0x82f18f0)
1: done with ioctl
1: ioctl(0x48, 0xbffff9a0)
1: done with ioctl
1: ioctl(0x45, 0xbffff944)
1: NVRM: nv_agp_init
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:05.0 into 4x mode
1: NVRM: agp_init finished with status 0x0 and config 2
1: done with ioctl
1: ioctl(0x32, 0xbffff948)
1: done with ioctl
1: ioctl(0x37, 0xbffff93c)
1: done with ioctl
1: ioctl(0x27, 0xbffff930)
1: nv_alloc_pages: 16 pages
1: NVRM: AGPGART: allocated 16 pages
1: done with ioctl
1: mmap([0x4071b000-0x4072b000] off=0xc0000000)
1: ioctl(0x24, 0xbffff944)
1: done with ioctl
1: ioctl(0x26, 0xbffff934)
1: done with ioctl
1: mmap([0x4072b000-0x4073b000] off=0xb6800000)
1: ioctl(0x32, 0xbffff95c)
1: done with ioctl
1: ioctl(0x27, 0xbffff960)
1: done with ioctl
1: ioctl(0x4e, 0xbffff974)
1: done with ioctl
1: mmap([0x42136000-0x52036000] off=0xb8000000)
1: could not find map for vm 0xb8000000
1: NVRM: couldn't find pre-allocated memory!
1: ioctl(0x4f, 0xbffff94c)
1: done with ioctl
1: ioctl(0x29, 0xbffff994)
1: done with ioctl
1: ioctl(0x29, 0xbffff988)
1: nv_free_pages: 0xc0000000 0x10
1: NVRM: AGPGART: freed 16 pages
1: done with ioctl
1: vma_release for 0x4072b000 - 0x4073b000, offset 0xb6800000
1: vma_release for 0x4071b000 - 0x4072b000, offset 0xc0000000
1: at 0xf7028a80, usage count 0, page_table 0xf8ba8000
1: nvos_unlock_pages: 16 pages
1: nv_kern_close on device 0
1: NVRM: stopping rc timer
1: NVRM: rc timer stopped
1: NVRM: nv_agp_teardown
1: NVRM: AGPGART: backend released
1: NVRM: teardown finished with status 0x0
1: nv_free_pages: 0xf8c16000 0xb7
1: tearing down registers
1: nv_kern_ctl_close
1: nvidia_exit_module
[root@gilboa-home-dev gilboa]#


Anyone has any information about what should the pci_read_config_dword return on a normal GF5900/256 card so I'll know how to mimic the real values?

Gilboa
gilboa is offline   Reply With Quote
Old 02-04-04, 11:57 AM   #14
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default

You should be able to override the probed value at a higher level, i.e. in nvos_probe_devices().
zander is offline   Reply With Quote
Old 02-04-04, 01:36 PM   #15
gilboa
Linux addict...
 
Join Date: Jan 2004
Posts: 540
Default

Tried that... no go. Tried either (and both)
nv->bar.regs.size = 256 * 1024 * 1024 and
nv->bar.fb.size = 256 * 1024 * 1024.
First one has no effect and the second one gives me a "NVIDIA: Failed for set MTRR 0xb80000000, 256MB (write-combining)" error message and a garbled text display.

Just upgraded to 2.6.2.
Kernel still gives me a "mtrr: your CPUs had inconsistent fixed MTRR settings"

Oh... I tried playing with the AGP settings (128MB/256MB/512MB) no change.

Cheers,
Gilboa
gilboa is offline   Reply With Quote
Old 02-04-04, 02:52 PM   #16
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default

Ok, make sure you don't use vesafb or another fbdev driver, leave the probed register size unchanged, force the video memory size to 256MB and delete any MTRR range(s) overlapping the video memory address range, then retry to start X.
zander is offline   Reply With Quote
Old 02-04-04, 06:02 PM   #17
gilboa
Linux addict...
 
Join Date: Jan 2004
Posts: 540
Default

Doesn't work. The second the driver comes up, it deletes my mtrr settings and create it's own (invalid) ones.
I think I just noticed something weird.
If I try creating a 256MB mtrr memory range by hand it forces me to use a 256MB aligned address. (0xn0000000).
If I try creating one at 0xb8000000, I get an unaligned request error.

From where does the nVidia driver take the base address? How can I configure it to get use another?

Again, thanks for the help,
Gilboa
gilboa is offline   Reply With Quote
Old 02-05-04, 02:00 AM   #18
gilboa
Linux addict...
 
Join Date: Jan 2004
Posts: 540
Default Wroking!!!!!!!!!!

Once I decided the problem was that the BIOS wasn't setting up the AGP address correctly (@0xb8000000, which was unaligned), I reset the BIOS to defaults, and reconfigured it. Reboot, Bingo! the card came back at 0xc0000000. and now glxgears is running @7800fps.

Zander,
Thanks for the help. Iím in your debt.

We should all a FAQ about common (and less common) problems and how to solve them.

Gilboa
gilboa is offline   Reply With Quote
Old 02-05-04, 03:38 AM   #19
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default

The AGP aperture was assigned an address range overlapping the graphics card's video memory address range? I'm confused as which devices used to be assigned which address ranges. Either way, it's good to hear that you managed to get it working.
zander is offline   Reply With Quote
Old 02-05-04, 03:46 AM   #20
gilboa
Linux addict...
 
Join Date: Jan 2004
Posts: 540
Default

I'm guessing here, but the main problem seemed to the card's address.
It was assigned to b8000000 and the kernel can't map 256MB (0x10000000) on an unaligned address.

Am I making any sense?
gilboa is offline   Reply With Quote

Old 02-05-04, 04:19 AM   #21
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default

The video memory isn't mapped into the kernel as one large contiguous mapping, but even if it was, the original address range would've been just fine. A write-combining range of 256MB starting at 0xb8000000 is perfectly valid, as well. Looking at the debug information you posted earlier, the AGP aperture used to be at 0xc0000000, the card's video memory at 0xb8000000; I'm wondering where they are now? Also, which BIOS settings did you modify to achieve the desired result?
zander is offline   Reply With Quote
Old 02-05-04, 04:28 AM   #22
gilboa
Linux addict...
 
Join Date: Jan 2004
Posts: 540
Default

Here's the current working setup:
[root@gilboa-home-dev root]# lspci -v -s 01:05.0
01:05.0 VGA compatible controller: nVidia Corporation: Unknown device 0331 (rev a1) (prog-if 00 [VGA])
Flags: bus master, 66Mhz, medium devsel, latency 248, IRQ 16
Memory at be000000 (32-bit, non-prefetchable) [size=16M]
Memory at c0000000 (32-bit, prefetchable) [size=256M]
Expansion ROM at bffe0000 [disabled] [size=128K]
Capabilities: [60] Power Management version 2
Capabilities: [44] AGP version 3.0
[root@gilboa-home-dev root]# cat /proc/mtrr
reg00: base=0x00000000 ( 0MB), size=1024MB: write-back, count=1
reg01: base=0xc0000000 (3072MB), size= 256MB: write-combining, count=1
reg02: base=0xe0000000 (3584MB), size= 256MB: write-combining, count=1
[root@gilboa-home-dev root]# dmesg | grep agp
agpgart: Detected AMD 760MP chipset
agpgart: Maximum main memory to use for agp memory: 941M
agpgart: AGP aperture is 256M @ 0xe0000000
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:05.0 into 4x mode

Cheers,
Gilboa
gilboa is offline   Reply With Quote
Old 02-05-04, 06:10 AM   #23
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default

This is interesting: Memory at c0000000 (32-bit, prefetchable) [size=256M]; looks like your SBIOS (configuration) was to blame from the beginning.
zander is offline   Reply With Quote
Old 02-05-04, 06:32 AM   #24
gilboa
Linux addict...
 
Join Date: Jan 2004
Posts: 540
Default

Yep. Seems like it.

nVidia should add a line for their FAQ.
Step 1. Reset the BIOS configuration.
Step 2...

Cheers,
Gilboa
gilboa is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:54 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2014, nV News.