Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007-2009 coresystems GmbH |
| 5 | * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 15 | */ |
| 16 | |
Kyösti Mälkki | 390ba04 | 2017-08-07 21:42:46 +0300 | [diff] [blame] | 17 | /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */ |
| 18 | #if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME) |
| 19 | Name (SSFG, 0x0D) |
| 20 | #else |
| 21 | Name (SSFG, 0x09) |
| 22 | #endif |
| 23 | |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 24 | /* Supported sleep states: */ |
| 25 | Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */ |
| 26 | |
Kyösti Mälkki | 390ba04 | 2017-08-07 21:42:46 +0300 | [diff] [blame] | 27 | If (And(SSFG, 0x01)) { |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 28 | Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */ |
| 29 | } |
Kyösti Mälkki | 390ba04 | 2017-08-07 21:42:46 +0300 | [diff] [blame] | 30 | If (And(SSFG, 0x02)) { |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 31 | Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */ |
| 32 | } |
Kyösti Mälkki | 390ba04 | 2017-08-07 21:42:46 +0300 | [diff] [blame] | 33 | If (And(SSFG, 0x04)) { |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 34 | Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */ |
| 35 | } |
Kyösti Mälkki | 390ba04 | 2017-08-07 21:42:46 +0300 | [diff] [blame] | 36 | If (And(SSFG, 0x08)) { |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 37 | Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */ |
| 38 | } |
| 39 | |
| 40 | Name(\_S5, Package () {0x05, 0x05, 0x00, 0x00} ) /* (S5) - Soft Off */ |