[Openchrome-users] Memory size detection failed: using 16MB, system has 8MB

Mark Huijgen mark.sf.net
Tue Feb 6 05:51:04 PST 2007


Luc Verhaegen wrote:
> On Tue, Feb 06, 2007 at 11:38:28AM +0100, Mark Huijgen wrote:
>   
>> The company I work for manages lot of computers with the following VIA 
>> chip: VIA VT3122 (CLE266)-EPIA M/MII/....
>> All the bios'es have the video memory set to 8MB. The driver fails to 
>> detect this and defaults to 16MB. This of course gives some weird result 
>> on the screen.
>>
>> I put in some debug lines around
>>      /* detect amount of installed ram */
>> in via_driver.c to print pScrn->videoRam and bMemSize, both are 0.
>>
>>     
> Try using my driver.
>
> Here the dependence on the BIOS is set to an absolutely minimum. You'll 
> see that it'll correctly detect your memory size, ram type, and whether 
> or not direct cpu access is enabled, as it bothers the memory controller 
> directly.
>
> Luc Verhaegen.
>   
With the code in Luc's driver I managed to fix the openchrome driver for 
my chip regarding video memory detection.
The problem is that on my system
    hwp->readSeq(hwp, 0x34);
Failes to get the memory size, Luc's driver falls back in this case to 
call 0x39 used for other types of chips.
This correctly detects the 8Mb video ram in my system.

Attached is a patch that adds this fallback to via_driver.c against 
current svn, maybe usefull to include in the tree.

regards,
Mark
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: memorydetect.patch
Url: http://wiki.openchrome.org/pipermail/openchrome-users/attachments/20070206/c53597d5/memorydetect.ksh



More information about the Openchrome-users mailing list