1 /******************************************************************************
3 * Module Name: aslrestype1i - Small I/O-related resource descriptors
5 *****************************************************************************/
7 /******************************************************************************
11 * Some or all of this work - Copyright (c) 1999 - 2020, Intel Corp.
12 * All rights reserved.
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
37 * The above copyright and patent license is granted only if the following
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
72 * 3.4. Intel retains all right, title, and interest in and to the Original
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
80 * 4. Disclaimer and Export Compliance
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
99 * 4.3. Licensee shall not export, either directly or indirectly, any of this
100 * software or system incorporating such software without first obtaining any
101 * required license or other approval from the U. S. Department of Commerce or
102 * any other agency or department of the United States Government. In the
103 * event Licensee exports any such software from the United States or
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108 * any of its subsidiaries will export/re-export any technical data, process,
109 * software, or service, directly or indirectly, to any country for which the
110 * United States government or any agency thereof requires an export license,
111 * other governmental approval, or letter of assurance, without first obtaining
112 * such license, approval or letter.
114 *****************************************************************************
116 * Alternatively, you may choose to be licensed under the terms of the
119 * Redistribution and use in source and binary forms, with or without
120 * modification, are permitted provided that the following conditions
122 * 1. Redistributions of source code must retain the above copyright
123 * notice, this list of conditions, and the following disclaimer,
124 * without modification.
125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126 * substantially similar to the "NO WARRANTY" disclaimer below
127 * ("Disclaimer") and any redistribution must be conditioned upon
128 * including a substantially similar Disclaimer requirement for further
129 * binary redistribution.
130 * 3. Neither the names of the above-listed copyright holders nor the names
131 * of any contributors may be used to endorse or promote products derived
132 * from this software without specific prior written permission.
134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146 * Alternatively, you may choose to be licensed under the terms of the
147 * GNU General Public License ("GPL") version 2 as published by the Free
148 * Software Foundation.
150 *****************************************************************************/
152 #include <contrib/dev/acpica/compiler/aslcompiler.h>
153 #include "aslcompiler.y.h"
155 #define _COMPONENT ACPI_COMPILER
156 ACPI_MODULE_NAME ("aslrestype1i")
159 * This module contains the I/O-related small resource descriptors:
169 /*******************************************************************************
171 * FUNCTION: RsDoDmaDescriptor
173 * PARAMETERS: Info - Parse Op and resource template offset
175 * RETURN: Completed resource node
177 * DESCRIPTION: Construct a short "DMA" descriptor
179 ******************************************************************************/
183 ASL_RESOURCE_INFO *Info)
185 AML_RESOURCE *Descriptor;
186 ACPI_PARSE_OBJECT *InitializerOp;
187 ASL_RESOURCE_NODE *Rnode;
188 UINT32 CurrentByteOffset;
190 UINT8 DmaChannelMask = 0;
191 UINT8 DmaChannels = 0;
194 InitializerOp = Info->DescriptorTypeOp->Asl.Child;
195 CurrentByteOffset = Info->CurrentByteOffset;
196 Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_DMA));
198 Descriptor = Rnode->Buffer;
199 Descriptor->Dma.DescriptorType =
200 ACPI_RESOURCE_NAME_DMA | ASL_RDESC_DMA_SIZE;
202 /* Process all child initialization nodes */
204 for (i = 0; InitializerOp; i++)
208 case 0: /* DMA type */
210 RsSetFlagBits (&Descriptor->Dma.Flags, InitializerOp, 5, 0);
211 RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_DMATYPE,
212 CurrentByteOffset + ASL_RESDESC_OFFSET (Dma.Flags), 5, 2);
215 case 1: /* Bus Master */
217 RsSetFlagBits (&Descriptor->Dma.Flags, InitializerOp, 2, 0);
218 RsCreateBitField (InitializerOp, ACPI_RESTAG_BUSMASTER,
219 CurrentByteOffset + ASL_RESDESC_OFFSET (Dma.Flags), 2);
222 case 2: /* Xfer Type (transfer width) */
224 RsSetFlagBits (&Descriptor->Dma.Flags, InitializerOp, 0, 0);
225 RsCreateMultiBitField (InitializerOp, ACPI_RESTAG_XFERTYPE,
226 CurrentByteOffset + ASL_RESDESC_OFFSET (Dma.Flags), 0, 2);
231 UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
236 /* All DMA channel bytes are handled here, after flags and name */
238 if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
240 /* Up to 8 channels can be specified in the list */
245 AslError (ASL_ERROR, ASL_MSG_DMA_LIST,
246 InitializerOp, NULL);
250 /* Only DMA channels 0-7 are allowed (mask is 8 bits) */
252 if (InitializerOp->Asl.Value.Integer > 7)
254 AslError (ASL_ERROR, ASL_MSG_DMA_CHANNEL,
255 InitializerOp, NULL);
261 (1 << ((UINT8) InitializerOp->Asl.Value.Integer));
264 if (i == 4) /* case 4: First DMA byte */
266 /* Check now for duplicates in list */
268 RsCheckListForDuplicates (InitializerOp);
270 /* Create a named field at the start of the list */
272 RsCreateByteField (InitializerOp, ACPI_RESTAG_DMA,
274 ASL_RESDESC_OFFSET (Dma.DmaChannelMask));
279 InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
282 /* Now we can set the channel mask */
284 Descriptor->Dma.DmaChannelMask = DmaChannelMask;
289 /*******************************************************************************
291 * FUNCTION: RsDoFixedDmaDescriptor
293 * PARAMETERS: Info - Parse Op and resource template offset
295 * RETURN: Completed resource node
297 * DESCRIPTION: Construct a short "FixedDMA" descriptor
299 ******************************************************************************/
302 RsDoFixedDmaDescriptor (
303 ASL_RESOURCE_INFO *Info)
305 AML_RESOURCE *Descriptor;
306 ACPI_PARSE_OBJECT *InitializerOp;
307 ASL_RESOURCE_NODE *Rnode;
308 UINT32 CurrentByteOffset;
312 InitializerOp = Info->DescriptorTypeOp->Asl.Child;
313 CurrentByteOffset = Info->CurrentByteOffset;
314 Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_FIXED_DMA));
316 Descriptor = Rnode->Buffer;
317 Descriptor->FixedDma.DescriptorType =
318 ACPI_RESOURCE_NAME_FIXED_DMA | ASL_RDESC_FIXED_DMA_SIZE;
320 /* Process all child initialization nodes */
322 for (i = 0; InitializerOp; i++)
326 case 0: /* DMA Request Lines [WORD] (_DMA) */
328 Descriptor->FixedDma.RequestLines = (UINT16) InitializerOp->Asl.Value.Integer;
329 RsCreateWordField (InitializerOp, ACPI_RESTAG_DMA,
330 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.RequestLines));
333 case 1: /* DMA Channel [WORD] (_TYP) */
335 Descriptor->FixedDma.Channels = (UINT16) InitializerOp->Asl.Value.Integer;
336 RsCreateWordField (InitializerOp, ACPI_RESTAG_DMATYPE,
337 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Channels));
340 case 2: /* Transfer Width [BYTE] (_SIZ) */
342 Descriptor->FixedDma.Width = (UINT8) InitializerOp->Asl.Value.Integer;
343 RsCreateByteField (InitializerOp, ACPI_RESTAG_XFERTYPE,
344 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedDma.Width));
347 case 3: /* Descriptor Name (optional) */
349 UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
352 default: /* Ignore any extra nodes */
357 InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
364 /*******************************************************************************
366 * FUNCTION: RsDoFixedIoDescriptor
368 * PARAMETERS: Info - Parse Op and resource template offset
370 * RETURN: Completed resource node
372 * DESCRIPTION: Construct a short "FixedIO" descriptor
374 ******************************************************************************/
377 RsDoFixedIoDescriptor (
378 ASL_RESOURCE_INFO *Info)
380 AML_RESOURCE *Descriptor;
381 ACPI_PARSE_OBJECT *InitializerOp;
382 ACPI_PARSE_OBJECT *AddressOp = NULL;
383 ASL_RESOURCE_NODE *Rnode;
384 UINT32 CurrentByteOffset;
388 InitializerOp = Info->DescriptorTypeOp->Asl.Child;
389 CurrentByteOffset = Info->CurrentByteOffset;
390 Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_FIXED_IO));
392 Descriptor = Rnode->Buffer;
393 Descriptor->Io.DescriptorType =
394 ACPI_RESOURCE_NAME_FIXED_IO | ASL_RDESC_FIXED_IO_SIZE;
396 /* Process all child initialization nodes */
398 for (i = 0; InitializerOp; i++)
402 case 0: /* Base Address */
404 Descriptor->FixedIo.Address =
405 (UINT16) InitializerOp->Asl.Value.Integer;
406 RsCreateWordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
407 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.Address));
408 AddressOp = InitializerOp;
413 Descriptor->FixedIo.AddressLength =
414 (UINT8) InitializerOp->Asl.Value.Integer;
415 RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
416 CurrentByteOffset + ASL_RESDESC_OFFSET (FixedIo.AddressLength));
421 UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
426 AslError (ASL_ERROR, ASL_MSG_RESOURCE_LIST, InitializerOp, NULL);
430 InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
435 if (Descriptor->FixedIo.Address > 0x03FF)
437 AslError (ASL_WARNING, ASL_MSG_ISA_ADDRESS, AddressOp, NULL);
444 /*******************************************************************************
446 * FUNCTION: RsDoIoDescriptor
448 * PARAMETERS: Info - Parse Op and resource template offset
450 * RETURN: Completed resource node
452 * DESCRIPTION: Construct a short "IO" descriptor
454 ******************************************************************************/
458 ASL_RESOURCE_INFO *Info)
460 AML_RESOURCE *Descriptor;
461 ACPI_PARSE_OBJECT *InitializerOp;
462 ACPI_PARSE_OBJECT *MinOp = NULL;
463 ACPI_PARSE_OBJECT *MaxOp = NULL;
464 ACPI_PARSE_OBJECT *LengthOp = NULL;
465 ACPI_PARSE_OBJECT *AlignOp = NULL;
466 ASL_RESOURCE_NODE *Rnode;
467 UINT32 CurrentByteOffset;
471 InitializerOp = Info->DescriptorTypeOp->Asl.Child;
472 CurrentByteOffset = Info->CurrentByteOffset;
473 Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_IO));
475 Descriptor = Rnode->Buffer;
476 Descriptor->Io.DescriptorType =
477 ACPI_RESOURCE_NAME_IO | ASL_RDESC_IO_SIZE;
479 /* Process all child initialization nodes */
481 for (i = 0; InitializerOp; i++)
485 case 0: /* Decode size */
487 RsSetFlagBits (&Descriptor->Io.Flags, InitializerOp, 0, 1);
488 RsCreateBitField (InitializerOp, ACPI_RESTAG_DECODE,
489 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Flags), 0);
492 case 1: /* Min Address */
494 Descriptor->Io.Minimum =
495 (UINT16) InitializerOp->Asl.Value.Integer;
496 RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
497 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Minimum));
498 MinOp = InitializerOp;
501 case 2: /* Max Address */
503 Descriptor->Io.Maximum =
504 (UINT16) InitializerOp->Asl.Value.Integer;
505 RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
506 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Maximum));
507 MaxOp = InitializerOp;
510 case 3: /* Alignment */
512 Descriptor->Io.Alignment =
513 (UINT8) InitializerOp->Asl.Value.Integer;
514 RsCreateByteField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
515 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.Alignment));
516 AlignOp = InitializerOp;
521 Descriptor->Io.AddressLength =
522 (UINT8) InitializerOp->Asl.Value.Integer;
523 RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
524 CurrentByteOffset + ASL_RESDESC_OFFSET (Io.AddressLength));
525 LengthOp = InitializerOp;
530 UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
535 AslError (ASL_ERROR, ASL_MSG_RESOURCE_LIST, InitializerOp, NULL);
539 InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
542 /* Validate the Min/Max/Len/Align values */
544 RsSmallAddressCheck (ACPI_RESOURCE_NAME_IO,
545 Descriptor->Io.Minimum,
546 Descriptor->Io.Maximum,
547 Descriptor->Io.AddressLength,
548 Descriptor->Io.Alignment,
549 MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp);
555 /*******************************************************************************
557 * FUNCTION: RsDoIrqDescriptor
559 * PARAMETERS: Info - Parse Op and resource template offset
561 * RETURN: Completed resource node
563 * DESCRIPTION: Construct a short "IRQ" descriptor
565 ******************************************************************************/
569 ASL_RESOURCE_INFO *Info)
571 AML_RESOURCE *Descriptor;
572 ACPI_PARSE_OBJECT *InitializerOp;
573 ASL_RESOURCE_NODE *Rnode;
574 UINT32 Interrupts = 0;
576 UINT32 CurrentByteOffset;
580 InitializerOp = Info->DescriptorTypeOp->Asl.Child;
581 CurrentByteOffset = Info->CurrentByteOffset;
582 Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_IRQ));
584 /* Length = 3 (with flag byte) */
586 Descriptor = Rnode->Buffer;
587 Descriptor->Irq.DescriptorType =
588 ACPI_RESOURCE_NAME_IRQ | (ASL_RDESC_IRQ_SIZE + 0x01);
590 /* Process all child initialization nodes */
592 for (i = 0; InitializerOp; i++)
596 case 0: /* Interrupt Type (or Mode - edge/level) */
598 RsSetFlagBits (&Descriptor->Irq.Flags, InitializerOp, 0, 1);
599 RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTTYPE,
600 CurrentByteOffset + ASL_RESDESC_OFFSET (Irq.Flags), 0);
603 case 1: /* Interrupt Level (or Polarity - Active high/low) */
605 RsSetFlagBits (&Descriptor->Irq.Flags, InitializerOp, 3, 0);
606 RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTLEVEL,
607 CurrentByteOffset + ASL_RESDESC_OFFSET (Irq.Flags), 3);
610 case 2: /* Share Type - Default: exclusive (0) */
612 RsSetFlagBits (&Descriptor->Irq.Flags, InitializerOp, 4, 0);
613 RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
614 CurrentByteOffset + ASL_RESDESC_OFFSET (Irq.Flags), 4);
619 UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
624 /* All IRQ bytes are handled here, after the flags and name */
626 if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
628 /* Up to 16 interrupts can be specified in the list */
633 AslError (ASL_ERROR, ASL_MSG_INTERRUPT_LIST,
634 InitializerOp, NULL);
638 /* Only interrupts 0-15 are allowed (mask is 16 bits) */
640 if (InitializerOp->Asl.Value.Integer > 15)
642 AslError (ASL_ERROR, ASL_MSG_INTERRUPT_NUMBER,
643 InitializerOp, NULL);
647 IrqMask |= (1 << (UINT8) InitializerOp->Asl.Value.Integer);
651 /* Case 4: First IRQ value in list */
655 /* Check now for duplicates in list */
657 RsCheckListForDuplicates (InitializerOp);
659 /* Create a named field at the start of the list */
661 RsCreateWordField (InitializerOp, ACPI_RESTAG_INTERRUPT,
662 CurrentByteOffset + ASL_RESDESC_OFFSET (Irq.IrqMask));
667 InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
670 /* Now we can set the channel mask */
672 Descriptor->Irq.IrqMask = IrqMask;
677 /*******************************************************************************
679 * FUNCTION: RsDoIrqNoFlagsDescriptor
681 * PARAMETERS: Info - Parse Op and resource template offset
683 * RETURN: Completed resource node
685 * DESCRIPTION: Construct a short "IRQNoFlags" descriptor
687 ******************************************************************************/
690 RsDoIrqNoFlagsDescriptor (
691 ASL_RESOURCE_INFO *Info)
693 AML_RESOURCE *Descriptor;
694 ACPI_PARSE_OBJECT *InitializerOp;
695 ASL_RESOURCE_NODE *Rnode;
697 UINT32 Interrupts = 0;
698 UINT32 CurrentByteOffset;
702 InitializerOp = Info->DescriptorTypeOp->Asl.Child;
703 CurrentByteOffset = Info->CurrentByteOffset;
704 Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_IRQ_NOFLAGS));
706 Descriptor = Rnode->Buffer;
707 Descriptor->Irq.DescriptorType =
708 ACPI_RESOURCE_NAME_IRQ | ASL_RDESC_IRQ_SIZE;
710 /* Process all child initialization nodes */
712 for (i = 0; InitializerOp; i++)
718 UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
723 /* IRQ bytes are handled here, after the flags and name */
725 if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
727 /* Up to 16 interrupts can be specified in the list */
732 AslError (ASL_ERROR, ASL_MSG_INTERRUPT_LIST,
733 InitializerOp, NULL);
737 /* Only interrupts 0-15 are allowed (mask is 16 bits) */
739 if (InitializerOp->Asl.Value.Integer > 15)
741 AslError (ASL_ERROR, ASL_MSG_INTERRUPT_NUMBER,
742 InitializerOp, NULL);
746 IrqMask |= (1 << ((UINT8) InitializerOp->Asl.Value.Integer));
750 /* Case 1: First IRQ value in list */
754 /* Check now for duplicates in list */
756 RsCheckListForDuplicates (InitializerOp);
758 /* Create a named field at the start of the list */
760 RsCreateWordField (InitializerOp, ACPI_RESTAG_INTERRUPT,
761 CurrentByteOffset + ASL_RESDESC_OFFSET (Irq.IrqMask));
766 InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
769 /* Now we can set the interrupt mask */
771 Descriptor->Irq.IrqMask = IrqMask;