Chameleon

Chameleon Commit Details

Date:2010-07-24 17:04:20 (13 years 8 months ago)
Author:mozo
Commit:222
Parents: 221
Message:Merged latest Rekursor's changes
Changes:
M/branches/mozodojo/i386/libsaio/acpi_patcher.c
M/branches/mozodojo/i386/libsaio/spd.c

File differences

branches/mozodojo/i386/libsaio/acpi_patcher.c
189189
190190
191191
192
192
193193
194
194
195195
196196
197197
198198
199199
200
200
201201
202202
203203
204
204
205205
206206
207207
uint8_tacpi_cpu_count = 0;
char* acpi_cpu_name[32];
void get_acpi_cpu_names(unsigned char* dsdt, unsigned int length)
void get_acpi_cpu_names(unsigned char* dsdt, uint32_t length)
{
unsigned int i;
uint32_t i;
for (i=0; i<length-7; i++)
{
if (dsdt[i] == 0x5B && dsdt[i+1] == 0x83) // ProcessorOP
{
unsigned int offset = i + 3 + (dsdt[i+2] >> 6);
uint32_t offset = i + 3 + (dsdt[i+2] >> 6);
bool add_name = TRUE;
char j;
uint8_t j;
for (j=0; j<4; j++)
{
branches/mozodojo/i386/libsaio/spd.c
200200
201201
202202
203
203
204204
205205
206206
207
207
208208
209209
210210
......
224224
225225
226226
227
227
228228
229
229
230230
231231
232232
if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR3) // DDR3
{
sprintf(asciiSerial, "%X%X%X%X%X%X%X%X", SMST(125) & 0x7, SLST(125), SMST(124), SLST(124), SMST(123), SLST(123), SMST(122), SLST(122));
sprintf(asciiSerial, "%X%X%X%X%X%X%X%X", SMST(122) /*& 0x7*/, SLST(122), SMST(123), SLST(123), SMST(124), SLST(124), SMST(125), SLST(125));
}
else if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR2) // DDR2 or DDR
{
sprintf(asciiSerial, "%X%X%X%X%X%X%X%X", SMST(98) & 0x7, SLST(98), SMST(97), SLST(97), SMST(96), SLST(96), SMST(95), SLST(95));
sprintf(asciiSerial, "%X%X%X%X%X%X%X%X", SMST(95) /*& 0x7*/, SLST(95), SMST(96), SLST(96), SMST(97), SLST(97), SMST(98), SLST(98));
}
return strdup(asciiSerial);
}
// Check that the spd part name is zero terminated and that it is ascii:
bzero(asciiPartNo, 32);
bzero(asciiPartNo, sizeof(asciiPartNo));
char c;
for (i=start; i<start+32; i++) {
for (i=start; i < start + sizeof(asciiPartNo); i++) {
READ_SPD(spd, base, slot, i); // only read once the corresponding model part (ddr3 or ddr2)
c = spd[i];
if (isalpha(c) || isdigit(c) || ispunct(c)) // It seems that System Profiler likes only letters and digits...

Archive Download the corresponding diff file

Revision: 222