diff options
Diffstat (limited to 'source/components/hardware')
| -rw-r--r-- | source/components/hardware/hwregs.c | 11 | ||||
| -rw-r--r-- | source/components/hardware/hwsleep.c | 19 |
2 files changed, 24 insertions, 6 deletions
diff --git a/source/components/hardware/hwregs.c b/source/components/hardware/hwregs.c index c0deed339797..ec106847ba3a 100644 --- a/source/components/hardware/hwregs.c +++ b/source/components/hardware/hwregs.c @@ -724,13 +724,20 @@ AcpiHwRegisterRead ( case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ Status = AcpiHwRead (&Value64, &AcpiGbl_FADT.XPm2ControlBlock); - Value = (UINT32) Value64; + if (ACPI_SUCCESS (Status)) + { + Value = (UINT32) Value64; + } break; case ACPI_REGISTER_PM_TIMER: /* 32-bit access */ Status = AcpiHwRead (&Value64, &AcpiGbl_FADT.XPmTimerBlock); - Value = (UINT32) Value64; + if (ACPI_SUCCESS (Status)) + { + Value = (UINT32) Value64; + } + break; case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */ diff --git a/source/components/hardware/hwsleep.c b/source/components/hardware/hwsleep.c index fe111872cec0..7e435acecba0 100644 --- a/source/components/hardware/hwsleep.c +++ b/source/components/hardware/hwsleep.c @@ -198,17 +198,28 @@ AcpiHwLegacySleep ( return_ACPI_STATUS (Status); } - /* - * 1) Disable all GPEs - * 2) Enable all wakeup GPEs - */ + /* Disable all GPEs */ + Status = AcpiHwDisableAllGpes (); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } + /* + * If the target sleep state is S5, clear all GPEs and fixed events too + */ + if (SleepState == ACPI_STATE_S5) + { + Status = AcpiHwClearAcpiStatus(); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + } AcpiGbl_SystemAwakeAndRunning = FALSE; + /* Enable all wakeup GPEs */ + Status = AcpiHwEnableAllWakeupGpes (); if (ACPI_FAILURE (Status)) { |
