Rework Geode LX RAMinit DIMM size formula to be more
understandable. Added benefit is complaining loudly for unsupported 2 GB DIMM size. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Tested on the dbe62 up to and including Etherboot. Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/coreboot-v3@671 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
dbc8b4a8e4
commit
310f1af306
1 changed files with 5 additions and 9 deletions
|
|
@ -151,15 +151,11 @@ static void auto_size_dimm(unsigned int dimm, u8 dimm0, u8 dimm1)
|
|||
banner(BIOS_DEBUG, "SPDBANKDENSITY");
|
||||
dimm_size = spd_read_byte(dimm, SPD_BANK_DENSITY);
|
||||
|
||||
/* Align so 1 GB (bit 0) is bit 8. This is a little weird to get gcc
|
||||
* to not optimize this out.
|
||||
*/
|
||||
dimm_size |= (dimm_size << 8);
|
||||
|
||||
/* And off 2 GB DIMM size: not supported and the 1 GB size we just
|
||||
* moved up to bit 8 as well as all the extra on top.
|
||||
*/
|
||||
dimm_size &= 0x01FC;
|
||||
/* Bits 0-1 have been redefined by JEDEC to contain what would have
|
||||
* been in non-existing bits 8 (1GB) and 9 (2GB). Move bits 0-1 to
|
||||
* bits 8-9 and mask bits 0-1 off.
|
||||
*/
|
||||
dimm_size = ((dimm_size & 0x3) << 8) | (dimm_size & ~0x3);
|
||||
|
||||
/* Module Density * Module Banks */
|
||||
/* Shift to multiply by the number of DIMM banks. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue