--- a/drivers/acpi/hardware/hwsleep.c 2005-06-07 13:45:04.088273424 +0800 +++ b/drivers/acpi/hardware/hwsleep.c 2005-06-07 13:49:31.858566152 +0800 @@ -242,6 +242,19 @@ acpi_enter_sleep_state_prep ( * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED * ******************************************************************************/ +#define S3_DEBUG +#ifdef S3_DEBUG +#include +extern void machine_real_restart(unsigned char *code, int length); +static unsigned char jump_to_pm [] = +{ + 0xea, + 0x00, + 0x00, + 0x00, + 0x00 /* ljmp $0x0000,$0x0000 */ +}; +#endif acpi_status asmlinkage acpi_enter_sleep_state ( @@ -315,6 +328,14 @@ acpi_enter_sleep_state ( PM1Acontrol |= (acpi_gbl_sleep_type_a << sleep_type_reg_info->bit_position); PM1Bcontrol |= (acpi_gbl_sleep_type_b << sleep_type_reg_info->bit_position); +#ifdef S3_DEBUG + if (sleep_state == ACPI_STATE_S3) { + *((short *)&jump_to_pm[3]) = + (short)(virt_to_phys((void *)acpi_wakeup_address)) >> 4; + /* Directly jump to acpi_wakeup_address */ + machine_real_restart(jump_to_pm, sizeof(jump_to_pm)); + } +#endif /* * We split the writes of SLP_TYP and SLP_EN to workaround * poorly implemented hardware.