␉␉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;␊ |