Additional check for Micron string at 0x1025 for older firmware Crucial DRAM
This commit is contained in:
parent
0841ccb7d1
commit
f13c9c83e0
2 changed files with 17 additions and 4 deletions
|
|
@ -19,7 +19,8 @@ typedef unsigned short crucial_register;
|
|||
enum
|
||||
{
|
||||
CRUCIAL_REG_DEVICE_VERSION = 0x1000, /* Version (Date) String 16 bytes */
|
||||
CRUCIAL_REG_MICRON_CHECK = 0x1030 /* "Micron" string should be here */
|
||||
CRUCIAL_REG_MICRON_CHECK_1 = 0x1025, /* "Micron" string location 1 */
|
||||
CRUCIAL_REG_MICRON_CHECK_2 = 0x1030 /* "Micron" string location 2 */
|
||||
};
|
||||
|
||||
enum
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ bool TestForCrucialController(i2c_smbus_interface* bus, unsigned char address)
|
|||
char buf[16];
|
||||
for(int i = 0; i < 16; i++)
|
||||
{
|
||||
buf[i] = CrucialRegisterRead(bus, address, CRUCIAL_REG_MICRON_CHECK + i);
|
||||
buf[i] = CrucialRegisterRead(bus, address, CRUCIAL_REG_MICRON_CHECK_1 + i);
|
||||
}
|
||||
|
||||
if(strcmp(buf, "Micron") == 0)
|
||||
|
|
@ -117,8 +117,20 @@ bool TestForCrucialController(i2c_smbus_interface* bus, unsigned char address)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG("[%s] Device %02X is not a Micron device, skipping", CRUCIAL_CONTROLLER_NAME, address);
|
||||
pass = false;
|
||||
for(int i = 0; i < 16; i++)
|
||||
{
|
||||
buf[i] = CrucialRegisterRead(bus, address, CRUCIAL_REG_MICRON_CHECK_2 + i);
|
||||
}
|
||||
|
||||
if(strcmp(buf, "Micron") == 0)
|
||||
{
|
||||
LOG_DEBUG("[%s] Device %02X is a Micron device, continuing", CRUCIAL_CONTROLLER_NAME, address);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG("[%s] Device %02X is not a Micron device, skipping", CRUCIAL_CONTROLLER_NAME, address);
|
||||
pass = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue