aslrestype1.c revision 234623
1
2/******************************************************************************
3 *
4 * Module Name: aslrestype1 - Miscellaneous small resource descriptors
5 *
6 *****************************************************************************/
7
8/*
9 * Copyright (C) 2000 - 2012, Intel Corp.
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 *    notice, this list of conditions, and the following disclaimer,
17 *    without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 *    substantially similar to the "NO WARRANTY" disclaimer below
20 *    ("Disclaimer") and any redistribution must be conditioned upon
21 *    including a substantially similar Disclaimer requirement for further
22 *    binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 *    of any contributors may be used to endorse or promote products derived
25 *    from this software without specific prior written permission.
26 *
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
30 *
31 * NO WARRANTY
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
43 */
44
45
46#include <contrib/dev/acpica/compiler/aslcompiler.h>
47#include "aslcompiler.y.h"
48
49#define _COMPONENT          ACPI_COMPILER
50        ACPI_MODULE_NAME    ("aslrestype1")
51
52/*
53 * This module contains miscellaneous small resource descriptors:
54 *
55 * EndTag
56 * EndDependentFn
57 * Memory24
58 * Memory32
59 * Memory32Fixed
60 * StartDependentFn
61 * StartDependentFnNoPri
62 * VendorShort
63 */
64
65/*******************************************************************************
66 *
67 * FUNCTION:    RsDoEndTagDescriptor
68 *
69 * PARAMETERS:  Op                  - Parent resource descriptor parse node
70 *              CurrentByteOffset   - Offset into the resource template AML
71 *                                    buffer (to track references to the desc)
72 *
73 * RETURN:      Completed resource node
74 *
75 * DESCRIPTION: Construct a short "EndDependentFn" descriptor
76 *
77 ******************************************************************************/
78
79ASL_RESOURCE_NODE *
80RsDoEndTagDescriptor (
81    ACPI_PARSE_OBJECT       *Op,
82    UINT32                  CurrentByteOffset)
83{
84    AML_RESOURCE            *Descriptor;
85    ASL_RESOURCE_NODE       *Rnode;
86
87
88    Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_END_TAG));
89
90    Descriptor = Rnode->Buffer;
91    Descriptor->EndTag.DescriptorType = ACPI_RESOURCE_NAME_END_TAG |
92                                        ASL_RDESC_END_TAG_SIZE;
93    Descriptor->EndTag.Checksum = 0;
94
95    return (Rnode);
96}
97
98
99/*******************************************************************************
100 *
101 * FUNCTION:    RsDoEndDependentDescriptor
102 *
103 * PARAMETERS:  Op                  - Parent resource descriptor parse node
104 *              CurrentByteOffset   - Offset into the resource template AML
105 *                                    buffer (to track references to the desc)
106 *
107 * RETURN:      Completed resource node
108 *
109 * DESCRIPTION: Construct a short "EndDependentFn" descriptor
110 *
111 ******************************************************************************/
112
113ASL_RESOURCE_NODE *
114RsDoEndDependentDescriptor (
115    ACPI_PARSE_OBJECT       *Op,
116    UINT32                  CurrentByteOffset)
117{
118    AML_RESOURCE            *Descriptor;
119    ASL_RESOURCE_NODE       *Rnode;
120
121
122    Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_END_DEPENDENT));
123
124    Descriptor = Rnode->Buffer;
125    Descriptor->EndDpf.DescriptorType  = ACPI_RESOURCE_NAME_END_DEPENDENT |
126                                      ASL_RDESC_END_DEPEND_SIZE;
127    return (Rnode);
128}
129
130
131/*******************************************************************************
132 *
133 * FUNCTION:    RsDoMemory24Descriptor
134 *
135 * PARAMETERS:  Op                  - Parent resource descriptor parse node
136 *              CurrentByteOffset   - Offset into the resource template AML
137 *                                    buffer (to track references to the desc)
138 *
139 * RETURN:      Completed resource node
140 *
141 * DESCRIPTION: Construct a short "Memory24" descriptor
142 *
143 ******************************************************************************/
144
145ASL_RESOURCE_NODE *
146RsDoMemory24Descriptor (
147    ACPI_PARSE_OBJECT       *Op,
148    UINT32                  CurrentByteOffset)
149{
150    AML_RESOURCE            *Descriptor;
151    ACPI_PARSE_OBJECT       *InitializerOp;
152    ACPI_PARSE_OBJECT       *MinOp = NULL;
153    ACPI_PARSE_OBJECT       *MaxOp = NULL;
154    ACPI_PARSE_OBJECT       *LengthOp = NULL;
155    ASL_RESOURCE_NODE       *Rnode;
156    UINT32                  i;
157
158
159    InitializerOp = Op->Asl.Child;
160    Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_MEMORY24));
161
162    Descriptor = Rnode->Buffer;
163    Descriptor->Memory24.DescriptorType  = ACPI_RESOURCE_NAME_MEMORY24;
164    Descriptor->Memory24.ResourceLength = 9;
165
166    /* Process all child initialization nodes */
167
168    for (i = 0; InitializerOp; i++)
169    {
170        switch (i)
171        {
172        case 0: /* Read/Write type */
173
174            RsSetFlagBits (&Descriptor->Memory24.Flags, InitializerOp, 0, 1);
175            RsCreateBitField (InitializerOp, ACPI_RESTAG_READWRITETYPE,
176                CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Flags), 0);
177            break;
178
179        case 1: /* Min Address */
180
181            Descriptor->Memory24.Minimum = (UINT16) InitializerOp->Asl.Value.Integer;
182            RsCreateWordField (InitializerOp, ACPI_RESTAG_MINADDR,
183                CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Minimum));
184            MinOp = InitializerOp;
185            break;
186
187        case 2: /* Max Address */
188
189            Descriptor->Memory24.Maximum = (UINT16) InitializerOp->Asl.Value.Integer;
190            RsCreateWordField (InitializerOp, ACPI_RESTAG_MAXADDR,
191                CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Maximum));
192            MaxOp = InitializerOp;
193            break;
194
195        case 3: /* Alignment */
196
197            Descriptor->Memory24.Alignment = (UINT16) InitializerOp->Asl.Value.Integer;
198            RsCreateWordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
199                CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.Alignment));
200            break;
201
202        case 4: /* Length */
203
204            Descriptor->Memory24.AddressLength = (UINT16) InitializerOp->Asl.Value.Integer;
205            RsCreateWordField (InitializerOp, ACPI_RESTAG_LENGTH,
206                CurrentByteOffset + ASL_RESDESC_OFFSET (Memory24.AddressLength));
207            LengthOp = InitializerOp;
208            break;
209
210        case 5: /* Name */
211
212            UtAttachNamepathToOwner (Op, InitializerOp);
213            break;
214
215        default:
216
217            AslError (ASL_ERROR, ASL_MSG_RESOURCE_LIST, InitializerOp, NULL);
218            break;
219        }
220
221        InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
222    }
223
224    /* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */
225
226    RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24,
227        Descriptor->Memory24.Minimum,
228        Descriptor->Memory24.Maximum,
229        Descriptor->Memory24.AddressLength,
230        Descriptor->Memory24.Alignment,
231        MinOp, MaxOp, LengthOp, NULL, Op);
232
233    return (Rnode);
234}
235
236
237/*******************************************************************************
238 *
239 * FUNCTION:    RsDoMemory32Descriptor
240 *
241 * PARAMETERS:  Op                  - Parent resource descriptor parse node
242 *              CurrentByteOffset   - Offset into the resource template AML
243 *                                    buffer (to track references to the desc)
244 *
245 * RETURN:      Completed resource node
246 *
247 * DESCRIPTION: Construct a short "Memory32" descriptor
248 *
249 ******************************************************************************/
250
251ASL_RESOURCE_NODE *
252RsDoMemory32Descriptor (
253    ACPI_PARSE_OBJECT       *Op,
254    UINT32                  CurrentByteOffset)
255{
256    AML_RESOURCE            *Descriptor;
257    ACPI_PARSE_OBJECT       *InitializerOp;
258    ACPI_PARSE_OBJECT       *MinOp = NULL;
259    ACPI_PARSE_OBJECT       *MaxOp = NULL;
260    ACPI_PARSE_OBJECT       *LengthOp = NULL;
261    ACPI_PARSE_OBJECT       *AlignOp = NULL;
262    ASL_RESOURCE_NODE       *Rnode;
263    UINT32                  i;
264
265
266    InitializerOp = Op->Asl.Child;
267    Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_MEMORY32));
268
269    Descriptor = Rnode->Buffer;
270    Descriptor->Memory32.DescriptorType  = ACPI_RESOURCE_NAME_MEMORY32;
271    Descriptor->Memory32.ResourceLength = 17;
272
273    /* Process all child initialization nodes */
274
275    for (i = 0; InitializerOp; i++)
276    {
277        switch (i)
278        {
279        case 0: /* Read/Write type */
280
281            RsSetFlagBits (&Descriptor->Memory32.Flags, InitializerOp, 0, 1);
282            RsCreateBitField (InitializerOp, ACPI_RESTAG_READWRITETYPE,
283                CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Flags), 0);
284            break;
285
286        case 1:  /* Min Address */
287
288            Descriptor->Memory32.Minimum = (UINT32) InitializerOp->Asl.Value.Integer;
289            RsCreateDwordField (InitializerOp, ACPI_RESTAG_MINADDR,
290                CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Minimum));
291            MinOp = InitializerOp;
292            break;
293
294        case 2: /* Max Address */
295
296            Descriptor->Memory32.Maximum = (UINT32) InitializerOp->Asl.Value.Integer;
297            RsCreateDwordField (InitializerOp, ACPI_RESTAG_MAXADDR,
298                CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Maximum));
299            MaxOp = InitializerOp;
300            break;
301
302        case 3: /* Alignment */
303
304            Descriptor->Memory32.Alignment = (UINT32) InitializerOp->Asl.Value.Integer;
305            RsCreateDwordField (InitializerOp, ACPI_RESTAG_ALIGNMENT,
306                CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.Alignment));
307            AlignOp = InitializerOp;
308            break;
309
310        case 4: /* Length */
311
312            Descriptor->Memory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
313            RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
314                CurrentByteOffset + ASL_RESDESC_OFFSET (Memory32.AddressLength));
315            LengthOp = InitializerOp;
316            break;
317
318        case 5: /* Name */
319
320            UtAttachNamepathToOwner (Op, InitializerOp);
321            break;
322
323        default:
324
325            AslError (ASL_ERROR, ASL_MSG_RESOURCE_LIST, InitializerOp, NULL);
326            break;
327        }
328
329        InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
330    }
331
332    /* Validate the Min/Max/Len/Align values */
333
334    RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32,
335        Descriptor->Memory32.Minimum,
336        Descriptor->Memory32.Maximum,
337        Descriptor->Memory32.AddressLength,
338        Descriptor->Memory32.Alignment,
339        MinOp, MaxOp, LengthOp, AlignOp, Op);
340
341    return (Rnode);
342}
343
344
345/*******************************************************************************
346 *
347 * FUNCTION:    RsDoMemory32FixedDescriptor
348 *
349 * PARAMETERS:  Op                  - Parent resource descriptor parse node
350 *              CurrentByteOffset   - Offset into the resource template AML
351 *                                    buffer (to track references to the desc)
352 *
353 * RETURN:      Completed resource node
354 *
355 * DESCRIPTION: Construct a short "Memory32Fixed" descriptor
356 *
357 ******************************************************************************/
358
359ASL_RESOURCE_NODE *
360RsDoMemory32FixedDescriptor (
361    ACPI_PARSE_OBJECT       *Op,
362    UINT32                  CurrentByteOffset)
363{
364    AML_RESOURCE            *Descriptor;
365    ACPI_PARSE_OBJECT       *InitializerOp;
366    ASL_RESOURCE_NODE       *Rnode;
367    UINT32                  i;
368
369
370    InitializerOp = Op->Asl.Child;
371    Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_FIXED_MEMORY32));
372
373    Descriptor = Rnode->Buffer;
374    Descriptor->FixedMemory32.DescriptorType  = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
375    Descriptor->FixedMemory32.ResourceLength = 9;
376
377    /* Process all child initialization nodes */
378
379    for (i = 0; InitializerOp; i++)
380    {
381        switch (i)
382        {
383        case 0: /* Read/Write type */
384
385            RsSetFlagBits (&Descriptor->FixedMemory32.Flags, InitializerOp, 0, 1);
386            RsCreateBitField (InitializerOp, ACPI_RESTAG_READWRITETYPE,
387                CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.Flags), 0);
388            break;
389
390        case 1: /* Address */
391
392            Descriptor->FixedMemory32.Address = (UINT32) InitializerOp->Asl.Value.Integer;
393            RsCreateDwordField (InitializerOp, ACPI_RESTAG_BASEADDRESS,
394                CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.Address));
395            break;
396
397        case 2: /* Length */
398
399            Descriptor->FixedMemory32.AddressLength = (UINT32) InitializerOp->Asl.Value.Integer;
400            RsCreateDwordField (InitializerOp, ACPI_RESTAG_LENGTH,
401                CurrentByteOffset + ASL_RESDESC_OFFSET (FixedMemory32.AddressLength));
402            break;
403
404        case 3: /* Name */
405
406            UtAttachNamepathToOwner (Op, InitializerOp);
407            break;
408
409        default:
410
411            AslError (ASL_ERROR, ASL_MSG_RESOURCE_LIST, InitializerOp, NULL);
412            break;
413        }
414
415        InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
416    }
417
418    return (Rnode);
419}
420
421
422/*******************************************************************************
423 *
424 * FUNCTION:    RsDoStartDependentDescriptor
425 *
426 * PARAMETERS:  Op                  - Parent resource descriptor parse node
427 *              CurrentByteOffset   - Offset into the resource template AML
428 *                                    buffer (to track references to the desc)
429 *
430 * RETURN:      Completed resource node
431 *
432 * DESCRIPTION: Construct a short "StartDependentFn" descriptor
433 *
434 ******************************************************************************/
435
436ASL_RESOURCE_NODE *
437RsDoStartDependentDescriptor (
438    ACPI_PARSE_OBJECT       *Op,
439    UINT32                  CurrentByteOffset)
440{
441    AML_RESOURCE            *Descriptor;
442    ACPI_PARSE_OBJECT       *InitializerOp;
443    ASL_RESOURCE_NODE       *Rnode;
444    ASL_RESOURCE_NODE       *PreviousRnode;
445    ASL_RESOURCE_NODE       *NextRnode;
446    UINT32                  i;
447    UINT8                   State;
448
449
450    InitializerOp = Op->Asl.Child;
451    Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_START_DEPENDENT));
452
453    PreviousRnode = Rnode;
454    Descriptor = Rnode->Buffer;
455
456    /* Increment offset past StartDependent descriptor */
457
458    CurrentByteOffset += sizeof (AML_RESOURCE_START_DEPENDENT);
459
460    /* Descriptor has priority byte */
461
462    Descriptor->StartDpf.DescriptorType  = ACPI_RESOURCE_NAME_START_DEPENDENT |
463                                      (ASL_RDESC_ST_DEPEND_SIZE + 0x01);
464
465    /* Process all child initialization nodes */
466
467    State = ACPI_RSTATE_START_DEPENDENT;
468    for (i = 0; InitializerOp; i++)
469    {
470        switch (i)
471        {
472        case 0: /* Compatibility Priority */
473
474            if ((UINT8) InitializerOp->Asl.Value.Integer > 2)
475            {
476                AslError (ASL_ERROR, ASL_MSG_INVALID_PRIORITY,
477                    InitializerOp, NULL);
478            }
479
480            RsSetFlagBits (&Descriptor->StartDpf.Flags, InitializerOp, 0, 0);
481            break;
482
483        case 1: /* Performance/Robustness Priority */
484
485            if ((UINT8) InitializerOp->Asl.Value.Integer > 2)
486            {
487                AslError (ASL_ERROR, ASL_MSG_INVALID_PERFORMANCE,
488                    InitializerOp, NULL);
489            }
490
491            RsSetFlagBits (&Descriptor->StartDpf.Flags, InitializerOp, 2, 0);
492            break;
493
494        default:
495
496            NextRnode = RsDoOneResourceDescriptor  (InitializerOp,
497                        CurrentByteOffset, &State);
498
499            /*
500             * Update current byte offset to indicate the number of bytes from the
501             * start of the buffer.  Buffer can include multiple descriptors, we
502             * must keep track of the offset of not only each descriptor, but each
503             * element (field) within each descriptor as well.
504             */
505            CurrentByteOffset += RsLinkDescriptorChain (&PreviousRnode,
506                                    NextRnode);
507            break;
508        }
509
510        InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
511    }
512
513    return (Rnode);
514}
515
516
517/*******************************************************************************
518 *
519 * FUNCTION:    RsDoStartDependentNoPriDescriptor
520 *
521 * PARAMETERS:  Op                  - Parent resource descriptor parse node
522 *              CurrentByteOffset   - Offset into the resource template AML
523 *                                    buffer (to track references to the desc)
524 *
525 * RETURN:      Completed resource node
526 *
527 * DESCRIPTION: Construct a short "StartDependentNoPri" descriptor
528 *
529 ******************************************************************************/
530
531ASL_RESOURCE_NODE *
532RsDoStartDependentNoPriDescriptor (
533    ACPI_PARSE_OBJECT       *Op,
534    UINT32                  CurrentByteOffset)
535{
536    AML_RESOURCE            *Descriptor;
537    ACPI_PARSE_OBJECT       *InitializerOp;
538    ASL_RESOURCE_NODE       *Rnode;
539    ASL_RESOURCE_NODE       *PreviousRnode;
540    ASL_RESOURCE_NODE       *NextRnode;
541    UINT8                   State;
542
543
544    InitializerOp = Op->Asl.Child;
545    Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_START_DEPENDENT_NOPRIO));
546
547    Descriptor = Rnode->Buffer;
548    Descriptor->StartDpf.DescriptorType  = ACPI_RESOURCE_NAME_START_DEPENDENT |
549                                      ASL_RDESC_ST_DEPEND_SIZE;
550    PreviousRnode = Rnode;
551
552    /* Increment offset past StartDependentNoPri descriptor */
553
554    CurrentByteOffset += sizeof (AML_RESOURCE_START_DEPENDENT_NOPRIO);
555
556    /* Process all child initialization nodes */
557
558    State = ACPI_RSTATE_START_DEPENDENT;
559    while (InitializerOp)
560    {
561        NextRnode = RsDoOneResourceDescriptor  (InitializerOp,
562                        CurrentByteOffset, &State);
563
564        /*
565         * Update current byte offset to indicate the number of bytes from the
566         * start of the buffer.  Buffer can include multiple descriptors, we
567         * must keep track of the offset of not only each descriptor, but each
568         * element (field) within each descriptor as well.
569         */
570        CurrentByteOffset += RsLinkDescriptorChain (&PreviousRnode, NextRnode);
571
572        InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
573    }
574
575    return (Rnode);
576}
577
578
579/*******************************************************************************
580 *
581 * FUNCTION:    RsDoVendorSmallDescriptor
582 *
583 * PARAMETERS:  Op                  - Parent resource descriptor parse node
584 *              CurrentByteOffset   - Offset into the resource template AML
585 *                                    buffer (to track references to the desc)
586 *
587 * RETURN:      Completed resource node
588 *
589 * DESCRIPTION: Construct a short "VendorShort" descriptor
590 *
591 ******************************************************************************/
592
593ASL_RESOURCE_NODE *
594RsDoVendorSmallDescriptor (
595    ACPI_PARSE_OBJECT       *Op,
596    UINT32                  CurrentByteOffset)
597{
598    AML_RESOURCE            *Descriptor;
599    ACPI_PARSE_OBJECT       *InitializerOp;
600    ASL_RESOURCE_NODE       *Rnode;
601    UINT8                   *VendorData;
602    UINT32                  i;
603
604
605    InitializerOp = Op->Asl.Child;
606
607    /* Allocate worst case - 7 vendor bytes */
608
609    Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_VENDOR_SMALL) + 7);
610
611    Descriptor = Rnode->Buffer;
612    Descriptor->VendorSmall.DescriptorType  = ACPI_RESOURCE_NAME_VENDOR_SMALL;
613    VendorData = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_SMALL_HEADER);
614
615    /* Process all child initialization nodes */
616
617    InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
618    for (i = 0; InitializerOp; i++)
619    {
620        if (InitializerOp->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
621        {
622            break;
623        }
624
625        /* Maximum 7 vendor data bytes allowed (0-6) */
626
627        if (i >= 7)
628        {
629            AslError (ASL_ERROR, ASL_MSG_VENDOR_LIST, InitializerOp, NULL);
630
631            /* Eat the excess initializers */
632
633            while (InitializerOp)
634            {
635                InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
636            }
637            break;
638        }
639
640        VendorData[i] = (UINT8) InitializerOp->Asl.Value.Integer;
641        InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
642    }
643
644    /* Adjust the Rnode buffer size, so correct number of bytes are emitted */
645
646    Rnode->BufferLength -= (7 - i);
647
648    /* Set the length in the Type Tag */
649
650    Descriptor->VendorSmall.DescriptorType |= (UINT8) i;
651    return (Rnode);
652}
653
654