Chameleon

Chameleon Commit Details

Date:2011-06-14 23:20:29 (12 years 10 months ago)
Author:Cosmosis Jones
Commit:1018
Parents: 1017
Message:smbios_getters (added a DBG for validating the index in order to make sure we were mapped to spd.c's slot platform.h -- fixed a type on a comment spd.c moved the check && Platform.DMI.DIMM[i] assignment into the if check for spd validity
Changes:
M/trunk/i386/libsaio/spd.c
M/trunk/i386/libsaio/platform.h
M/trunk/i386/libsaio/smbios_getters.c

File differences

trunk/i386/libsaio/spd.c
342342
343343
344344
345
346
347
348
349
350
345351
346
347
348
349
350
352
351353
352354
353
354
355
356
355
357356
358357
359358
slot->Vendor,
slot->PartNo,
slot->SerialNo);
//This should probably be inside the if...
// laptops sometimes show slot 0 and 2 with slot 1 empty when only 2 slots are presents so:
Platform.DMI.DIMM[i]=
i>0 && Platform.RAM.DIMM[1].InUse==false && fullBanks && Platform.DMI.CntMemorySlots == 2 ?
mapping[i] : i; // for laptops case, mapping setup would need to be more generic than this
#if DEBUG_SPD
//Azi: this was gone with mem.c... remove??
dumpPhysAddr("spd content: ", slot->spd, spd_size);
getchar();
#endif
}
// laptops sometimes show slot 0 and 2 with slot 1 empty when only 2 slots are presents so:
Platform.DMI.DIMM[i]=
i>0 && Platform.RAM.DIMM[1].InUse==false && fullBanks && Platform.DMI.CntMemorySlots == 2 ?
mapping[i] : i; // for laptops case, mapping setup would need to be more generic than this
slot->spd = NULL;
trunk/i386/libsaio/platform.h
141141
142142
143143
144
144
145145
146146
147147
} RAM;
struct DMI {
intMaxMemorySlots;// number of memory slots polulated by SMBIOS
intMaxMemorySlots;// number of memory slots populated by SMBIOS
intCntMemorySlots;// number of memory slots counted
intMemoryModules;// number of memory modules installed
intDIMM[MAX_RAM_SLOTS];// Information and SPD mapping for each slot
trunk/i386/libsaio/smbios_getters.c
258258
259259
260260
261
262
263
261264
262265
263266
intmap;
idx++;
DBG("getSMBMemoryDeviceSerialNumber index: %d, MAX_RAM_SLOTS: %d\n",idx,MAX_RAM_SLOTS);
if (idx < MAX_RAM_SLOTS)
{
map = Platform.DMI.DIMM[idx];

Archive Download the corresponding diff file

Revision: 1018