1 /****************************************************************************** 2 * 3 * Module Name: aslrestype2e - Large Extended address resource descriptors 4 * 5 *****************************************************************************/ 6 7 /* 8 * Copyright (C) 2000 - 2013, Intel Corp. 9 * All rights reserved. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions, and the following disclaimer, 16 * without modification. 17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 18 * substantially similar to the "NO WARRANTY" disclaimer below 19 * ("Disclaimer") and any redistribution must be conditioned upon 20 * including a substantially similar Disclaimer requirement for further 21 * binary redistribution. 22 * 3. Neither the names of the above-listed copyright holders nor the names 23 * of any contributors may be used to endorse or promote products derived 24 * from this software without specific prior written permission. 25 * 26 * Alternatively, this software may be distributed under the terms of the 27 * GNU General Public License ("GPL") version 2 as published by the Free 28 * Software Foundation. 29 * 30 * NO WARRANTY 31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41 * POSSIBILITY OF SUCH DAMAGES. 42 */ 43 44 45 #include "aslcompiler.h" 46 47 #define _COMPONENT ACPI_COMPILER 48 ACPI_MODULE_NAME ("aslrestype2e") 49 50 /* 51 * This module contains the Extended (64-bit) address space descriptors: 52 * 53 * ExtendedIO 54 * ExtendedMemory 55 * ExtendedSpace 56 */ 57 58 /******************************************************************************* 59 * 60 * FUNCTION: RsDoExtendedIoDescriptor 61 * 62 * PARAMETERS: Op - Parent resource descriptor parse node 63 * CurrentByteOffset - Offset into the resource template AML 64 * buffer (to track references to the desc) 65 * 66 * RETURN: Completed resource node 67 * 68 * DESCRIPTION: Construct a long "ExtendedIO" descriptor 69 * 70 ******************************************************************************/ 71 72 ASL_RESOURCE_NODE * 73 RsDoExtendedIoDescriptor ( 74 ACPI_PARSE_OBJECT *Op, 75 UINT32 CurrentByteOffset) 76 { 77 AML_RESOURCE *Descriptor; 78 ACPI_PARSE_OBJECT *InitializerOp; 79 ACPI_PARSE_OBJECT *MinOp = NULL; 80 ACPI_PARSE_OBJECT *MaxOp = NULL; 81 ACPI_PARSE_OBJECT *LengthOp = NULL; 82 ACPI_PARSE_OBJECT *GranOp = NULL; 83 ASL_RESOURCE_NODE *Rnode; 84 UINT16 StringLength = 0; 85 UINT32 i; 86 87 88 InitializerOp = Op->Asl.Child; 89 StringLength = RsGetStringDataLength (InitializerOp); 90 91 Rnode = RsAllocateResourceNode ( 92 sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength); 93 94 Descriptor = Rnode->Buffer; 95 Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64; 96 Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE; 97 Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION; 98 99 Descriptor->ExtAddress64.ResourceLength = (UINT16) 100 (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) - 101 sizeof (AML_RESOURCE_LARGE_HEADER)); 102 103 /* Process all child initialization nodes */ 104 105 for (i = 0; InitializerOp; i++) 106 { 107 switch (i) 108 { 109 case 0: /* Resource Usage */ 110 111 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 0, 1); 112 break; 113 114 case 1: /* MinType */ 115 116 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 2, 0); 117 RsCreateBitField (InitializerOp, ACPI_RESTAG_MINTYPE, 118 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Flags), 2); 119 break; 120 121 case 2: /* MaxType */ 122 123 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 3, 0); 124 RsCreateBitField (InitializerOp, ACPI_RESTAG_MAXTYPE, 125 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Flags), 3); 126 break; 127 128 case 3: /* DecodeType */ 129 130 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 1, 0); 131 RsCreateBitField (InitializerOp, ACPI_RESTAG_DECODE, 132 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Flags), 1); 133 break; 134 135 case 4: /* Range Type */ 136 137 RsSetFlagBits (&Descriptor->ExtAddress64.SpecificFlags, InitializerOp, 0, 3); 138 RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_RANGETYPE, 139 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.SpecificFlags), 0, 2); 140 break; 141 142 case 5: /* Address Granularity */ 143 144 Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer; 145 RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, 146 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); 147 GranOp = InitializerOp; 148 break; 149 150 case 6: /* Address Min */ 151 152 Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer; 153 RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, 154 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); 155 MinOp = InitializerOp; 156 break; 157 158 case 7: /* Address Max */ 159 160 Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer; 161 RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, 162 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); 163 MaxOp = InitializerOp; 164 break; 165 166 case 8: /* Translation Offset */ 167 168 Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer; 169 RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, 170 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset)); 171 break; 172 173 case 9: /* Address Length */ 174 175 Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer; 176 RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, 177 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); 178 LengthOp = InitializerOp; 179 break; 180 181 case 10: /* Type-Specific Attributes */ 182 183 Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer; 184 RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, 185 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); 186 break; 187 188 case 11: /* ResourceTag */ 189 190 UtAttachNamepathToOwner (Op, InitializerOp); 191 break; 192 193 case 12: /* Type */ 194 195 RsSetFlagBits (&Descriptor->ExtAddress64.SpecificFlags, InitializerOp, 4, 0); 196 RsCreateBitField (InitializerOp, ACPI_RESTAG_TYPE, 197 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.SpecificFlags), 4); 198 break; 199 200 case 13: /* Translation Type */ 201 202 RsSetFlagBits (&Descriptor->ExtAddress64.SpecificFlags, InitializerOp, 5, 0); 203 RsCreateBitField (InitializerOp, ACPI_RESTAG_TRANSTYPE, 204 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.SpecificFlags), 5); 205 break; 206 207 default: 208 209 AslError (ASL_ERROR, ASL_MSG_RESOURCE_LIST, InitializerOp, NULL); 210 break; 211 } 212 213 InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); 214 } 215 216 /* Validate the Min/Max/Len/Gran values */ 217 218 RsLargeAddressCheck ( 219 Descriptor->ExtAddress64.Minimum, 220 Descriptor->ExtAddress64.Maximum, 221 Descriptor->ExtAddress64.AddressLength, 222 Descriptor->ExtAddress64.Granularity, 223 Descriptor->ExtAddress64.Flags, 224 MinOp, MaxOp, LengthOp, GranOp, Op); 225 226 Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength; 227 return (Rnode); 228 } 229 230 231 /******************************************************************************* 232 * 233 * FUNCTION: RsDoExtendedMemoryDescriptor 234 * 235 * PARAMETERS: Op - Parent resource descriptor parse node 236 * CurrentByteOffset - Offset into the resource template AML 237 * buffer (to track references to the desc) 238 * 239 * RETURN: Completed resource node 240 * 241 * DESCRIPTION: Construct a long "ExtendedMemory" descriptor 242 * 243 ******************************************************************************/ 244 245 ASL_RESOURCE_NODE * 246 RsDoExtendedMemoryDescriptor ( 247 ACPI_PARSE_OBJECT *Op, 248 UINT32 CurrentByteOffset) 249 { 250 AML_RESOURCE *Descriptor; 251 ACPI_PARSE_OBJECT *InitializerOp; 252 ACPI_PARSE_OBJECT *MinOp = NULL; 253 ACPI_PARSE_OBJECT *MaxOp = NULL; 254 ACPI_PARSE_OBJECT *LengthOp = NULL; 255 ACPI_PARSE_OBJECT *GranOp = NULL; 256 ASL_RESOURCE_NODE *Rnode; 257 UINT16 StringLength = 0; 258 UINT32 i; 259 260 261 InitializerOp = Op->Asl.Child; 262 StringLength = RsGetStringDataLength (InitializerOp); 263 264 Rnode = RsAllocateResourceNode ( 265 sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength); 266 267 Descriptor = Rnode->Buffer; 268 Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64; 269 Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE; 270 Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION; 271 272 Descriptor->ExtAddress64.ResourceLength = (UINT16) 273 (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) - 274 sizeof (AML_RESOURCE_LARGE_HEADER)); 275 276 /* Process all child initialization nodes */ 277 278 for (i = 0; InitializerOp; i++) 279 { 280 switch (i) 281 { 282 case 0: /* Resource Usage */ 283 284 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 0, 1); 285 break; 286 287 case 1: /* DecodeType */ 288 289 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 1, 0); 290 RsCreateBitField (InitializerOp, ACPI_RESTAG_DECODE, 291 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Flags), 1); 292 break; 293 294 case 2: /* MinType */ 295 296 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 2, 0); 297 RsCreateBitField (InitializerOp, ACPI_RESTAG_MINTYPE, 298 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Flags), 2); 299 break; 300 301 case 3: /* MaxType */ 302 303 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 3, 0); 304 RsCreateBitField (InitializerOp, ACPI_RESTAG_MAXTYPE, 305 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Flags), 3); 306 break; 307 308 case 4: /* Memory Type */ 309 310 RsSetFlagBits (&Descriptor->ExtAddress64.SpecificFlags, InitializerOp, 1, 0); 311 RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_MEMTYPE, 312 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.SpecificFlags), 1, 2); 313 break; 314 315 case 5: /* Read/Write Type */ 316 317 RsSetFlagBits (&Descriptor->ExtAddress64.SpecificFlags, InitializerOp, 0, 1); 318 RsCreateBitField (InitializerOp, ACPI_RESTAG_READWRITETYPE, 319 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.SpecificFlags), 0); 320 break; 321 322 case 6: /* Address Granularity */ 323 324 Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer; 325 RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, 326 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); 327 GranOp = InitializerOp; 328 break; 329 330 case 7: /* Min Address */ 331 332 Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer; 333 RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, 334 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); 335 MinOp = InitializerOp; 336 break; 337 338 case 8: /* Max Address */ 339 340 Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer; 341 RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, 342 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); 343 MaxOp = InitializerOp; 344 break; 345 346 case 9: /* Translation Offset */ 347 348 Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer; 349 RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, 350 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset)); 351 break; 352 353 case 10: /* Address Length */ 354 355 Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer; 356 RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, 357 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); 358 LengthOp = InitializerOp; 359 break; 360 361 case 11: /* Type-Specific Attributes */ 362 363 Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer; 364 RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, 365 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); 366 break; 367 368 case 12: /* ResourceTag */ 369 370 UtAttachNamepathToOwner (Op, InitializerOp); 371 break; 372 373 374 case 13: /* Address Range */ 375 376 RsSetFlagBits (&Descriptor->ExtAddress64.SpecificFlags, InitializerOp, 3, 0); 377 RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_MEMATTRIBUTES, 378 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.SpecificFlags), 3, 2); 379 break; 380 381 case 14: /* Type */ 382 383 RsSetFlagBits (&Descriptor->ExtAddress64.SpecificFlags, InitializerOp, 5, 0); 384 RsCreateBitField (InitializerOp, ACPI_RESTAG_TYPE, 385 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.SpecificFlags), 5); 386 break; 387 388 default: 389 390 AslError (ASL_ERROR, ASL_MSG_RESOURCE_LIST, InitializerOp, NULL); 391 break; 392 } 393 394 InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); 395 } 396 397 /* Validate the Min/Max/Len/Gran values */ 398 399 RsLargeAddressCheck ( 400 Descriptor->ExtAddress64.Minimum, 401 Descriptor->ExtAddress64.Maximum, 402 Descriptor->ExtAddress64.AddressLength, 403 Descriptor->ExtAddress64.Granularity, 404 Descriptor->ExtAddress64.Flags, 405 MinOp, MaxOp, LengthOp, GranOp, Op); 406 407 Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength; 408 return (Rnode); 409 } 410 411 412 /******************************************************************************* 413 * 414 * FUNCTION: RsDoExtendedSpaceDescriptor 415 * 416 * PARAMETERS: Op - Parent resource descriptor parse node 417 * CurrentByteOffset - Offset into the resource template AML 418 * buffer (to track references to the desc) 419 * 420 * RETURN: Completed resource node 421 * 422 * DESCRIPTION: Construct a long "ExtendedSpace" descriptor 423 * 424 ******************************************************************************/ 425 426 ASL_RESOURCE_NODE * 427 RsDoExtendedSpaceDescriptor ( 428 ACPI_PARSE_OBJECT *Op, 429 UINT32 CurrentByteOffset) 430 { 431 AML_RESOURCE *Descriptor; 432 ACPI_PARSE_OBJECT *InitializerOp; 433 ACPI_PARSE_OBJECT *MinOp = NULL; 434 ACPI_PARSE_OBJECT *MaxOp = NULL; 435 ACPI_PARSE_OBJECT *LengthOp = NULL; 436 ACPI_PARSE_OBJECT *GranOp = NULL; 437 ASL_RESOURCE_NODE *Rnode; 438 UINT16 StringLength = 0; 439 UINT32 i; 440 441 442 InitializerOp = Op->Asl.Child; 443 StringLength = RsGetStringDataLength (InitializerOp); 444 445 Rnode = RsAllocateResourceNode ( 446 sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength); 447 448 Descriptor = Rnode->Buffer; 449 Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64; 450 Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION; 451 452 Descriptor->ExtAddress64.ResourceLength = (UINT16) 453 (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) - 454 sizeof (AML_RESOURCE_LARGE_HEADER)); 455 456 /* Process all child initialization nodes */ 457 458 for (i = 0; InitializerOp; i++) 459 { 460 switch (i) 461 { 462 case 0: /* Resource Type */ 463 464 Descriptor->ExtAddress64.ResourceType = 465 (UINT8) InitializerOp->Asl.Value.Integer; 466 break; 467 468 case 1: /* Resource Usage */ 469 470 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 0, 1); 471 break; 472 473 case 2: /* DecodeType */ 474 475 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 1, 0); 476 RsCreateBitField (InitializerOp, ACPI_RESTAG_DECODE, 477 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Flags), 1); 478 break; 479 480 case 3: /* MinType */ 481 482 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 2, 0); 483 RsCreateBitField (InitializerOp, ACPI_RESTAG_MINTYPE, 484 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Flags), 2); 485 break; 486 487 case 4: /* MaxType */ 488 489 RsSetFlagBits (&Descriptor->ExtAddress64.Flags, InitializerOp, 3, 0); 490 RsCreateBitField (InitializerOp, ACPI_RESTAG_MAXTYPE, 491 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Flags), 3); 492 break; 493 494 case 5: /* Type-Specific flags */ 495 496 Descriptor->ExtAddress64.SpecificFlags = 497 (UINT8) InitializerOp->Asl.Value.Integer; 498 break; 499 500 case 6: /* Address Granularity */ 501 502 Descriptor->ExtAddress64.Granularity = InitializerOp->Asl.Value.Integer; 503 RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY, 504 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity)); 505 GranOp = InitializerOp; 506 break; 507 508 case 7: /* Min Address */ 509 510 Descriptor->ExtAddress64.Minimum = InitializerOp->Asl.Value.Integer; 511 RsCreateQwordField (InitializerOp, ACPI_RESTAG_MINADDR, 512 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Minimum)); 513 MinOp = InitializerOp; 514 break; 515 516 case 8: /* Max Address */ 517 518 Descriptor->ExtAddress64.Maximum = InitializerOp->Asl.Value.Integer; 519 RsCreateQwordField (InitializerOp, ACPI_RESTAG_MAXADDR, 520 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Maximum)); 521 MaxOp = InitializerOp; 522 break; 523 524 case 9: /* Translation Offset */ 525 526 Descriptor->ExtAddress64.TranslationOffset = InitializerOp->Asl.Value.Integer; 527 RsCreateQwordField (InitializerOp, ACPI_RESTAG_TRANSLATION, 528 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TranslationOffset)); 529 break; 530 531 case 10: /* Address Length */ 532 533 Descriptor->ExtAddress64.AddressLength = InitializerOp->Asl.Value.Integer; 534 RsCreateQwordField (InitializerOp, ACPI_RESTAG_LENGTH, 535 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.AddressLength)); 536 LengthOp = InitializerOp; 537 break; 538 539 case 11: /* Type-Specific Attributes */ 540 541 Descriptor->ExtAddress64.TypeSpecific = InitializerOp->Asl.Value.Integer; 542 RsCreateQwordField (InitializerOp, ACPI_RESTAG_TYPESPECIFICATTRIBUTES, 543 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.TypeSpecific)); 544 break; 545 546 case 12: /* ResourceTag */ 547 548 UtAttachNamepathToOwner (Op, InitializerOp); 549 break; 550 551 default: 552 553 AslError (ASL_ERROR, ASL_MSG_RESOURCE_LIST, InitializerOp, NULL); 554 break; 555 } 556 557 InitializerOp = RsCompleteNodeAndGetNext (InitializerOp); 558 } 559 560 /* Validate the Min/Max/Len/Gran values */ 561 562 RsLargeAddressCheck ( 563 Descriptor->ExtAddress64.Minimum, 564 Descriptor->ExtAddress64.Maximum, 565 Descriptor->ExtAddress64.AddressLength, 566 Descriptor->ExtAddress64.Granularity, 567 Descriptor->ExtAddress64.Flags, 568 MinOp, MaxOp, LengthOp, GranOp, Op); 569 570 Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength; 571 return (Rnode); 572 }