Subversion Repositories Kolibri OS

Rev

Rev 1498 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1498 serge 1
 
2
 *
3
 * Module Name: aslrestype2w - Large Word address resource descriptors
4
 *
5
 *****************************************************************************/
6
7
 
8
 *
9
 * 1. Copyright Notice
10
 *
11
 * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
2216 Serge 12
 * All rights reserved.
1498 serge 13
 *
14
 * 2. License
15
 *
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
19
 * property rights.
20
 *
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
27
 *
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;
36
 *
37
 * The above copyright and patent license is granted only if the following
38
 * conditions are met:
39
 *
40
 * 3. Conditions
41
 *
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.
53
 *
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
64
 * make.
65
 *
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
70
 * distribution.
71
 *
72
 * 3.4. Intel retains all right, title, and interest in and to the Original
73
 * Intel Code.
74
 *
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.
79
 *
80
 * 4. Disclaimer and Export Compliance
81
 *
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
88
 * PARTICULAR PURPOSE.
89
 *
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
97
 * LIMITED REMEDY.
98
 *
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.
113
 *
114
 *****************************************************************************/
115
116
 
117
 
118
#include "aslcompiler.y.h"
119
120
 
121
        ACPI_MODULE_NAME    ("aslrestype2w")
122
123
 
124
 * This module contains the Word (16-bit) address space descriptors:
125
 *
126
 * WordIO
127
 * WordMemory
128
 * WordSpace
129
 */
130
131
 
132
 *
133
 * FUNCTION:    RsDoWordIoDescriptor
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 long "WordIO" descriptor
142
 *
143
 ******************************************************************************/
144
145
 
146
RsDoWordIoDescriptor (
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
    ACPI_PARSE_OBJECT       *GranOp = NULL;
156
    ASL_RESOURCE_NODE       *Rnode;
157
    UINT8                   *OptionalFields;
158
    UINT16                  StringLength = 0;
159
    UINT32                  OptionIndex = 0;
160
    UINT32                  i;
161
    BOOLEAN                 ResSourceIndex = FALSE;
162
163
 
164
 
165
    StringLength = RsGetStringDataLength (InitializerOp);
166
167
 
168
                sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
169
170
 
171
    Descriptor->Address16.DescriptorType  = ACPI_RESOURCE_NAME_ADDRESS16;
172
    Descriptor->Address16.ResourceType    = ACPI_ADDRESS_TYPE_IO_RANGE;
173
174
 
175
     * Initial descriptor length -- may be enlarged if there are
176
     * optional fields present
177
     */
178
    OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
179
    Descriptor->Address16.ResourceLength = (UINT16)
180
        (sizeof (AML_RESOURCE_ADDRESS16) -
181
         sizeof (AML_RESOURCE_LARGE_HEADER));
182
183
 
184
185
 
186
    {
187
        switch (i)
188
        {
189
        case 0: /* Resource Usage */
190
191
 
192
            break;
193
194
 
195
196
 
197
            RsCreateBitField (InitializerOp, ACPI_RESTAG_MINTYPE,
198
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Flags), 2);
199
            break;
200
201
 
202
203
 
204
            RsCreateBitField (InitializerOp, ACPI_RESTAG_MAXTYPE,
205
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Flags), 3);
206
            break;
207
208
 
209
210
 
211
            RsCreateBitField (InitializerOp, ACPI_RESTAG_DECODE,
212
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Flags), 1);
213
            break;
214
215
 
216
217
 
218
            RsCreateBitField (InitializerOp, ACPI_RESTAG_RANGETYPE,
219
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.SpecificFlags), 0);
220
            break;
221
222
 
223
224
 
225
            RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
226
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
227
            GranOp = InitializerOp;
228
            break;
229
230
 
231
232
 
233
            RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
234
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
235
            MinOp = InitializerOp;
236
            break;
237
238
 
239
240
 
241
            RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
242
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
243
            MaxOp = InitializerOp;
244
            break;
245
246
 
247
248
 
249
            RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
250
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
251
            break;
252
253
 
254
255
 
256
            RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
257
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
258
            LengthOp = InitializerOp;
259
            break;
260
261
 
262
263
 
264
            {
265
                OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
266
                OptionIndex++;
267
                Descriptor->Address16.ResourceLength++;
268
                ResSourceIndex = TRUE;
269
            }
270
            break;
271
272
 
273
274
 
275
                (InitializerOp->Asl.Value.String))
