/* If the Hardware Reduced flag is set, machine is always in acpi mode */
if (acpi_gbl_reduced_hardware) {
return_ACPI_STATUS(AE_OK);
}
/* *ACPI2.0clarifiedthatifSMI_CMDinFADTiszero, *systemdoesnotsupportmodetransition.
*/ if (!acpi_gbl_FADT.smi_command) {
ACPI_ERROR((AE_INFO, "No SMI_CMD in FADT, mode transition failed"));
return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);
}
/* *ACPI2.0clarifiedthemeaningofACPI_ENABLEandACPI_DISABLE *inFADT:Ifitiszero,enablingordisablingisnotsupported. *Asoldsystemsmayhaveusedzeroformodetransition, *wemakesureboththenumbersarezerotodeterminethese *transitionsarenotsupported.
*/ if (!acpi_gbl_FADT.acpi_enable && !acpi_gbl_FADT.acpi_disable) {
ACPI_ERROR((AE_INFO, "No ACPI mode transition supported in this system " "(enable/disable both zero)"));
return_ACPI_STATUS(AE_OK);
}
switch (mode) { case ACPI_SYS_MODE_ACPI:
/* BIOS should have disabled ALL fixed and GP events */
status = acpi_hw_write_port(acpi_gbl_FADT.smi_command,
(u32) acpi_gbl_FADT.acpi_enable, 8);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Attempting to enable ACPI mode\n")); break;
case ACPI_SYS_MODE_LEGACY: /* *BIOSshouldclearallfixedstatusbitsandrestorefixedevent *enablebitstodefault
*/
status = acpi_hw_write_port(acpi_gbl_FADT.smi_command,
(u32)acpi_gbl_FADT.acpi_disable, 8);
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Attempting to enable Legacy (non-ACPI) mode\n")); break;
default:
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status, "Could not write ACPI mode change"));
return_ACPI_STATUS(status);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.