Hannah Williams | 4cff1d5 | 2016-06-08 14:29:47 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007-2009 coresystems GmbH |
| 5 | * Copyright (C) 2012 Google Inc. |
| 6 | * Copyright (C) 2016 Intel Corp |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; version 2 of the License. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | */ |
| 17 | |
| 18 | #include <include/console/post_codes.h> |
| 19 | |
| 20 | /* Port 80 POST */ |
| 21 | |
| 22 | OperationRegion (POST, SystemIO, CONFIG_POST_IO_PORT, 1) |
| 23 | Field (POST, ByteAcc, Lock, Preserve) |
| 24 | { |
| 25 | DBG0, 8 |
| 26 | } |
| 27 | |
| 28 | /* |
| 29 | * The _PTS method (Prepare To Sleep) is called before the OS is |
| 30 | * entering a sleep state. The sleep state number is passed in Arg0 |
| 31 | */ |
| 32 | |
| 33 | Method (_PTS, 1) |
| 34 | { |
| 35 | Store (POST_OS_ENTER_PTS, DBG0) |
Duncan Laurie | 0dd9135 | 2018-11-05 16:27:33 -0700 | [diff] [blame] | 36 | |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 37 | #if CONFIG(SOC_INTEL_COMMON_ACPI_EC_PTS_WAK) |
Duncan Laurie | 0dd9135 | 2018-11-05 16:27:33 -0700 | [diff] [blame] | 38 | /* Call EC _PTS handler */ |
| 39 | \_SB.PCI0.LPCB.EC0.PTS (Arg0) |
| 40 | #endif |
Hannah Williams | 4cff1d5 | 2016-06-08 14:29:47 -0700 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | /* The _WAK method is called on system wakeup */ |
| 44 | |
| 45 | Method (_WAK, 1) |
| 46 | { |
| 47 | Store (POST_OS_ENTER_WAKE, DBG0) |
Duncan Laurie | 0dd9135 | 2018-11-05 16:27:33 -0700 | [diff] [blame] | 48 | |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 49 | #if CONFIG(SOC_INTEL_COMMON_ACPI_EC_PTS_WAK) |
Duncan Laurie | 0dd9135 | 2018-11-05 16:27:33 -0700 | [diff] [blame] | 50 | /* Call EC _WAK handler */ |
| 51 | \_SB.PCI0.LPCB.EC0.WAK (Arg0) |
| 52 | #endif |
| 53 | |
Hannah Williams | 4cff1d5 | 2016-06-08 14:29:47 -0700 | [diff] [blame] | 54 | Return (Package(){0,0}) |
| 55 | } |