276
            {
277
                if (StringLength)
278
                {
279
                    Descriptor->Address16.ResourceLength = (UINT16)
280
                        (Descriptor->Address16.ResourceLength + StringLength);
281
282
 
283
                        &OptionalFields[OptionIndex],
284
                        InitializerOp->Asl.Value.String);
285
286
 
287
288
 
289
                    {
290
                        AslError (ASL_ERROR, ASL_MSG_RESOURCE_INDEX,
291
                            InitializerOp, NULL);
292
                    }
293
                }
294
            }
295
296
 
297
            /*
298
             * Not a valid ResourceSource, ResourceSourceIndex must also
299
             * be invalid
300
             */
301
            else if (ResSourceIndex)
302
            {
303
                AslError (ASL_ERROR, ASL_MSG_RESOURCE_SOURCE,
304
                    InitializerOp, NULL);
305
            }
306
#endif
307
            break;
308
309
 
310
311
 
312
            break;
313
314
 
315
316
 
317
            RsCreateBitField (InitializerOp, ACPI_RESTAG_TYPE,
318
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.SpecificFlags), 4);
319
            break;
320
321
 
322
323
 
324
            RsCreateBitField (InitializerOp, ACPI_RESTAG_TRANSTYPE,
325
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.SpecificFlags), 5);
326
            break;
327
328
 
329
330
 
331
            break;
332
        }
333
334
 
335
    }
336
337
 
338
339
 
340
        (UINT64) Descriptor->Address16.Minimum,
2216 Serge 341
        (UINT64) Descriptor->Address16.Maximum,
342
        (UINT64) Descriptor->Address16.AddressLength,
343
        (UINT64) Descriptor->Address16.Granularity,
344
        Descriptor->Address16.Flags,
1498 serge 345
        MinOp, MaxOp, LengthOp, GranOp, Op);
2216 Serge 346
1498 serge 347
 
348
                            OptionIndex + StringLength;
349
    return (Rnode);
350
}
351
352
 
353
 
354
 *
355
 * FUNCTION:    RsDoWordBusNumberDescriptor
356
 *
357
 * PARAMETERS:  Op                  - Parent resource descriptor parse node
358
 *              CurrentByteOffset   - Offset into the resource template AML
359
 *                                    buffer (to track references to the desc)
360
 *
361
 * RETURN:      Completed resource node
362
 *
363
 * DESCRIPTION: Construct a long "WordBusNumber" descriptor
364
 *
365
 ******************************************************************************/
366
367
 
368
RsDoWordBusNumberDescriptor (
369
    ACPI_PARSE_OBJECT       *Op,
370
    UINT32                  CurrentByteOffset)
371
{
372
    AML_RESOURCE            *Descriptor;
373
    ACPI_PARSE_OBJECT       *InitializerOp;
374
    ACPI_PARSE_OBJECT       *MinOp = NULL;
375
    ACPI_PARSE_OBJECT       *MaxOp = NULL;
376
    ACPI_PARSE_OBJECT       *LengthOp = NULL;
377
    ACPI_PARSE_OBJECT       *GranOp = NULL;
378
    ASL_RESOURCE_NODE       *Rnode;
379
    UINT8                   *OptionalFields;
380
    UINT16                  StringLength = 0;
381
    UINT32                  OptionIndex = 0;
382
    UINT32                  i;
383
    BOOLEAN                 ResSourceIndex = FALSE;
384
385
 
386
 
387
    StringLength = RsGetStringDataLength (InitializerOp);
388
389
 
390
                sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
391
392
 
393
    Descriptor->Address16.DescriptorType  = ACPI_RESOURCE_NAME_ADDRESS16;
394
    Descriptor->Address16.ResourceType    = ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE;
395
396
 
397
     * Initial descriptor length -- may be enlarged if there are
398
     * optional fields present
399
     */
400
    OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
401
    Descriptor->Address16.ResourceLength = (UINT16)
402
        (sizeof (AML_RESOURCE_ADDRESS16) -
403
         sizeof (AML_RESOURCE_LARGE_HEADER));
404
405
 
406
407
 
408
    {
409
        switch (i)
410
        {
411
        case 0: /* Resource Usage */
412
413
 
414
            break;
415
416
 
417
418
 
419
            RsCreateBitField (InitializerOp, ACPI_RESTAG_MINTYPE,
420
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Flags), 2);
421
            break;
422
423
 
424
425
 
426
            RsCreateBitField (InitializerOp, ACPI_RESTAG_MAXTYPE,
427
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Flags), 3);
428
            break;
429
430
 
431
432
 
433
            RsCreateBitField (InitializerOp, ACPI_RESTAG_DECODE,
434
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Flags), 1);
435
            break;
