Index: branches/meklort/CHANGES =================================================================== --- branches/meklort/CHANGES (revision 148) +++ branches/meklort/CHANGES (revision 149) @@ -1,3 +1,7 @@ +- 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 Index: branches/meklort/i386/libsaio/dsdt_patcher.c =================================================================== --- branches/meklort/i386/libsaio/dsdt_patcher.c (revision 148) +++ branches/meklort/i386/libsaio/dsdt_patcher.c (revision 149) @@ -252,9 +252,23 @@ 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; Index: branches/meklort/i386/libsaio/acpi.h =================================================================== --- branches/meklort/i386/libsaio/acpi.h (revision 148) +++ branches/meklort/i386/libsaio/acpi.h (revision 149) @@ -93,4 +93,18 @@ uint8_t notimp2[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]; + char dsdtStart; // actual length is .Length +} __attribute__((packed)); + + #endif /* !__LIBSAIO_ACPI_H */