lkml.org 
[lkml]   [2012]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] amd64_edac: Memory size reported double on processor family 0Fh
On 09/12/2012 10:49 AM, Borislav Petkov wrote:
>
> Yes, that's because the whole init_csrows thing has been b0rked since
> forever. In your case, amd64_csrow_nr_pages() should pay attention to
> the dct (second argument) which on K8 is always 0 (we have only one DCT
> aka Dram ConTroller on K8) and the function should return 0 if dct is 1.
> But the whole loop in init_csrows is fishy too so I'll need to rework
> that properly. Oh well...
>
Looks like we're seeing an issue on another machine. Still 0Fh family,
but the model is reported as 2, with cs_mode 7. This causes the machine
to report that it has 32GB memory instead of 4GB. For this issue it
seems like the shift logic is incorrect. Looking at the old
ddr2_dbam_revD table it doesn't really lend itself to shifting very
easily. Perhaps something like this (albeit very ugly - it matches the
old table):

/* 3 to 5 */
if ( cs_mode > 2 && cs_mode < 6 )
return 32 << (cs_mode - 1);
/* 6 to 8 */
else if ( cs_mode > 5 && cs_mode < 9 )
return 32 << (cs_mode - 3);
/* 9 and 10 */
else if ( cs_mode > 8 )
return 32 << (cs_mode - 4);
/* 0 to 3 */
else
return 32 << cs_mode;

Josh


\
 
 \ /
  Last update: 2012-09-12 19:01    [W:0.085 / U:3.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site