436
437
 
438
439
 
440
                (UINT16) InitializerOp->Asl.Value.Integer;
441
            RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
442
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
443
            GranOp = InitializerOp;
444
            break;
445
446
 
447
448
 
449
                (UINT16) InitializerOp->Asl.Value.Integer;
450
            RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
451
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
452
            MinOp = InitializerOp;
453
            break;
454
455
 
456
457
 
458
                (UINT16) InitializerOp->Asl.Value.Integer;
459
            RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
460
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
461
            MaxOp = InitializerOp;
462
            break;
463
464
 
465
466
 
467
                (UINT16) InitializerOp->Asl.Value.Integer;
468
            RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
469
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
470
            break;
471
472
 
473
474
 
475
                (UINT16) InitializerOp->Asl.Value.Integer;
476
            RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
477
                 CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
478
            LengthOp = InitializerOp;
479
            break;
480
481
 
482
483
 
484
            {
485
                OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
486
                OptionIndex++;
487
                Descriptor->Address16.ResourceLength++;
488
                ResSourceIndex = TRUE;
489
            }
490
            break;
491
492
 
493
494
 
495
                (InitializerOp->Asl.Value.String))
496
            {
497
                if (StringLength)
498
                {
499
                    Descriptor->Address16.ResourceLength = (UINT16)
500
                        (Descriptor->Address16.ResourceLength + StringLength);
501
502
 
503
                        &OptionalFields[OptionIndex],
504
                        InitializerOp->Asl.Value.String);
505
506
 
507
508
 
509
                    {
510
                        AslError (ASL_ERROR, ASL_MSG_RESOURCE_INDEX,
511
                            InitializerOp, NULL);
512
                    }
513
                }
514
            }
515
516
 
517
            /*
518
             * Not a valid ResourceSource, ResourceSourceIndex must also
519
             * be invalid
520
             */
521
            else if (ResSourceIndex)
522
            {
523
                AslError (ASL_ERROR, ASL_MSG_RESOURCE_SOURCE,
524
                    InitializerOp, NULL);
525
            }
526
#endif
527
            break;
528
529
 
530
531
 
532
            break;
533
534
 
535
536
 
537
            break;
538
        }
539
540
 
541
    }
542
543
 
544
545
 
546
        (UINT64) Descriptor->Address16.Minimum,
2216 Serge 547
        (UINT64) Descriptor->Address16.Maximum,
548
        (UINT64) Descriptor->Address16.AddressLength,
549
        (UINT64) Descriptor->Address16.Granularity,
550
        Descriptor->Address16.Flags,
1498 serge 551
        MinOp, MaxOp, LengthOp, GranOp, Op);
2216 Serge 552
1498 serge 553
 
554
                            OptionIndex + StringLength;
555
    return (Rnode);
556
}
557
558
 
559
 
560
 *
561
 * FUNCTION:    RsDoWordSpaceDescriptor
562
 *
563
 * PARAMETERS:  Op                  - Parent resource descriptor parse node
564
 *              CurrentByteOffset   - Offset into the resource template AML
565
 *                                    buffer (to track references to the desc)
566
 *
567
 * RETURN:      Completed resource node
568
 *
569
 * DESCRIPTION: Construct a long "WordSpace" descriptor
570
 *
571
 ******************************************************************************/
572
573
 
574
RsDoWordSpaceDescriptor (
575
    ACPI_PARSE_OBJECT       *Op,
576
    UINT32                  CurrentByteOffset)
577
{
578
    AML_RESOURCE            *Descriptor;
579
    ACPI_PARSE_OBJECT       *InitializerOp;
580
    ACPI_PARSE_OBJECT       *MinOp = NULL;
581
    ACPI_PARSE_OBJECT       *MaxOp = NULL;
582
    ACPI_PARSE_OBJECT       *LengthOp = NULL;
583
    ACPI_PARSE_OBJECT       *GranOp = NULL;
584
    ASL_RESOURCE_NODE       *Rnode;
585
    UINT8                   *OptionalFields;
586
    UINT16                  StringLength = 0;
587
    UINT32                  OptionIndex = 0;
588
    UINT32                  i;
589
    BOOLEAN                 ResSourceIndex = FALSE;
590
591
 
592
 
593
    StringLength = RsGetStringDataLength (InitializerOp);
594
595
 
596
                sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
597
598
 
599
    Descriptor->Address16.DescriptorType  = ACPI_RESOURCE_NAME_ADDRESS16;
600
601
 
602
     * Initial descriptor length -- may be enlarged if there are
603
     * optional fields present
604
     */
605
    OptionalFields = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_ADDRESS16);
