| 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 |
// Resource Descriptor macros |
| 30 |
|
| 31 |
// For each Resource Descriptor Macro declaration |
| 32 |
// below Error/Warning is expected. |
| 33 |
|
| 34 |
// The same descriptor names, DN00, in the same scope |
| 35 |
Method(m400) |
| 36 |
{ |
| 37 |
Name(RT00, |
| 38 |
ResourceTemplate () { |
| 39 |
IRQ (Edge, ActiveLow, Shared, DN00) {} |
| 40 |
IRQ (Edge, ActiveLow, Shared, DN00) {} |
| 41 |
}) |
| 42 |
Name(RT01, |
| 43 |
ResourceTemplate () { |
| 44 |
DMA (Compatibility, NotBusMaster, Transfer8, DN00) {} |
| 45 |
DMA (Compatibility, NotBusMaster, Transfer8, DN00) {} |
| 46 |
}) |
| 47 |
Name(RT02, |
| 48 |
ResourceTemplate () { |
| 49 |
IO (Decode16, 0xf0f1, 0xf2f3, 0xf4, 0xf5, DN00) |
| 50 |
IO (Decode16, 0xf0f1, 0xf2f3, 0xf4, 0xf5, DN00) |
| 51 |
}) |
| 52 |
Name(RT03, |
| 53 |
ResourceTemplate () { |
| 54 |
Memory24 ( , 0x0000, 0xffff, 0x0001, 0xfffe, DN00) |
| 55 |
Memory24 ( , 0x0000, 0xffff, 0x0001, 0xfffe, DN00) |
| 56 |
}) |
| 57 |
Name(RT04, |
| 58 |
ResourceTemplate () { |
| 59 |
IO (Decode16, 0xf0f1, 0xf2f3, 0xf4, 0xf5, DN00) |
| 60 |
IO (Decode16, 0xf0f1, 0xf2f3, 0xf4, 0xf5, DN00) |
| 61 |
}) |
| 62 |
} |
| 63 |
|
| 64 |
Method(m401) |
| 65 |
{ |
| 66 |
Name(RT00, |
| 67 |
ResourceTemplate () { |
| 68 |
DMA (Compatibility, NotBusMaster, Transfer8) {8} |
| 69 |
}) |
| 70 |
Name(RT01, |
| 71 |
ResourceTemplate () { |
| 72 |
DMA (TypeA, NotBusMaster, Transfer8) {0, 0} |
| 73 |
}) |
| 74 |
} |
| 75 |
|
| 76 |
Method(m402) |
| 77 |
{ |
| 78 |
Name(RT00, |
| 79 |
ResourceTemplate () { |
| 80 |
DWordIO ( , , , , , |
| 81 |
0xecedeeef, 0xf0f1f2f3, 0xf4f5f6f7, 0xf8f9fafb, 0xfcfdfeff, 0x0f) |
| 82 |
}) |
| 83 |
Name(RT01, |
| 84 |
ResourceTemplate () { |
| 85 |
DWordIO ( , , , , , |
| 86 |
0xecedeeef, 0xf0f1f2f3, 0xf4f5f6f7, 0xf8f9fafb, 0xfcfdfeff,, "PATHPATHPATH") |
| 87 |
}) |
| 88 |
} |
| 89 |
|
| 90 |
Method(m403) |
| 91 |
{ |
| 92 |
Name(RT00, |
| 93 |
ResourceTemplate () { |
| 94 |
DWordMemory ( , , , , , , |
| 95 |
0xecedeeef, 0xf0f1f2f3, 0xf4f5f6f7, 0xf8f9fafb, 0xfcfdfeff, 0x0f) |
| 96 |
}) |
| 97 |
Name(RT01, |
| 98 |
ResourceTemplate () { |
| 99 |
DWordMemory ( , , , , , , |
| 100 |
0xecedeeef, 0xf0f1f2f3, 0xf4f5f6f7, 0xf8f9fafb, 0xfcfdfeff,, "PATHPATHPATH") |
| 101 |
}) |
| 102 |
} |
| 103 |
|
| 104 |
Method(m404) |
| 105 |
{ |
| 106 |
Name(RT00, |
| 107 |
ResourceTemplate () { |
| 108 |
DWordSpace (0xc0, , , , , 0x5a, |
| 109 |
0xecedeeef, 0xf0f1f2f3, 0xf4f5f6f7, 0xf8f9fafb, 0xfcfdfeff, 0x0f) |
| 110 |
}) |
| 111 |
Name(RT01, |
| 112 |
ResourceTemplate () { |
| 113 |
DWordSpace (0xc0, , , , , 0x5a, |
| 114 |
0xecedeeef, 0xf0f1f2f3, 0xf4f5f6f7, 0xf8f9fafb, 0xfcfdfeff,, "PATHPATHPATH") |
| 115 |
}) |
| 116 |
} |
| 117 |
|
| 118 |
Method(m405) |
| 119 |
{ |
| 120 |
Name(RT00, |
| 121 |
ResourceTemplate () { |
| 122 |
Interrupt (ResourceConsumer, Edge, ActiveLow, Shared, 0x0f) |
| 123 |
{0xfcfdfeff} |
| 124 |
}) |
| 125 |
Name(RT01, |
| 126 |
ResourceTemplate () { |
| 127 |
Interrupt (ResourceConsumer, Edge, ActiveLow, Shared,, "PATHPATHPATH") |
| 128 |
{0xfcfdfeff} |
| 129 |
}) |
| 130 |
Name(RT02, |
| 131 |
ResourceTemplate () { |
| 132 |
Interrupt (ResourceConsumer, Edge, ActiveLow, Shared) {9, 9} |
| 133 |
}) |
| 134 |
Name(RT03, |
| 135 |
ResourceTemplate () { |
| 136 |
Interrupt (ResourceConsumer, Edge, ActiveLow, Shared) { |
| 137 |
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, |
| 138 |
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, |
| 139 |
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, |
| 140 |
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
| 141 |
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, |
| 142 |
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, |
| 143 |
97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,112, |
| 144 |
113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128, |
| 145 |
129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144, |
| 146 |
145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160, |
| 147 |
161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176, |
| 148 |
177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192, |
| 149 |
193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208, |
| 150 |
209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224, |
| 151 |
225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240, |
| 152 |
241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256} |
| 153 |
}) |
| 154 |
} |
| 155 |
|
| 156 |
Method(m406) |
| 157 |
{ |
| 158 |
Name(RT00, |
| 159 |
ResourceTemplate () { |
| 160 |
IRQ (Edge, ActiveLow, Shared) {16} |
| 161 |
}) |
| 162 |
Name(RT01, |
| 163 |
ResourceTemplate () { |
| 164 |
IRQ (Level, ActiveLow, Shared) {9, 9} |
| 165 |
}) |
| 166 |
} |
| 167 |
|
| 168 |
Method(m407) |
| 169 |
{ |
| 170 |
Name(RT00, |
| 171 |
ResourceTemplate () { |
| 172 |
IRQNoFlags () {16} |
| 173 |
}) |
| 174 |
Name(RT01, |
| 175 |
ResourceTemplate () { |
| 176 |
IRQNoFlags () {9, 9} |
| 177 |
}) |
| 178 |
} |
| 179 |
|
| 180 |
Method(m408) |
| 181 |
{ |
| 182 |
Name(RT00, |
| 183 |
ResourceTemplate () { |
| 184 |
QWordIO ( , , , , , |
| 185 |
0xd8d9dadbdcdddedf, 0xe0e1e2e3e4e5e6e7, 0xe8e9eaebecedeeef, |
| 186 |
0xf0f1f2f3f4f5f6f7, 0xf8f9fafbfcfdfeff, 0x0f) |
| 187 |
}) |
| 188 |
Name(RT01, |
| 189 |
ResourceTemplate () { |
| 190 |
QWordIO ( , , , , , |
| 191 |
0xd8d9dadbdcdddedf, 0xe0e1e2e3e4e5e6e7, 0xe8e9eaebecedeeef, |
| 192 |
0xf0f1f2f3f4f5f6f7, 0xf8f9fafbfcfdfeff,, "PATHPATHPATH") |
| 193 |
}) |
| 194 |
} |
| 195 |
|
| 196 |
Method(m409) |
| 197 |
{ |
| 198 |
Name(RT00, |
| 199 |
ResourceTemplate () { |
| 200 |
QWordMemory ( , , , , , , |
| 201 |
0xd8d9dadbdcdddedf, 0xe0e1e2e3e4e5e6e7, 0xe8e9eaebecedeeef, |
| 202 |
0xf0f1f2f3f4f5f6f7, 0xf8f9fafbfcfdfeff, 0x0f) |
| 203 |
}) |
| 204 |
Name(RT01, |
| 205 |
ResourceTemplate () { |
| 206 |
QWordMemory ( , , , , , , |
| 207 |
0xd8d9dadbdcdddedf, 0xe0e1e2e3e4e5e6e7, 0xe8e9eaebecedeeef, |
| 208 |
0xf0f1f2f3f4f5f6f7, 0xf8f9fafbfcfdfeff,, "PATHPATHPATH") |
| 209 |
}) |
| 210 |
} |
| 211 |
|
| 212 |
Method(m40a) |
| 213 |
{ |
| 214 |
Name(RT00, |
| 215 |
ResourceTemplate () { |
| 216 |
QWordSpace (0xc0, , , , , 0x5a, |
| 217 |
0xd8d9dadbdcdddedf, 0xe0e1e2e3e4e5e6e7, 0xe8e9eaebecedeeef, |
| 218 |
0xf0f1f2f3f4f5f6f7, 0xf8f9fafbfcfdfeff, 0x0f) |
| 219 |
}) |
| 220 |
Name(RT01, |
| 221 |
ResourceTemplate () { |
| 222 |
QWordSpace (0xc0, , , , , 0x5a, |
| 223 |
0xd8d9dadbdcdddedf, 0xe0e1e2e3e4e5e6e7, 0xe8e9eaebecedeeef, |
| 224 |
0xf0f1f2f3f4f5f6f7, 0xf8f9fafbfcfdfeff,, "PATHPATHPATH") |
| 225 |
}) |
| 226 |
} |
| 227 |
|
| 228 |
Method(m40b) |
| 229 |
{ |
| 230 |
Name(RT00, |
| 231 |
ResourceTemplate () { |
| 232 |
Register (SystemMemory, 0xf0, 0xf1, 0xf2f3f4f5f6f7f8f9, 5) |
| 233 |
}) |
| 234 |
} |
| 235 |
|
| 236 |
Method(m40c) |
| 237 |
{ |
| 238 |
Name(RT00, |
| 239 |
ResourceTemplate () { |
| 240 |
VendorShort () {0x00, 0x81, 0xa2, 0xb3, 0x76, 0xd5, 0xe6, 0xf7} |
| 241 |
}) |
| 242 |
Name(RT01, |
| 243 |
ResourceTemplate () { |
| 244 |
VendorShort (VS00) {0x00, 0xa2, 0xb3, 0x76, 0xd5, 0xe6, 0xf7} |
| 245 |
}) |
| 246 |
} |
| 247 |
|
| 248 |
Method(m40d) |
| 249 |
{ |
| 250 |
Name(RT00, |
| 251 |
ResourceTemplate () { |
| 252 |
WordBusNumber ( , , , , |
| 253 |
0xf6f7, 0xf8f9, 0xfafb, 0xfcfd, 0xfeff, 0x0f) |
| 254 |
}) |
| 255 |
Name(RT01, |
| 256 |
ResourceTemplate () { |
| 257 |
WordBusNumber ( , , , , |
| 258 |
0xf6f7, 0xf8f9, 0xfafb, 0xfcfd, 0xfeff,, "PATHPATHPATH") |
| 259 |
}) |
| 260 |
} |
| 261 |
|
| 262 |
Method(m40e) |
| 263 |
{ |
| 264 |
Name(RT00, |
| 265 |
ResourceTemplate () { |
| 266 |
WordIO ( , , , , , |
| 267 |
0xf6f7, 0xf8f9, 0xfafb, 0xfcfd, 0xfeff, 0x0f) |
| 268 |
}) |
| 269 |
Name(RT01, |
| 270 |
ResourceTemplate () { |
| 271 |
WordIO ( , , , , , |
| 272 |
0xf6f7, 0xf8f9, 0xfafb, 0xfcfd, 0xfeff,, "PATHPATHPATH") |
| 273 |
}) |
| 274 |
} |
| 275 |
|
| 276 |
Method(m40f) |
| 277 |
{ |
| 278 |
Name(RT00, |
| 279 |
ResourceTemplate () { |
| 280 |
WordSpace (0xc0, , , , , 0x5a, |
| 281 |
0xf6f7, 0xf8f9, 0xfafb, 0xfcfd, 0xfeff, 0x0f) |
| 282 |
}) |
| 283 |
Name(RT01, |
| 284 |
ResourceTemplate () { |
| 285 |
WordSpace (0xc0, , , , , 0x5a, |
| 286 |
0xf6f7, 0xf8f9, 0xfafb, 0xfcfd, 0xfeff,, "PATHPATHPATH") |
| 287 |
}) |
| 288 |
} |
| 289 |
|
| 290 |
// An example to provoke message: |
| 291 |
// "nsaccess-0713: *** Warning: NsLookup: Type mismatch on |
| 292 |
// M40f (Method), searching for (ResourceDesc)". |
| 293 |
// Expect a compiler error because the Descriptorname M40f and |
| 294 |
// the Method m40f are defined on the same scope. |
| 295 |
Name(M410, |
| 296 |
ResourceTemplate () { |
| 297 |
DMA (Compatibility, NotBusMaster, Transfer8, M40f) {0} |
| 298 |
}) |