blob: 947a2f2d43683bd195d996017f43d2146ff209e6 [file] [log] [blame]
Alexandru Gagniucfccfee32014-03-26 18:51:08 -05001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2013 Sage Electronic Engineering, LLC
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Alexandru Gagniucfccfee32014-03-26 18:51:08 -050014 */
15
16/* Wake status package */
17Name(WKST,Package(){Zero, Zero})
18
19/*
20* \_PTS - Prepare to Sleep method
21*
22* Entry:
23* Arg0=The value of the sleeping state S1=1, S2=2, etc
24*
25* Exit:
26* -none-
27*
28* The _PTS control method is executed at the beginning of the sleep process
Marshall Dawsona8025db2016-12-16 13:17:34 -050029* for S1-S5. The sleeping value is passed to the _PTS control method. This
Alexandru Gagniucfccfee32014-03-26 18:51:08 -050030* control method may be executed a relatively long time before entering the
Marshall Dawsona8025db2016-12-16 13:17:34 -050031* sleep state and the OS may abort the operation without notification to
Alexandru Gagniucfccfee32014-03-26 18:51:08 -050032* the ACPI driver. This method cannot modify the configuration or power
33* state of any device in the system.
34*/
35Method(\_PTS, 1) {
36 /* DBGO("\\_PTS\n") */
37 /* DBGO("From S0 to S") */
38 /* DBGO(Arg0) */
39 /* DBGO("\n") */
40
41 /* Clear sleep SMI status flag and enable sleep SMI trap. */
42 /*Store(One, CSSM)
43 Store(One, SSEN)*/
44
45 /* On older chips, clear PciExpWakeDisEn */
46 /*if (LLessEqual(\_SB.SBRI, 0x13)) {
47 * Store(0,\_SB.PWDE)
48 *}
49 */
50
51 /* Clear wake status structure. */
52 Store(0, Index(WKST,0))
53 Store(0, Index(WKST,1))
54
55 Store (0x07, UPWS)
56} /* End Method(\_PTS) */
57
58/*
59* \_BFS OEM Back From Sleep method
60*
61* Entry:
62* Arg0=The value of the sleeping state S1=1, S2=2
63*
64* Exit:
65* -none-
66*/
67Method(\_BFS, 1) {
68 /* DBGO("\\_BFS\n") */
69 /* DBGO("From S") */
70 /* DBGO(Arg0) */
71 /* DBGO(" to S0\n") */
72}
73
74/*
75* \_WAK System Wake method
76*
77* Entry:
78* Arg0=The value of the sleeping state S1=1, S2=2
79*
80* Exit:
81* Return package of 2 DWords
82* Dword 1 - Status
83* 0x00000000 wake succeeded
84* 0x00000001 Wake was signaled but failed due to lack of power
85* 0x00000002 Wake was signaled but failed due to thermal condition
86* Dword 2 - Power Supply state
87* if non-zero the effective S-state the power supply entered
88*/
89Method(\_WAK, 1) {
90 /* DBGO("\\_WAK\n") */
91 /* DBGO("From S") */
92 /* DBGO(Arg0) */
93 /* DBGO(" to S0\n") */
94
95 /* Re-enable HPET */
96 Store(1,USBS)
97
98 Return(WKST)
99} /* End Method(\_WAK) */