Chameleon

Chameleon Commit Details

Date:2010-05-10 01:47:10 (13 years 11 months ago)
Author:Evan Lojewski
Commit:149
Parents: 148
Message:DSDT patcher backs up old dsdt to the IORegistery
Changes:
M/branches/meklort/i386/libsaio/dsdt_patcher.c
M/branches/meklort/CHANGES
M/branches/meklort/i386/libsaio/acpi.h

File differences

branches/meklort/CHANGES
1
2
3
4
15
26
37
- Backup original dsdt to /dsdt/originaldsdt in the IORegistery
- Added kernel patcher, removes the CPUID check panic in the kernel. Forces _cpuid_set_info to
return Penryn / cpuid model 23
- Implemented SPD memory automatic detection and injection,seems to work really great ...
- Factorized code to prepare a dynamic memory detection algorithm ...
- Optimized smbios table address search
branches/meklort/i386/libsaio/dsdt_patcher.c
252252
253253
254254
255
256
257
258
259
260
261
262
263
264
265
266
267
255268
256269
257270
271
258272
259273
260274
verbose("FADT: Restart Fix applied !\n");
}
// Save old DSDT to the IORegistery
Node* node = DT__FindNode("/", false);
if(node != NULL)
{
node = DT__AddChild(node, "dsdt");
struct acpi_2_dsdt *dsdt;
dsdt = (struct acpi_2_dsdt*) (fadt_mod->DSDT);
DT__AddProperty(node, "originaldsdt", (dsdt->Length + sizeof(struct acpi_2_dsdt) - 1), (void*)dsdt);/// Inset old dsdt. Length is header length (36) + dsdt length
}
// Patch DSDT Address
DBG("DSDT: Old @%x,%x, ",fadt_mod->DSDT,fadt_mod->X_DSDT);
fadt_mod->DSDT=(uint32_t)new_dsdt;
if ((uint32_t)(&(fadt_mod->X_DSDT))-(uint32_t)fadt_mod+8<=fadt_mod->Length)
fadt_mod->X_DSDT=(uint32_t)new_dsdt;
branches/meklort/i386/libsaio/acpi.h
9393
9494
9595
96
97
98
99
100
101
102
103
104
105
106
107
108
109
96110
uint8_tnotimp2[96];
} __attribute__((packed));
struct acpi_2_dsdt {
char Signature[4];
uint32_t Length;
uint8_t Revision;
uint8_t Checksum;
char OEMID[6];
char OEMTableId[8];
char OEMRevision[4];
char CreatorId[4];
char CreatorRevision[4];
chardsdtStart;// actual length is .Length
} __attribute__((packed));
#endif /* !__LIBSAIO_ACPI_H */

Archive Download the corresponding diff file

Revision: 149