| 1 |
/* |
| 2 |
* Some or all of this work - Copyright (c) 2006 - 2021, Intel Corp. |
| 3 |
* All rights reserved. |
| 4 |
* |
| 5 |
* Redistribution and use in source and binary forms, with or without modification, |
| 6 |
* are permitted provided that the following conditions are met: |
| 7 |
* |
| 8 |
* Redistributions of source code must retain the above copyright notice, |
| 9 |
* this list of conditions and the following disclaimer. |
| 10 |
* Redistributions in binary form must reproduce the above copyright notice, |
| 11 |
* this list of conditions and the following disclaimer in the documentation |
| 12 |
* and/or other materials provided with the distribution. |
| 13 |
* Neither the name of Intel Corporation nor the names of its contributors |
| 14 |
* may be used to endorse or promote products derived from this software |
| 15 |
* without specific prior written permission. |
| 16 |
* |
| 17 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 18 |
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 19 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 20 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 21 |
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 22 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 23 |
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 25 |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| 26 |
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 |
*/ |
| 28 |
/* |
| 29 |
* Example 0 (from some particular failed table) |
| 30 |
* |
| 31 |
* arg0 - ID of current thread |
| 32 |
* arg1 - Index of current thread |
| 33 |
* arg2 - Integer |
| 34 |
* arg3 - Integer |
| 35 |
* arg4 - Integer |
| 36 |
*/ |
| 37 |
Method (C0A2, 5, Serialized) |
| 38 |
{ |
| 39 |
OperationRegion (C0A3, SystemIO, C0A1 (), 0x07) |
| 40 |
Field (C0A3, ByteAcc, NoLock, Preserve) |
| 41 |
{ |
| 42 |
C0A4, 8, |
| 43 |
C0A5, 8, |
| 44 |
C0A6, 8, |
| 45 |
C0A7, 8, |
| 46 |
C0A8, 8, |
| 47 |
C0A9, 8, |
| 48 |
C0AA, 8 |
| 49 |
} |
| 50 |
|
| 51 |
M310 (Arg0, Arg1, GLLL, GLIX, 0x00, 0x00, 0x00) /* Acquire */ |
| 52 |
Local0 = 0x10 |
| 53 |
While (Local0) |
| 54 |
{ |
| 55 |
Local1 = C0A4 /* \C0A2.C0A4 */ |
| 56 |
M207 (Arg1, 0x64) /* Stall */ |
| 57 |
Local0-- |
| 58 |
} |
| 59 |
|
| 60 |
Local0 = 0x01 |
| 61 |
If (Local0) |
| 62 |
{ |
| 63 |
C0A7 = Arg3 |
| 64 |
C0A8 = Arg2 |
| 65 |
If (((Arg2 & 0x01) == 0x00)) |
| 66 |
{ |
| 67 |
C0A9 = Arg4 |
| 68 |
} |
| 69 |
|
| 70 |
C0A4 = 0xFF |
| 71 |
C0A6 = 0x48 |
| 72 |
Local0 = 0x0B |
| 73 |
While (Local0) |
| 74 |
{ |
| 75 |
Local1 = C0A4 /* \C0A2.C0A4 */ |
| 76 |
M207 (Arg1, 0x64) /* Stall */ |
| 77 |
Local0-- |
| 78 |
} |
| 79 |
|
| 80 |
Local1 = (C0A4 & 0x1C) |
| 81 |
C0A4 = 0xFF |
| 82 |
If (((Local1 == 0x00) && (Arg2 & 0x01))) |
| 83 |
{ |
| 84 |
Local2 = C0A9 /* \C0A2.C0A9 */ |
| 85 |
} |
| 86 |
} |
| 87 |
Else |
| 88 |
{ |
| 89 |
Local1 = 0x01 |
| 90 |
} |
| 91 |
|
| 92 |
M311 (Arg0, Arg1, GLLL, GLIX, 0x00, 0x00) /* Release */ |
| 93 |
Return (Local1) |
| 94 |
} |
| 95 |
|
| 96 |
Method (C0A1, 0, Serialized) |
| 97 |
{ |
| 98 |
Return (0x0100) |
| 99 |
} |
| 100 |
|
| 101 |
/* |
| 102 |
* arg0 - ID of current thread |
| 103 |
* arg1 - Index of current thread |
| 104 |
*/ |
| 105 |
Method (C0AB, 2, NotSerialized) |
| 106 |
{ |
| 107 |
M310 (Arg0, Arg1, GLLL, GLIX, 0x00, 0x00, 0x00) /* Acquire */ |
| 108 |
Local0 = 0x10 |
| 109 |
While (Local0) |
| 110 |
{ |
| 111 |
M207 (Arg1, 0x32) /* Stall */ |
| 112 |
Local0-- |
| 113 |
} |
| 114 |
|
| 115 |
M311 (Arg0, Arg1, GLLL, GLIX, 0x00, 0x00) /* Release */ |
| 116 |
} |