Chameleon

Chameleon Commit Details

Date:2010-11-13 07:00:41 (13 years 5 months ago)
Author:Evan Lojewski
Commit:632
Parents: 631
Message:Modify ACPI patcher to save orig dsdt
Changes:
M/branches/meklort/i386/modules/ACPIPatcher/acpi_patcher.c

File differences

branches/meklort/i386/modules/ACPIPatcher/acpi_patcher.c
669669
670670
671671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
672691
673692
674693
{
DBG("DSDT: Old @%x,%x, ",fadt_mod->DSDT,fadt_mod->X_DSDT);
// Insert old dsdt into the IORegistery
Node* node = DT__FindNode("/dsdt", false);
if(node == NULL)
{
// Only add if not already here
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);/// Insert old dsdt. Length is header length (36) + dsdt length
}
}
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;

Archive Download the corresponding diff file

Revision: 632