| 1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 |
|
| 3 |
/* The _PTS method (Prepare To Sleep) is called before the OS is |
| 4 |
* entering a sleep state. The sleep state number is passed in Arg0 |
| 5 |
*/ |
| 6 |
|
| 7 |
Method(_PTS,1) |
| 8 |
{ |
| 9 |
} |
| 10 |
|
| 11 |
/* The _WAK method is called on system wakeup */ |
| 12 |
|
| 13 |
Method(_WAK,1) |
| 14 |
{ |
| 15 |
/* Not implemented. */ |
| 16 |
Return(Package(){0,0}) |
| 17 |
} |
| 18 |
|
| 19 |
/* System Bus */ |
| 20 |
|
| 21 |
Scope(\_SB) |
| 22 |
{ |
| 23 |
/* This method is placed on the top level, so we can make sure it's the |
| 24 |
* first executed _INI method. |
| 25 |
*/ |
| 26 |
Method(_INI, 0) |
| 27 |
{ |
| 28 |
/* Determine the Operating System and save the value in OSYS. |
| 29 |
* We have to do this in order to be able to work around |
| 30 |
* certain windows bugs. |
| 31 |
* |
| 32 |
* OSYS value | Operating System |
| 33 |
* -----------+------------------ |
| 34 |
* 2000 | Windows 2000 |
| 35 |
* 2001 | Windows XP(+SP1) |
| 36 |
* 2002 | Windows XP SP2 |
| 37 |
* 2006 | Windows Vista |
| 38 |
* ???? | Windows 7 |
| 39 |
*/ |
| 40 |
|
| 41 |
/* Let's assume we're running at least Windows 2000 */ |
| 42 |
OSYS = 2000 |
| 43 |
|
| 44 |
If (CondRefOf(_OSI)) { |
| 45 |
If (_OSI("Windows 2001")) { |
| 46 |
OSYS = 2001 |
| 47 |
} |
| 48 |
|
| 49 |
If (_OSI("Windows 2001 SP1")) { |
| 50 |
OSYS = 2001 |
| 51 |
} |
| 52 |
|
| 53 |
If (_OSI("Windows 2001 SP2")) { |
| 54 |
OSYS = 2002 |
| 55 |
} |
| 56 |
|
| 57 |
If (_OSI("Windows 2001.1")) { |
| 58 |
OSYS = 2001 |
| 59 |
} |
| 60 |
|
| 61 |
If (_OSI("Windows 2001.1 SP1")) { |
| 62 |
OSYS = 2001 |
| 63 |
} |
| 64 |
|
| 65 |
If (_OSI("Windows 2006")) { |
| 66 |
OSYS = 2006 |
| 67 |
} |
| 68 |
|
| 69 |
If (_OSI("Windows 2006.1")) { |
| 70 |
OSYS = 2006 |
| 71 |
} |
| 72 |
|
| 73 |
If (_OSI("Windows 2006 SP1")) { |
| 74 |
OSYS = 2006 |
| 75 |
} |
| 76 |
|
| 77 |
If (_OSI("Windows 2009")) { |
| 78 |
OSYS = 2009 |
| 79 |
} |
| 80 |
|
| 81 |
If (_OSI("Windows 2012")) { |
| 82 |
OSYS = 2012 |
| 83 |
} |
| 84 |
} |
| 85 |
} |
| 86 |
} |