src/add-ons/kernel/bus_managers/acpi/acpica/components/hardware/hwesleep.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiHwExtendedWakePrep
 *
 * PARAMETERS:  SleepState          - Which sleep state we just exited
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Perform first part of OS-independent ACPI cleanup after
 *              a sleep. Called with interrupts ENABLED.
 *
 ******************************************************************************/
AcpiHwExtendedWakePrep
PARAMETERS:  SleepState          - Which sleep state we just exited

Status

Perform first part of OS-independent ACPI cleanup after
a sleep. Called with interrupts ENABLED.
AcpiHwExtendedWakePrep PARAMETERS : SleepState - Which sleep state we just exited Status Perform first part of OS - independent ACPI cleanup after a sleep . Called with interrupts ENABLED .
ACPI_STATUS
AcpiHwExtendedWakePrep (
    UINT8                   SleepState)
{
    ACPI_STATUS             Status;
    UINT8                   SleepTypeValue;
    ACPI_FUNCTION_TRACE (HwExtendedWakePrep);
    Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
        &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
    if (ACPI_SUCCESS (Status))
    {
        SleepTypeValue = ((AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION) &
            ACPI_X_SLEEP_TYPE_MASK);
        (void) AcpiWrite ((UINT64) (SleepTypeValue | ACPI_X_SLEEP_ENABLE),
            &AcpiGbl_FADT.SleepControl);
    }
    return_ACPI_STATUS (AE_OK);
}
ACPI_STATUS AcpiHwExtendedWakePrep ( UINT8 SleepState ) { ACPI_STATUS Status ; UINT8 SleepTypeValue ; ACPI_FUNCTION_TRACE ( HwExtendedWakePrep ) ; Status = AcpiGetSleepTypeData ( ACPI_STATE_S0 , & AcpiGbl_SleepTypeA , & AcpiGbl_SleepTypeB ) ; if ( ACPI_SUCCESS ( Status ) ) { SleepTypeValue = ( ( AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION ) & ACPI_X_SLEEP_TYPE_MASK ) ; ( void ) AcpiWrite ( ( UINT64 ) ( SleepTypeValue | ACPI_X_SLEEP_ENABLE ) , & AcpiGbl_FADT . SleepControl ) ; } return_ACPI_STATUS ( AE_OK ) ; }
FUNCTION:    AcpiHwExtendedWakePrep
 PARAMETERS:  SleepState          - Which sleep state we just exited
FUNCTION : AcpiHwExtendedWakePrep PARAMETERS : SleepState - Which sleep state we just exited