606
    Descriptor->Address16.ResourceLength = (UINT16)
607
        (sizeof (AML_RESOURCE_ADDRESS16) -
608
         sizeof (AML_RESOURCE_LARGE_HEADER));
609
610
 
611
612
 
613
    {
614
        switch (i)
615
        {
616
        case 0: /* Resource Type */
617
618
 
619
                (UINT8) InitializerOp->Asl.Value.Integer;
620
            break;
621
622
 
623
624
 
625
            break;
626
627
 
628
629
 
630
            RsCreateBitField (InitializerOp, ACPI_RESTAG_DECODE,
631
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Flags), 1);
632
            break;
633
634
 
635
636
 
637
            RsCreateBitField (InitializerOp, ACPI_RESTAG_MINTYPE,
638
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Flags), 2);
639
            break;
640
641
 
642
643
 
644
            RsCreateBitField (InitializerOp, ACPI_RESTAG_MAXTYPE,
645
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Flags), 3);
646
            break;
647
648
 
649
650
 
651
                (UINT8) InitializerOp->Asl.Value.Integer;
652
            break;
653
654
 
655
656
 
657
                (UINT16) InitializerOp->Asl.Value.Integer;
658
            RsCreateByteField (InitializerOp, ACPI_RESTAG_GRANULARITY,
659
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Granularity));
660
            GranOp = InitializerOp;
661
            break;
662
663
 
664
665
 
666
                (UINT16) InitializerOp->Asl.Value.Integer;
667
            RsCreateByteField (InitializerOp, ACPI_RESTAG_MINADDR,
668
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Minimum));
669
            MinOp = InitializerOp;
670
            break;
671
672
 
673
674
 
675
                (UINT16) InitializerOp->Asl.Value.Integer;
676
            RsCreateByteField (InitializerOp, ACPI_RESTAG_MAXADDR,
677
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.Maximum));
678
            MaxOp = InitializerOp;
679
            break;
680
681
 
682
683
 
684
                (UINT16) InitializerOp->Asl.Value.Integer;
685
            RsCreateByteField (InitializerOp, ACPI_RESTAG_TRANSLATION,
686
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.TranslationOffset));
687
            break;
688
689
 
690
691
 
692
                (UINT16) InitializerOp->Asl.Value.Integer;
693
            RsCreateByteField (InitializerOp, ACPI_RESTAG_LENGTH,
694
                CurrentByteOffset + ASL_RESDESC_OFFSET (Address16.AddressLength));
695
            LengthOp = InitializerOp;
696
            break;
697
698
 
699
700
 
701
            {
702
                OptionalFields[0] = (UINT8) InitializerOp->Asl.Value.Integer;
703
                OptionIndex++;
704
                Descriptor->Address16.ResourceLength++;
705
                ResSourceIndex = TRUE;
706
            }
707
            break;
708
709
 
710
711
 
712
                (InitializerOp->Asl.Value.String))
713
            {
714
                if (StringLength)
715
                {
716
                    Descriptor->Address16.ResourceLength = (UINT16)
717
                        (Descriptor->Address16.ResourceLength + StringLength);
718
719
 
720
                        &OptionalFields[OptionIndex],
721
                        InitializerOp->Asl.Value.String);
722
723
 
724
725
 
726
                    {
727
                        AslError (ASL_ERROR, ASL_MSG_RESOURCE_INDEX,
728
                            InitializerOp, NULL);
729
                    }
730
                }
731
            }
732
733
 
734
            /*
735
             * Not a valid ResourceSource, ResourceSourceIndex must also
736
             * be invalid
737
             */
738
            else if (ResSourceIndex)
739
            {
740
                AslError (ASL_ERROR, ASL_MSG_RESOURCE_SOURCE,
741
                    InitializerOp, NULL);
742
            }
743
#endif
744
            break;
745
746
 
747
748
 
749
            break;
750
751
 
752
753
 
754
            break;
755
        }
756
757
 
758
    }
759
760
 
761
762
 
763
        (UINT64) Descriptor->Address16.Minimum,
2216 Serge 764
        (UINT64) Descriptor->Address16.Maximum,
765
        (UINT64) Descriptor->Address16.AddressLength,
766
        (UINT64) Descriptor->Address16.Granularity,
767
        Descriptor->Address16.Flags,
1498 serge 768
        MinOp, MaxOp, LengthOp, GranOp, Op);
2216 Serge 769
1498 serge 770
 
771
                            OptionIndex + StringLength;
772
    return (Rnode);
773
}
774