ACPICA: Update for ACPI 5 hardware-reduced feature
Ensure that AcpiEnable and AcpiDisable work properly when the hardware-reduced flag is set in the FADT. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
f1778eb1ab
commit
c39660b232
|
@ -74,6 +74,12 @@ acpi_status acpi_enable(void)
|
||||||
return_ACPI_STATUS(AE_NO_ACPI_TABLES);
|
return_ACPI_STATUS(AE_NO_ACPI_TABLES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If the Hardware Reduced flag is set, machine is always in acpi mode */
|
||||||
|
|
||||||
|
if (acpi_gbl_reduced_hardware) {
|
||||||
|
return_ACPI_STATUS(AE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
/* Check current mode */
|
/* Check current mode */
|
||||||
|
|
||||||
if (acpi_hw_get_mode() == ACPI_SYS_MODE_ACPI) {
|
if (acpi_hw_get_mode() == ACPI_SYS_MODE_ACPI) {
|
||||||
|
@ -126,6 +132,12 @@ acpi_status acpi_disable(void)
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE(acpi_disable);
|
ACPI_FUNCTION_TRACE(acpi_disable);
|
||||||
|
|
||||||
|
/* If the Hardware Reduced flag is set, machine is always in acpi mode */
|
||||||
|
|
||||||
|
if (acpi_gbl_reduced_hardware) {
|
||||||
|
return_ACPI_STATUS(AE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
if (acpi_hw_get_mode() == ACPI_SYS_MODE_LEGACY) {
|
if (acpi_hw_get_mode() == ACPI_SYS_MODE_LEGACY) {
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INIT,
|
ACPI_DEBUG_PRINT((ACPI_DB_INIT,
|
||||||
"System is already in legacy (non-ACPI) mode\n"));
|
"System is already in legacy (non-ACPI) mode\n"));
|
||||||
|
|
|
@ -66,6 +66,12 @@ acpi_status acpi_hw_set_mode(u32 mode)
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE(hw_set_mode);
|
ACPI_FUNCTION_TRACE(hw_set_mode);
|
||||||
|
|
||||||
|
/* If the Hardware Reduced flag is set, machine is always in acpi mode */
|
||||||
|
|
||||||
|
if (acpi_gbl_reduced_hardware) {
|
||||||
|
return_ACPI_STATUS(AE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
|
* ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
|
||||||
* system does not support mode transition.
|
* system does not support mode transition.
|
||||||
|
@ -146,6 +152,12 @@ u32 acpi_hw_get_mode(void)
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE(hw_get_mode);
|
ACPI_FUNCTION_TRACE(hw_get_mode);
|
||||||
|
|
||||||
|
/* If the Hardware Reduced flag is set, machine is always in acpi mode */
|
||||||
|
|
||||||
|
if (acpi_gbl_reduced_hardware) {
|
||||||
|
return_VALUE(ACPI_SYS_MODE_ACPI);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
|
* ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
|
||||||
* system does not support mode transition.
|
* system does not support mode transition.
|
||||||
|
|
Loading…
Reference in New Issue