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 * PinGroup Resource Descriptor Macro 32 */ 33 Name (P460, Package (0x08) 34 { 35 ResourceTemplate () 36 { 37 PinGroup ("group1", ResourceProducer, , 38 RawDataBuffer (0x03) // Vendor Data 39 { 40 0xAA, 0xBB, 0xCC 41 }) 42 { // Pin list 43 0x0001, 44 0x0002, 45 0x0003, 46 0x0004 47 } 48 }, 49 50 ResourceTemplate () 51 { 52 PinGroup ("group2", ResourceProducer, ,) 53 { // Pin list 54 0x0001, 55 0x0002, 56 0x0003, 57 0x0004 58 } 59 }, 60 61 ResourceTemplate () 62 { 63 PinGroup ("group3", ResourceProducer, ,) 64 { // Pin list 65 0x0001, 66 0x0002, 67 0x0003, 68 0x0004 69 } 70 }, 71 72 ResourceTemplate () 73 { 74 PinGroup ("group4", ResourceProducer, ,) 75 { // Pin list 76 0x0001, 77 0x0002, 78 0x0003, 79 0x0004 80 } 81 }, 82 83 ResourceTemplate () 84 { 85 PinGroup ("group5", ResourceProducer, ,) 86 { // Pin list 87 0x0001, 88 0x0002, 89 0x0003, 90 0x0004 91 } 92 }, 93 94 ResourceTemplate () 95 { 96 PinGroup ("group6", ResourceProducer, , 97 RawDataBuffer (0x03) // Vendor Data 98 { 99 0xAA, 0xBB, 0xCC 100 }) 101 { // Pin list 102 0x0001, 103 0x0002, 104 0x0003, 105 0x0004 106 } 107 }, 108 109 ResourceTemplate () 110 { 111 PinGroup ("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", ResourceProducer, , 112 RawDataBuffer (0x03) // Vendor Data 113 { 114 0xAA, 0xBB, 0xCC 115 }) 116 { // Pin list 117 0x0001, 118 0x0002, 119 0x0003, 120 0x0004 121 } 122 }, 123 124 ResourceTemplate () 125 { 126 PinGroup ("a", ResourceProducer, ,) 127 { // Pin list 128 0x0001, 129 0x0002, 130 0x0003, 131 0x0004 132 } 133 } 134 }) 135 Name (P461, Package (0x08) 136 { 137 ResourceTemplate () 138 { 139 PinGroup ("group1", ResourceProducer, , 140 RawDataBuffer (0x03) // Vendor Data 141 { 142 0xAA, 0xBB, 0xCC 143 }) 144 { // Pin list 145 0x0001, 146 0x0002, 147 0x0003, 148 0x0004 149 } 150 }, 151 152 ResourceTemplate () 153 { 154 PinGroup ("group2", ResourceProducer, ,) 155 { // Pin list 156 0x0001, 157 0x0002, 158 0x0003, 159 0x0004 160 } 161 }, 162 163 ResourceTemplate () 164 { 165 PinGroup ("group3", ResourceProducer, ,) 166 { // Pin list 167 0x0001, 168 0x0002, 169 0x0003, 170 0x0004 171 } 172 }, 173 174 ResourceTemplate () 175 { 176 PinGroup ("group4", ResourceProducer, ,) 177 { // Pin list 178 0x0001, 179 0x0002, 180 0x0003, 181 0x0004 182 } 183 }, 184 185 ResourceTemplate () 186 { 187 PinGroup ("group5", ResourceProducer, ,) 188 { // Pin list 189 0x0001, 190 0x0002, 191 0x0003, 192 0x0004 193 } 194 }, 195 196 ResourceTemplate () 197 { 198 PinGroup ("group6", ResourceProducer, , 199 RawDataBuffer (0x03) // Vendor Data 200 { 201 0xAA, 0xBB, 0xCC 202 }) 203 { // Pin list 204 0x0001, 205 0x0002, 206 0x0003, 207 0x0004 208 } 209 }, 210 211 ResourceTemplate () 212 { 213 PinGroup ("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", ResourceProducer, , 214 RawDataBuffer (0x03) // Vendor Data 215 { 216 0xAA, 0xBB, 0xCC 217 }) 218 { // Pin list 219 0x0001, 220 0x0002, 221 0x0003, 222 0x0004 223 } 224 }, 225 226 ResourceTemplate () 227 { 228 PinGroup ("a", ResourceProducer, ,) 229 { // Pin list 230 0x0001, 231 0x0002, 232 0x0003, 233 0x0004 234 } 235 } 236 }) 237 Method (RT28, 0, Serialized) 238 { 239 /* Emit test header, set the filename */ 240 241 THDR (__METHOD__, "PinGroup Resource Descriptor Macro", "pingroup.asl") 242 /* The main test packages must have the same number of entries */ 243 244 If ((SizeOf (P460) != SizeOf (P461))) 245 { 246 ERR (__METHOD__, 0xB3, __LINE__, 0x00, 0x00, 0x00, "Incorrect package length") 247 Return (Zero) 248 } 249 250 /* Main test case for packages above */ 251 252 M330 (__METHOD__, SizeOf (P460), "P460", P460, P461) 253 /* Check resource descriptor tag offsets */ 254 255Local0 = ResourceTemplate () 256 { 257 PinGroup ("group0", ResourceProducer, , 258 RawDataBuffer (0x03) // Vendor Data 259 { 260 0xAA, 0xBB, 0xCC 261 }) 262 { // Pin list 263 0x0001, 264 0x0002, 265 0x0003, 266 0x0004 267 } 268 PinGroup ("group1", ResourceProducer, , 269 RawDataBuffer (0x03) // Vendor Data 270 { 271 0xAA, 0xBB, 0xCC 272 }) 273 { // Pin list 274 0x0001, 275 0x0002, 276 0x0003, 277 0x0004 278 } 279 } 280 M331 (__METHOD__, 0x01, 0xE8, 0xE8, 0x01E8, 0x01E8, "_VEN") 281 M331 (__METHOD__, 0x01, 0x70, 0x70, 0x0170, 0x0170, "_PIN") 282 } 283