diff options
author | jkim <jkim@FreeBSD.org> | 2012-03-20 21:37:52 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2012-03-20 21:37:52 +0000 |
commit | 9807567995352b475fd7e23ea58b7512a20e7bd3 (patch) | |
tree | 2a460dab9bb8e6fffc77dcd3749cddbe16ec0ab6 /sys/contrib/dev/acpica/components/hardware | |
parent | 107d21a0f4a0fa5f29290cca23e94c24fe945998 (diff) | |
parent | f65c4f80d1c60e597f67836e51986ebf3cd669f7 (diff) | |
download | FreeBSD-src-9807567995352b475fd7e23ea58b7512a20e7bd3.zip FreeBSD-src-9807567995352b475fd7e23ea58b7512a20e7bd3.tar.gz |
Merge ACPICA 20120320.
Diffstat (limited to 'sys/contrib/dev/acpica/components/hardware')
-rw-r--r-- | sys/contrib/dev/acpica/components/hardware/hwesleep.c | 40 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/components/hardware/hwsleep.c | 32 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/components/hardware/hwxfsleep.c | 28 |
3 files changed, 66 insertions, 34 deletions
diff --git a/sys/contrib/dev/acpica/components/hardware/hwesleep.c b/sys/contrib/dev/acpica/components/hardware/hwesleep.c index 8133e85..1bf50a0 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwesleep.c +++ b/sys/contrib/dev/acpica/components/hardware/hwesleep.c @@ -53,7 +53,7 @@ * * FUNCTION: AcpiHwExecuteSleepMethod * - * PARAMETERS: MethodName - Pathname of method to execute + * PARAMETERS: MethodPathname - Pathname of method to execute * IntegerArgument - Argument to pass to the method * * RETURN: None @@ -65,7 +65,7 @@ void AcpiHwExecuteSleepMethod ( - char *MethodName, + char *MethodPathname, UINT32 IntegerArgument) { ACPI_OBJECT_LIST ArgList; @@ -83,11 +83,11 @@ AcpiHwExecuteSleepMethod ( Arg.Type = ACPI_TYPE_INTEGER; Arg.Integer.Value = (UINT64) IntegerArgument; - Status = AcpiEvaluateObject (NULL, MethodName, &ArgList, NULL); + Status = AcpiEvaluateObject (NULL, MethodPathname, &ArgList, NULL); if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND) { ACPI_EXCEPTION ((AE_INFO, Status, "While executing method %s", - MethodName)); + MethodPathname)); } return_VOID; @@ -99,6 +99,7 @@ AcpiHwExecuteSleepMethod ( * FUNCTION: AcpiHwExtendedSleep * * PARAMETERS: SleepState - Which sleep state to enter + * Flags - ACPI_EXECUTE_GTS to run optional method * * RETURN: Status * @@ -110,7 +111,8 @@ AcpiHwExecuteSleepMethod ( ACPI_STATUS AcpiHwExtendedSleep ( - UINT8 SleepState) + UINT8 SleepState, + UINT8 Flags) { ACPI_STATUS Status; UINT8 SleepTypeValue; @@ -138,9 +140,12 @@ AcpiHwExtendedSleep ( AcpiGbl_SystemAwakeAndRunning = FALSE; - /* Execute the _GTS method (Going To Sleep) */ + /* Optionally execute _GTS (Going To Sleep) */ - AcpiHwExecuteSleepMethod (METHOD_NAME__GTS, SleepState); + if (Flags & ACPI_EXECUTE_GTS) + { + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__GTS, SleepState); + } /* Flush caches, as per ACPI specification */ @@ -186,6 +191,7 @@ AcpiHwExtendedSleep ( * FUNCTION: AcpiHwExtendedWakePrep * * PARAMETERS: SleepState - Which sleep state we just exited + * Flags - ACPI_EXECUTE_BFS to run optional method * * RETURN: Status * @@ -196,7 +202,8 @@ AcpiHwExtendedSleep ( ACPI_STATUS AcpiHwExtendedWakePrep ( - UINT8 SleepState) + UINT8 SleepState, + UINT8 Flags) { ACPI_STATUS Status; UINT8 SleepTypeValue; @@ -216,7 +223,12 @@ AcpiHwExtendedWakePrep ( &AcpiGbl_FADT.SleepControl); } - AcpiHwExecuteSleepMethod (METHOD_NAME__BFS, SleepState); + /* Optionally execute _BFS (Back From Sleep) */ + + if (Flags & ACPI_EXECUTE_BFS) + { + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__BFS, SleepState); + } return_ACPI_STATUS (AE_OK); } @@ -226,6 +238,7 @@ AcpiHwExtendedWakePrep ( * FUNCTION: AcpiHwExtendedWake * * PARAMETERS: SleepState - Which sleep state we just exited + * Flags - Reserved, set to zero * * RETURN: Status * @@ -236,7 +249,8 @@ AcpiHwExtendedWakePrep ( ACPI_STATUS AcpiHwExtendedWake ( - UINT8 SleepState) + UINT8 SleepState, + UINT8 Flags) { ACPI_FUNCTION_TRACE (HwExtendedWake); @@ -247,8 +261,8 @@ AcpiHwExtendedWake ( /* Execute the wake methods */ - AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WAKING); - AcpiHwExecuteSleepMethod (METHOD_NAME__WAK, SleepState); + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WAKING); + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__WAK, SleepState); /* * Some BIOS code assumes that WAK_STS will be cleared on resume @@ -258,6 +272,6 @@ AcpiHwExtendedWake ( (void) AcpiWrite (ACPI_X_WAKE_STATUS, &AcpiGbl_FADT.SleepStatus); AcpiGbl_SystemAwakeAndRunning = TRUE; - AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WORKING); + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING); return_ACPI_STATUS (AE_OK); } diff --git a/sys/contrib/dev/acpica/components/hardware/hwsleep.c b/sys/contrib/dev/acpica/components/hardware/hwsleep.c index cb8eb66..f5a9eba 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwsleep.c +++ b/sys/contrib/dev/acpica/components/hardware/hwsleep.c @@ -55,6 +55,7 @@ * FUNCTION: AcpiHwLegacySleep * * PARAMETERS: SleepState - Which sleep state to enter + * Flags - ACPI_EXECUTE_GTS to run optional method * * RETURN: Status * @@ -65,7 +66,8 @@ ACPI_STATUS AcpiHwLegacySleep ( - UINT8 SleepState) + UINT8 SleepState, + UINT8 Flags) { ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo; ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo; @@ -129,9 +131,12 @@ AcpiHwLegacySleep ( return_ACPI_STATUS (Status); } - /* Execute the _GTS method (Going To Sleep) */ + /* Optionally execute _GTS (Going To Sleep) */ - AcpiHwExecuteSleepMethod (METHOD_NAME__GTS, SleepState); + if (Flags & ACPI_EXECUTE_GTS) + { + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__GTS, SleepState); + } /* Get current value of PM1A control */ @@ -242,6 +247,7 @@ AcpiHwLegacySleep ( * FUNCTION: AcpiHwLegacyWakePrep * * PARAMETERS: SleepState - Which sleep state we just exited + * Flags - ACPI_EXECUTE_BFS to run optional method * * RETURN: Status * @@ -253,7 +259,8 @@ AcpiHwLegacySleep ( ACPI_STATUS AcpiHwLegacyWakePrep ( - UINT8 SleepState) + UINT8 SleepState, + UINT8 Flags) { ACPI_STATUS Status; ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo; @@ -303,7 +310,12 @@ AcpiHwLegacyWakePrep ( } } - AcpiHwExecuteSleepMethod (METHOD_NAME__BFS, SleepState); + /* Optionally execute _BFS (Back From Sleep) */ + + if (Flags & ACPI_EXECUTE_BFS) + { + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__BFS, SleepState); + } return_ACPI_STATUS (Status); } @@ -313,6 +325,7 @@ AcpiHwLegacyWakePrep ( * FUNCTION: AcpiHwLegacyWake * * PARAMETERS: SleepState - Which sleep state we just exited + * Flags - Reserved, set to zero * * RETURN: Status * @@ -323,7 +336,8 @@ AcpiHwLegacyWakePrep ( ACPI_STATUS AcpiHwLegacyWake ( - UINT8 SleepState) + UINT8 SleepState, + UINT8 Flags) { ACPI_STATUS Status; @@ -334,7 +348,7 @@ AcpiHwLegacyWake ( /* Ensure EnterSleepStatePrep -> EnterSleepState ordering */ AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID; - AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WAKING); + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WAKING); /* * GPEs must be enabled before _WAK is called as GPEs @@ -360,7 +374,7 @@ AcpiHwLegacyWake ( * Now we can execute _WAK, etc. Some machines require that the GPEs * are enabled before the wake methods are executed. */ - AcpiHwExecuteSleepMethod (METHOD_NAME__WAK, SleepState); + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__WAK, SleepState); /* * Some BIOS code assumes that WAK_STS will be cleared on resume @@ -391,7 +405,7 @@ AcpiHwLegacyWake ( return_ACPI_STATUS (Status); } - AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WORKING); + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING); return_ACPI_STATUS (Status); } diff --git a/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c b/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c index 7adee69..fa6fec8 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c +++ b/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c @@ -52,6 +52,7 @@ static ACPI_STATUS AcpiHwSleepDispatch ( UINT8 SleepState, + UINT8 Flags, UINT32 FunctionId); /* @@ -252,6 +253,7 @@ ACPI_EXPORT_SYMBOL (AcpiEnterSleepStateS4bios) static ACPI_STATUS AcpiHwSleepDispatch ( UINT8 SleepState, + UINT8 Flags, UINT32 FunctionId) { ACPI_STATUS Status; @@ -267,13 +269,13 @@ AcpiHwSleepDispatch ( if (AcpiGbl_ReducedHardware || AcpiGbl_FADT.SleepControl.Address) { - Status = SleepFunctions->ExtendedFunction (SleepState); + Status = SleepFunctions->ExtendedFunction (SleepState, Flags); } else { /* Legacy sleep */ - Status = SleepFunctions->LegacyFunction (SleepState); + Status = SleepFunctions->LegacyFunction (SleepState, Flags); } return (Status); @@ -283,7 +285,7 @@ AcpiHwSleepDispatch ( * For the case where reduced-hardware-only code is being generated, * we know that only the extended sleep registers are available */ - Status = SleepFunctions->ExtendedFunction (SleepState); + Status = SleepFunctions->ExtendedFunction (SleepState, Flags); return (Status); #endif /* !ACPI_REDUCED_HARDWARE */ @@ -318,8 +320,6 @@ AcpiEnterSleepStatePrep ( ACPI_FUNCTION_TRACE (AcpiEnterSleepStatePrep); - /* _PSW methods could be run here to enable wake-on keyboard, LAN, etc. */ - Status = AcpiGetSleepTypeData (SleepState, &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB); if (ACPI_FAILURE (Status)) @@ -334,7 +334,7 @@ AcpiEnterSleepStatePrep ( Arg.Type = ACPI_TYPE_INTEGER; Arg.Integer.Value = SleepState; - Status = AcpiEvaluateObject (NULL, METHOD_NAME__PTS, &ArgList, NULL); + Status = AcpiEvaluateObject (NULL, METHOD_PATHNAME__PTS, &ArgList, NULL); if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND) { return_ACPI_STATUS (Status); @@ -367,7 +367,7 @@ AcpiEnterSleepStatePrep ( * Set the system indicators to show the desired sleep state. * _SST is an optional method (return no error if not found) */ - AcpiHwExecuteSleepMethod (METHOD_NAME__SST, SstValue); + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, SstValue); return_ACPI_STATUS (AE_OK); } @@ -379,6 +379,7 @@ ACPI_EXPORT_SYMBOL (AcpiEnterSleepStatePrep) * FUNCTION: AcpiEnterSleepState * * PARAMETERS: SleepState - Which sleep state to enter + * Flags - ACPI_EXECUTE_GTS to run optional method * * RETURN: Status * @@ -389,7 +390,8 @@ ACPI_EXPORT_SYMBOL (AcpiEnterSleepStatePrep) ACPI_STATUS AcpiEnterSleepState ( - UINT8 SleepState) + UINT8 SleepState, + UINT8 Flags) { ACPI_STATUS Status; @@ -405,7 +407,7 @@ AcpiEnterSleepState ( return_ACPI_STATUS (AE_AML_OPERAND_VALUE); } - Status = AcpiHwSleepDispatch (SleepState, ACPI_SLEEP_FUNCTION_ID); + Status = AcpiHwSleepDispatch (SleepState, Flags, ACPI_SLEEP_FUNCTION_ID); return_ACPI_STATUS (Status); } @@ -417,6 +419,7 @@ ACPI_EXPORT_SYMBOL (AcpiEnterSleepState) * FUNCTION: AcpiLeaveSleepStatePrep * * PARAMETERS: SleepState - Which sleep state we are exiting + * Flags - ACPI_EXECUTE_BFS to run optional method * * RETURN: Status * @@ -429,7 +432,8 @@ ACPI_EXPORT_SYMBOL (AcpiEnterSleepState) ACPI_STATUS AcpiLeaveSleepStatePrep ( - UINT8 SleepState) + UINT8 SleepState, + UINT8 Flags) { ACPI_STATUS Status; @@ -437,7 +441,7 @@ AcpiLeaveSleepStatePrep ( ACPI_FUNCTION_TRACE (AcpiLeaveSleepStatePrep); - Status = AcpiHwSleepDispatch (SleepState, ACPI_WAKE_PREP_FUNCTION_ID); + Status = AcpiHwSleepDispatch (SleepState, Flags, ACPI_WAKE_PREP_FUNCTION_ID); return_ACPI_STATUS (Status); } @@ -467,7 +471,7 @@ AcpiLeaveSleepState ( ACPI_FUNCTION_TRACE (AcpiLeaveSleepState); - Status = AcpiHwSleepDispatch (SleepState, ACPI_WAKE_FUNCTION_ID); + Status = AcpiHwSleepDispatch (SleepState, 0, ACPI_WAKE_FUNCTION_ID); return_ACPI_STATUS (Status); } |