# Asus F3SC, x86, 3GB+ RAM and nvidia binary driver [SOLVED]

## Gef

Hi.

What follows is a meer description of the issue and a workaround that works. Nothing more. I'd like to have other pov on that topic.

And I hope this may save someone's time.

Context

 Hardware 

Asus F3SC - AP273C (very close to Asus F3SV model). PM965, Intel T7300 @ 2Ghz.

Comes with 2*1GB sticks of SODIMM/DDR2, PC5300, 667Mhz, 5-5-5-12, from Hynix (korean company).

nVidia Corporation GeForce 8400M G (rev a1), nvidia-settings reports 512MB of video ram, 128MB on board.

AMI BIOS, ASUS rev 207.

Gentoo x86, 2008.0, GCC 4.3.3, sys-kernel/tuxonice-sources-2.6.28-r3

emerge --info

 *Quote:*   

> # zcat /proc/config.gz | grep HIGHMEM
> 
> # CONFIG_NOHIGHMEM is not set
> 
> # CONFIG_HIGHMEM64G is not set
> ...

 

Full kernel .config

Issue

I planned to upgrade the notebook's RAM from 2*1GB to 2*2GB. I bought 2 sticks of  OCZ  SO-DIMM DDR2 2 Go PC5400 (5-5-5-5-15).

Plugged them in to replace the old sticks, and pressed the power on button. Kernel booted fine, but nvidia.ko failed to load with this dmesg error :

 *Quote:*   

> Feb 18 16:00:03 zetabox [   15.248428] NVRM: This PCI I/O region assigned to your NVIDIA device is invalid:
> 
> Feb 18 16:00:03 zetabox [   15.248430] NVRM: BAR1 is 0M @ 0x00000000 (PCI:0001:00.0)
> 
> Feb 18 16:00:03 zetabox [   15.248432] NVRM: The system BIOS may have misconfigured your graphics card.
> ...

 

It looked like BIOS/Kernel adresses in an odd way the memory, above the 4GB boudary. Moreover, the system only reported 3GB whereas the BIOS reported 4096MB.

I flipped the kernel config like this, just to try :

 *Quote:*   

> 
> 
> # CONFIG_NOHIGHMEM is not set
> 
> CONFIG_HIGHMEM64G=y[/u]
> ...

 

Nothing new. Same driver problem.

Well, I search the web, and read a few interesting things :

- a few things about PAE, memory addressing on x86, etc.

- 4GB ram installed, but Gentoo only sees 3GB

- Problem with memory detection (4GB ram not all detected)

- Nvnews : Unable to install Nvidia driver on 9500M + Ubuntu

I found this patch against kernel in a topic above.

```

--- linux-2.6.21/arch/x86/pci/i386.c   2007-06-16 20:21:50.000000000 +0200

+++ linux-2.6.22/arch/x86/pci/i386.c   2007-06-16 20:30:20.000000000 +0200

@@ -109,6 +109,10 @@ static void __init pcibios_allocate_bus_

             r = &dev->resource[idx];

             if (!r->flags)

                continue;

+            if ((r->start == 0xbdf00000) && (r->end == 0xddefffff)) {

+               r->start = 0xc0000000;

+               r->end = 0xd0000000;

+            }

             pr = pci_find_parent_resource(dev, r);

             if (!r->start || !pr ||

                 request_resource(pr, r) < 0) {

```

Manually applied and compiled fine with 2.6.28-tuxonice-r3 (and HIGHMEM64G=y): the system know sees 4049MB of memory, and nvidia module loads as expected.

A few other details :

 *Quote:*   

> 
> 
> root / # cat /proc/meminfo | grep Total | head -n 3
> 
> MemTotal:        4147092 kB
> ...

 

 *Quote:*   

> 
> 
> root / # cat /proc/mtrr[/topic]
> 
> reg00: base=0x0c0000000 ( 3072MB), size= 1024MB, count=1: uncachable
> ...

 

Asus has released at least a new BIOS after rev207 :

 *Quote:*   

> BIOS 208
> 
> Fix “VGA device will disappear under winXP when system installs DRAM over 3G”. 

 .

(I'll need to install Windows to use their flash utility - WinFlash - to flash this new rom. If I find time, i'll do it and report here).

----------

## Gef

Other interesting exposition of the problem :

http://tjworld.net/wiki/Linux/Bug/PciAllocationAlgorithm

The above patches : http://www.nvnews.net/vbulletin/showthread.php?p=1673409#post1673409

----------

## Gef

Flashing the BIOS with the latest (ver. 209) ROM did fixe the issue : I can compile a regular kernel without the ugly patch (even though I had to install Windows Vista because the brand new sys-apps/flashrom project doesn't support my notebook's eeprom, and the damned in-BIOS flash-utility can't figure out what to do with the rom file).

Hope that can help someone ; >2GB RAM is really neat when you don't reboot often.

----------

