• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/lib/acpica/tests/aslts/src/runtime/collections/functional/reference/
1
2     Specification of test of the Object and Index References
3     and the call-by-reference convention.
4
5
6The test verifies most of the relevant important
7cases and combinations but not all.
8
9The layout of test specification:
10
11  The first sentence of each sub-test (say test) specification
12  contains the main purpose of the test and is the most
13  strict part of its specification. The additional
14  infortmation of the test specification are more or
15  less up to date and contains some reflections about
16  the test, they may contain even incorrect or obsolete
17  information, they may be ignored in the actual
18  implementation of the tests.
19
20  We dont delete the specifications of the incorrect
21  tests in order not to attempt to specify them again
22  in the future.
23
24  Some purposes of the tests dont contain the
25  specification of the expected normal behaviour of
26  the feature under testing. This takes place when the
27  ACPI specification doesnt assert anything definitely
28  on that or when an additional investigation involving
29  the BlackBox are needed.
30
31FEATURE:
32
33  The FEATURE entry of test designates briefly the contents
34  of sub-test (test), shows the main purpose of the test and
35  thus serve to avoid specifying the same test repeatedly and
36  simplifies to see the summary coverage of all sub-tests.
37
38  Nevertheless, we dont exclude that some assertions
39  are verified several times in different sub-tests.
40
41  Some actions really verified in test might not be shown
42  in FEATURE, though we were aimed to reflect that.
43
44For improving these specs:
45
46  1) see the text references inserted through the specs below on
47     appropriateness of them and may be remove them at all or catch
48     them here at the top or..
49
50ACPI sections and terms involved:
51
52  5.5.2.3  Method Calling Convention
53
54    Call-by-reference convention
55
56  17.2.5.8   Rules for Storing and Copying Objects
57
58    Table 17-9   Object Storing and Copying Rules
59
60  17.2.5.9   Rules for Reading and Writing Objects
61
62    17.2.5.9.1 ArgX Objects
63    17.2.5.9.2 LocalX Objects
64    17.2.5.9.3 Named Objects
65
66  Operators involved:
67
68    RefOf, CondRefOf, Index, DerefOf,
69    Method, Return,
70    ArgX, LocalX, NamedX,
71    String, Buffer, Package,
72    ObjectType, SizeOf, Alias,
73    Field, IndexField, BankField, CreateField
74
75Note: the implicit conversion of result is verified in the
76      Complex Test of Result, but not verified here.
77
78Note: the {type,size,value} features of the references to all
79      type obects passed to Method (call-by-reference convention)
80      is verified by the (TEST_00.2) entry.
81
82Note: check in tests all the ways of keeping and passing (delivering)
83      References and Objects. Keep into mind while implementing the
84      tests (this may not be mentioned explicitly) that very important
85      is how the object is represented in operation:
86
87      - specify (Object or Reference) immediately
88      - pass them by LocalX
89      - pass by ArgX (intermediate keeping)
90      - pass by NamedX
91      - pass by the element of Package
92      - pass by the Method call (return value)
93      - pass as results of other operators
94
95Note: Field Unit and Buffer Field types passed to Method
96      are being converted to the Integer/Buffer.
97      Use BlackBox for to confirm this feature of Field Unit
98      and Buffer Field.
99
100Improve implementation of tests:
101
102 1) the tests (sub-tests) specified below may currently be
103    implemented not completely - specification of test may be
104    more wide than the provided implementation of it. So, the
105    ways of improving the tests are implementing the specified
106    write/read operations for all the specified in test types
107    of WRITE/READ operators; implement the specified checkings
108    for all the specified in test types of DATA.
109
110 2) add different type of name references: \x.x.x, ^x.
111
112 3) the tests are mostly implemented for Arg0 and Local0.
113    Extend them for Arg{1-6} and Local{1-7} too.
114
115 4) improve FEATURE entries: the way of improving the test is
116    analysing the implemented sub-tests desribing them more exactly
117    by FEATURE entries and then examining the summary coverage of
118    sub-tests basing on the FEATURE entries of them propose the
119    additional sub-tests.
120
121 5) do additional sub-tests for all the situations which you can
122    think (propose) incorrect implementation.
123
124Global variables assignment applied in the tests:
125
126   c080 - name of test
127   c081 - absolute index of file initiating the checking
128   c082 - flag of test of exceptions
129   c083 - run verification of references (write/read):
130          1 - Store
131          2 - CopyObject
132          3 - both Store and CopyObject
133   c084 - run verification of references (reading)
134   c085 - create the chain of references to LocalX, then dereference them
135   c086 - flag, run test till the first error
136   c087 - apply DeRefOf to ArgX-ObjectReference (but not rely
137          on the automatic dereference):
138          17.2.5.9.1   ArgX Objects
139             1) Read from ArgX parameters
140                ObjectReference - Automatic dereference, return
141                                  the target of the reference.
142                                  Use of DeRefOf returns the same.
143   c088 - test run mode; if non-zero, then run the entire tests,
144          but not only the simple example of test
145   c089 - flag of Reference, object otherwise
146   c08a - the value of the written Integer
147   c08b - do RefOf(ArgX) checkings
148          1 - RefOf
149          2 - CondRefOf
150
151Notation:
152
153   Read,
154   READ_OPERATOR,
155   Read operation       - any access to the object which assumes evaluating
156                          the object
157   Write,
158   WRITE_OPERATOR,
159   Write operation      - designates all the ASL Operators which write results
160
161   ORef                 - the reference obtained by RefOf or CondRefOf
162                          (Object Reference)
163   IRef                 - the reference obtained by Index
164                          (Index Reference)
165
166   ORef-LocalX          - ORef assigned to LocalX
167   IRef-LocalX          - IRef assigned to LocalX
168   ORef-NamedX          - ORef assigned to NamedX
169   IRef-NamedX          - IRef assigned to NamedX
170   ORef-El_of_Package   - ORef assigned to element of Package
171   IRef-El_of_Package   - IRef assigned to element of Package
172   ORef-ArgX            - ORef assigned to ArgX
173   IRef-ArgX            - IRef assigned to ArgX
174
175                          Arguments of Method
176
177   ArgX-Object          - any type Object passed to Method by ArgX
178   ArgX-<type>          - <type> type Object passed to Method by ArgX
179   ArgX-ORef            - ORef passed to Method by ArgX
180   ArgX-IRef            - IRef passed to Method by ArgX
181
182   RefOf                - means both RefOf and CondRefOf operators
183
184   M0                   - start Method of test
185   M1,M2...             - Methods invoked from M0
186   M1-M2-M3             - the chain of invokations of Methods (started from M0)
187
188
189
190=========
191* TEST 00  (description referred to in other test specifications,
192          not applied as a particular test itself).
193=========
194
195
1961. Pass Method with the following:
197
198   a) Constants: types {1-16}
199   b) ArgX {0-6}
200   c) LocalX {0-7}
201   d) Named: types {1-16}
202   e) Immediate result of other operators
203   f) Immediate result of some Method
204   g) Immediate element of Package
205
206   Pass each of the ArgX of invoked Method
207   with each of the {a,b,c,d,e,f,g} values above.
208
209   In cases {b,c} the contents of {ArgX,LocalX}
210   should be each of types {1-16}.
211
2122. Check inside the Method that {types,values,size}
213   of the passed values are as expected.
214
2153. For all the ASL Operators which write results
216   direct the results into ArgX(s) of that Method.
217
2184. Check inside the Method that the types of ArgX(s)
219   after writing into them are as expected.
220
2215. After completion of the Method call, returning
222   from it, check that the original objects are not
223   changed {type,size,value}.
224
225SPEC:
226
22717.2.5.9.1   ArgX Objects
228
2291) Read from ArgX parameters
230   ObjectReference - Automatic dereference, return
231                     the target of the reference.
232                     Use of DeRefOf returns the same.
233
234
235==========
236* TEST 01: Read of ArgX-ORef with DerefOf
237==========
238
239
240SPEC: "Use of DeRefOf returns the same" as "automatic dereference"
241
242Do the same as in test TEST 00 (b,c,d), but before passing
243the objects to Method (M1) make references to them by RefOf
244and pass those References to Method (M1) but not Objects themselves.
245
246Before read operations do one DerefOf of the relevant ArgX.
247
248Read operations are any access (as an operand of any operator)
249to the contents of the object referenced by ArgX-ORef.
250
251Omit all the write operations to ArgX inside the invoked Method.
252
253FEATURE: ArgX-ORef:DerefOf:read
254
255
256==========
257* TEST 02: Read of ArgX-ORef without DerefOf (automatic dereference)
258==========
259
260
261FEATURE: ArgX-ORef:(NO DerefOf):read
262
263SPEC: "automatic dereference"
264
265Do the same as in test TEST 01, but omit DerefOf of the relevant ArgX.
266
267
268==========
269* TEST 03: Read of ArgX-IRef with DerefOf
270==========
271
272
273SPEC: "Use of DeRefOf returns the same" as "automatic dereference"
274
275Do the same as in test TEST 01, but for IRef.
276
277WARNING:
278
279The specification of DerefOf (see below) sounds incorrectly,
280because it works not only with Object Reference (ORef)
281but with IRef as well.
282
283  17.5.27 DerefOf (Dereference an Object Reference)
284
285  If the Source evaluates to an object reference, the actual
286  contents of the object referred to are returned.
287
288FEATURE: ArgX-IRef:DerefOf:read
289
290
291==========
292* TEST 04: Read of ArgX-IRef without DerefOf (automatic dereference)
293==========
294
295
296SPEC: "automatic dereference"
297Do the same as in test TEST 03, but omit DerefOf of the relevant ArgX.
298FEATURE: ArgX-IRef:(NO DerefOf):read
299
300
301==========
302* TEST 05: Write into ArgX-Object
303==========
304
305
306Check that writing into ArgX-Object doesn't change the original objects
307passed to Method {type,size,value}.
308Actions differ the test TEST 01 only with the writing being performed.
309Do all the {1-5} items of TEST 00.
310FEATURE: ArgX-Object:write
311
312
313==========
314* TEST 06: Write into ArgX-ORef
315==========
316
317
318Check that writing into ArgX-ORef
319do change of the original objects {type,size,value}.
320
321Do the same as in test TEST 00 (b,c,d), but before passing
322the objects to Method (M1) make references to them by RefOf
323and pass those References to Method (M1) but not Objects themselves.
324
325Check that the original objects are changed {type,size,value}.
326FEATURE: ArgX-ORef:write
327
328
329==========
330* TEST 07: Write into ArgX-IRef
331==========
332
333
334Check the writing into ArgX-IRef
335(IRef to elements of String, Buffer and Package).
336
337Note (current implementation):
338  (ORef & IRef)
339
340  ArgX-IRef require applying of DerefOf,
341  though DerefOf is specified only for ORef.
342  But, attempts to write into ArgX-IRef fail.
343
3441. Pass Method with the following:
345
346Name(s000, "qwertyuiop")
347Name(b000, Buffer() {1,2,3,4,5,6,7,8,9})
348Name(p000, Package() {10,11,12,13,14,15,16})
349
350Store(Index(s000, 0, Local0), Local1)
351m000(Local0)
352m000(Local1)
353m000(Index(s000, 0, Local0))
354
355Store(Index(b000, 0, Local0), Local1)
356m000(Local0)
357m000(Local1)
358m000(Index(b000, 0, Local0))
359
360Store(Index(p000, 0, Local0), Local1)
361m000(Local0)
362m000(Local1)
363m000(Index(p000, 0, Local0))
364
365Note: use there (and everywhere else) these forms too:
366
367Store(Index(b000, 0), Local1)
368m000(Index(p000, 0))
369
370Do the same actions as in the TEST 00.
371
3725. After completion of the Method call, returning
373   from it, check the original objects {type,size,value}.
374   Use BlackBox for to clarify ACPI specification.
375
376FEATURE: ArgX-IRef:write
377
378
379==========
380* TEST 08: Write into IRef to ArgX-String-Buffer-Package obtained in Method
381==========
382
383
384Check the writing into IRef obtained inside the Method (M1)
385to the elements of the objects passed to it as parameters (ArgX-String,
386ArgX-Buffer, ArgX-Package).
387
388Note (current implementation):
389  (ORef & IRef)
390
391  IRef obtained inside the Method
392  allows to change the original object passed by ArgX.
393  But, there is no way to obtain ORef to the
394  original object and change that original object by
395  writing into reference (see RefOf tests below).
396
3971. Pass Method with the following:
398
399Name(s000, "qwertyuiop")
400Name(b000, Buffer() {1,2,3,4,5,6,7,8,9})
401Name(p000, Package() {10,11,12,13,14,15,16})
402
403m000(s000)
404m000(b000)
405m000(p000)
406
407m000("qwertyuiop")
408m000(Buffer(n){})
409m000(Package(n){})
410
411Do the same actions as in the TEST 00.
412
4133. Obtain the reference to the element of Object
414   passed by ArgX:
415
416      Store(Index(ArgX, 0, Local0), Local1)
417      Index(ArgX, 0)
418
419   and pass it to writing operators as a target reference
420   for all the ASL Operators which write results, like these:
421
422      Store(0x55555, Local0)
423      Store(0x66666, Local1)
424      Store(0x77777, Index(arg0, 0))
425
4265. After completion of the Method call, returning
427   from it, check the original objects {type,size,value}.
428   Use BlackBox for to clarify ACPI specification.
429
430FEATURE: ArgX-String:Index:IRef:write
431FEATURE: ArgX-Buffer:Index:IRef:write
432FEATURE: ArgX-Package:Index:IRef:write
433
434
435==========
436* TEST 09  (no test): Write into FieldUnit of ArgX-OperationRegion obtained in Method
437==========
438
439
440Check the writing into the Field Unit obtained inside the Method (M1)
441to the OperationRegion passed to it as a parameter.
442
443INCORRECT: ASL-gramaticaly incorrect, the test is omitted.
444           Field(arg0, ...) {}
445
446Note: Field Unit passed to Method converts to Integer/Buffer
447      (see the test in complex/misc.asl) thus not requires the
448      test where Field Unit is passed as a parameter.
449      See: Use BlackBox for to confirm this feature of Field Unit.
450
4511. Pass Method with the following:
452
453OperationRegion(r900, SystemMemory, 0x100, 0x100)
454
455m000(r900)
456
4573. Obtain the Field Unit to the OperationRegion passed by ArgX:
458
459   Field(ArgX, ByteAcc, NoLock, Preserve) {f900,8,f901,8,f902,8,f903,8}
460   BankField(ArgX, f901, 0, ByteAcc, NoLock, Preserve) {bn90,4}
461   IndexField(f902, f903, ByteAcc, NoLock, Preserve) {if90,8,if91,8}
462
463   and pass it to writing operators as a target reference
464   for all the ASL Operators which write results.
465
4665. After completion of the Method call, returning
467   from it, check the original objects {value}.
468   Use BlackBox for to clarify ACPI specification.
469
470FEATURE: ArgX-OperationRegion:Field:FieldUnit:write
471
472
473==========
474* TEST 10: Write into BufferField of ArgX-Buffer obtained in Method
475==========
476
477
478Check the writing into the Buffer Field obtained inside the Method (M1)
479to the ArgX-Buffer passed to it as a parameter.
480
481Note: Buffer Field passed to Method converts to Integer/Buffer
482      (see the test in complex/misc.asl) thus not requires the
483      test where Buffer Field is passed as a parameter.
484      See: Use BlackBox for to confirm this feature of Buffer Field.
485
4861. Pass Method with the following:
487
488Name(b000, Buffer() {1,2,3,4,5,6,7,8,9})
489
490m000(b000)
491
492Do the same actions as in the TEST 00.
493
4943. Obtain the Buffer Field to the Buffer passed by ArgX:
495
496   CreateField(ArgX, 0, 8, bf90)
497
498   and pass it to writing operators as a target reference
499   for all the ASL Operators which write results.
500
5015. After completion of the Method call, returning
502   from it, check the original objects {value}.
503   Use BlackBox for to clarify ACPI specification.
504
505FEATURE: ArgX-Buffer:CreateField:BufferField:write
506
507
508SPEC:
509
51017.2.5.9.1   ArgX Objects
511
5121) Read from ArgX parameters
513   Buffer  � ... can create an Index, Field, or Reference to the buffer.
514   Package � ... can create an Index or Reference to the package.
515
516But why don't to create References to all other object types.
517
518Check RefOf of ArgX passed to Method.
519
520
521==========
522* TEST 11: RefOf(ArgX-Object)
523==========
524
525
526Check RefOf of ArgX-Object (ArgX is any type Object).
527
528Start Method (M0) the same as the TEST 00, but inside the invoked Method
529(M1), do RefOf to the ArgX containing the OBJECT. Verify the
530obtained ORef (ObjectType, SizeOf, DerefOf, value).
531
532Write into the obtained ORef and verify result
533(use immediate, ArgX, LocalX and NamedX ways delivering reference
534to the writing operator).
535
536Pass the result of RefOf to another Method (M2) for
537the following calculations as in the original test TEST 00.
538Check that the data refered to by ArgX of (M1) are changed {type,size,value}.
539Check that the original objects (M0) are not changed {type,size,value}.
540
541M0 {Object} --> M1 {RefOf(ArgX);write} --> M2 {write(ArgX)}
542    ^ Unchanged           ^ Changed
543
544Check that M1-LocalX-ORef remains up to date
545after writing into M2-ArgX in M2 and thus updating the
546contents of the object referenced by M1-LocalX.
547
548FEATURE: ArgX-Object:RefOf:ORef:write:read
549FEATURE: ArgX-Object:RefOf:ORef:M2:write:read
550
551
552==========
553* TEST 12: DerefOf(RefOf(ArgX-Object))
554==========
555
556
557Check DerefOf(RefOf) of ArgX-Object (ArgX is any type Object)
558
559FEATURE: ArgX-Object:RefOf:ORef:DerefOf
560
561
562==========
563* TEST 13: RefOf(ArgX-ORef)
564==========
565
566
567Check RefOf of ArgX-ORef.
568
569The same as the TEST 06, but at first do RefOf to the ArgX
570containing the ORef to Object (M1), then pass the result
571of RefOf to another Method (M2) for the following calculations
572as in the original test.
573
574Actions similar to TEST 11.
575
576FEATURE: ArgX-ORef:RefOf:ORef:write:read
577FEATURE: ArgX-ORef:RefOf:ORef:M2:write:read
578
579
580==========
581* TEST 14: DerefOf(RefOf(ArgX-ORef))
582==========
583
584
585Check DerefOf(RefOf) of ArgX-ORef
586FEATURE: ArgX-ORef:RefOf:ORef:DerefOf
587
588
589==========
590* TEST 15: RefOf(ArgX-IRef)
591==========
592
593
594Check RefOf of ArgX-IRef.
595
596The same as the TEST 07, but at first do RefOf to the ArgX
597containing the IRef to Object (M1), then pass the result
598of RefOf to another Method (M2) for the following calculations
599as in the original test.
600
601FEATURE: ArgX-IRef:RefOf:ORef:write:read
602FEATURE: ArgX-IRef:RefOf:ORef:M2:write:read
603
604
605==========
606* TEST 16: DerefOf(RefOf(ArgX-IRef))
607==========
608
609
610Check DerefOf(RefOf) of ArgX-IRef
611FEATURE: ArgX-IRef:RefOf:ORef:DerefOf
612
613
614==========
615* TEST 17: RefOf(ArgX-String-Buffer-Package), check IRef
616==========
617
618
619Check RefOf of ArgX-String, ArgX-Buffer, ArgX-Package
620(check IRef).
621
622The same as the TEST 08, but at first do RefOf to the ArgX
623containing the (String/Buffer/Package) (M1), then pass the result
624of RefOf to another Method (M2) for the following calculations
625as in the original test.
626
627FEATURE: ArgX-String:RefOf:ORef:Index:IRef:write
628FEATURE: ArgX-Buffer:RefOf:ORef:Index:IRef:write
629FEATURE: ArgX-Package:RefOf:ORef:Index:IRef:write
630
631
632==========
633* TEST 18: RefOf(ArgX-OperationRegion), check FieldUnit
634==========
635
636
637Check RefOf of ArgX-OperationRegion
638(check Field Unit based on that OperationRegion).
639
640INCORRECT: ASL-gramaticaly incorrect, the test is omitted.
641           Field(DerefOf(arg0), ...) {}
642           Field(Local0, ...) {}
643           Field(arg0, ...) {}
644
645The same as the TEST 09, but at first do RefOf to the
646ArgX containing the OperationRegion (M1), then pass the result of
647RefOf to another Method (M2) for the following calculations
648as in the original test.
649
650FEATURE: ArgX-OperationRegion:RefOf:ORef:DerefOf:Field:FieldUnit:write
651FEATURE: ArgX-OperationRegion:RefOf:ORef:M2:DerefOf:Field:FieldUnit:write
652
653
654==========
655* TEST 19: RefOf(ArgX-Buffer), check BufferField
656==========
657
658
659Check RefOf of ArgX-Buffer
660(check Buffer Field based on that Buffer).
661
662The same as the TEST 10, but at first do RefOf to the ArgX
663containing the Buffer (M1), then pass the result of RefOf
664to another Method (M2) for the following calculations as in the
665original test.
666
667FEATURE: ArgX-Buffer:RefOf:ORef:CreateField:BufferField:write
668
669==========
670* TEST XX: ArgX-ORef on place of ArgY
671==========
672
673Check ArgX-ORef on the another than actually passed place (ArgY)
674(transfer ArgX to ArgY and run the TEST 06)
675
676FEATURE: ArgX-ORef:write_into_ArgY:write
677
678INCORRECT: not quite correct, because there is no way to
679           "transfer" ArgX-Reference from ArgX to ArgY.
680           In fact, the object assosiated with ArgX-Reference
681           is copied into ArgY or into the Object associated with
682           ArgY in ArgY-Reference case for any ASL-operation.
683
684           So, the test is transformed into another one (see below).
685
686The same as the TEST 06, but at first write ORef passed
687by Arg0 into Arg1 and then do all the read/write actions with Arg1
688(but not with Arg0).
689
690Method(m000, 2)
691{
692      Store(Arg0,Arg1)
693      CopyObject(Arg0,Arg1)
694      ...
695      Read/Write with Arg1 only
696}
697Method(m001, 2)
698{
699      Store(Arg0,Arg1)
700      CopyObject(Arg0,Arg1)
701      ...
702      Read/Write with Arg1 only
703}
704Store(RefOf(X000), Local0)
705m000(Local0,0)
706m000(RefOf(X000),0)
707...
708Check the value of X000, Y000 and Local0.
709
710Store(RefOf(X000), Local0)
711m001(Local0,0)
712m001(RefOf(X000),0)
713...
714Check the value of X000, Y000 and Local0.
715
716Do the same actions as in the TEST 00.
717
7185. After completion of the Method call, returning
719   from it, check the original object {type,size,value}
720   coresponding to Arg0.
721   Use BlackBox for to clarify ACPI specification.
722
723
724==========
725* TEST 20: Write ArgX to ArgY
726==========
727
728
729Check writing from ArgX to ArgY
730
731FEATURE: Store/CopyObject(ArgX-Object, ArgY-Object)
732FEATURE: Store/CopyObject(ArgX-Object, ArgY-ORef)
733FEATURE: Store/CopyObject(ArgX-Object, ArgY-IRef)
734
735FEATURE: Store/CopyObject(ArgX-ORef, ArgY-Object)
736FEATURE: Store/CopyObject(ArgX-ORef, ArgY-ORef)
737FEATURE: Store/CopyObject(ArgX-ORef, ArgY-IRef)
738
739FEATURE: Store/CopyObject(ArgX-IRef, ArgY-Object)
740FEATURE: Store/CopyObject(ArgX-IRef, ArgY-ORef)
741FEATURE: Store/CopyObject(ArgX-IRef, ArgY-IRef)
742
743
744SPEC:
745
74617.2.5.9.2  LocalX Objects
747  1) Read from LocalX variables
748     ObjectReference - If performing a DeRefOf return the target
749                       of the reference. Otherwise, return the
750                       reference.
751
752==========
753* TEST XX: ArgX-ORef on place of LocalY
754==========
755
756Check that ArgX-ORef being transfer into LocalX lost its features
757(transfer ArgX to LocalX and run the TEST 06).
758
759FEATURE: ArgX-ORef:write_into_LocalX:write
760
761INCORRECT: not quite correct, because there is no way to
762           "transfer" ArgX-Reference from ArgX to LocalX.
763           In fact, the object assosiated with ArgX-Reference
764           is copied into LocalX (independantly on the value
765           of LocalX).
766
767So, the test is transformed into another one (see below).
768
769
770==========
771* TEST 21: Write ArgX to LocalY
772==========
773
774
775Check writing from ArgX to LocalY
776
777FEATURE: Store/CopyObject(ArgX-Object, LocalY)
778FEATURE: Store/CopyObject(ArgX-ORef, LocalY)
779FEATURE: Store/CopyObject(ArgX-IRef, LocalY)
780
781then overwrite LocalY which contains either
782Object or ORef or IRef.
783
784
785==========
786* TEST XX: ArgX-IRef on place of LocalY
787==========
788
789==========
790* TEST 22:
791==========
792
793
794The same as the TEST 21, but pass the
795IRef but not ORef.
796
797Done, in TEST 21. See INCORRECT in TEST 21.
798
799
800==========
801* TEST 23: Write into LocalX-ORef
802==========
803
804
805Generate LocalX-ORef and write to it.
806
807The same as the TEST 21, but obtain the ORef
808immediately and store it into LocalX.
809
810Example:
811  Store(RefOf(b000), Local0)
812  Store(0x11, Local0)
813
814After write operation into LocalX check that the original objects
815are unchanged {type,size,value}.
816
817FEATURE: ORef:write_into_LocalX:write
818
819
820==========
821* TEST 24: Write into LocalX-IRef
822==========
823
824
825The same as the TEST 23, but pass the IRef but not ORef.
826FEATURE: IRef:write_into_LocalX:write
827
828
829==========
830* TEST 25: Write into ArgX filled with ORef to global obtained in Method
831==========
832
833
834Check writing into ArgX which contains ORef to global
835object generated inside the Method (but not passed to it).
836
837The same as the TEST 20, but at first obtain the ORef
838to some global object and put it into ArgX and do all the read/write
839actions with that ArgX.
840
841Check the original object {type,size,value} coresponding to ArgX.
842Use BlackBox for to clarify ACPI specification.
843
844Example:
845  Store(RefOf(i000), ArgX)
846  Store(CondRefOf(i000), ArgX)
847
848FEATURE: ORef-to-global:write_into_ArgX:write
849
850
851==========
852* TEST 26: Write into ArgX filled with ORef to local obtained in Method
853==========
854
855
856Check writing into ArgX which contains ORef to local
857object generated inside the Method (but not passed to it).
858
859The same as the TEST 25 but use not global but local source objects:
860
861   c) LocalX {0-7}
862   d) Named: types {1-16}
863
864Check the original object {type,size,value} coresponding to ArgX.
865Use BlackBox for to clarify ACPI specification.
866
867Example:
868  Store(RefOf(i000), ArgX)
869  Store(CondRefOf(i000), ArgX)
870
871FEATURE: ORef-to-local:write_into_ArgX:write
872
873ISSUE: the same test for IRef
874
875
876SPEC:
877
87817.2.5.9.2 LocalX Objects
879
88017.2.5.8   Rules for Storing and Copying Objects
881
882Method LocalX variable:
883
884The object is copied to the destination with no conversion
885applied. Even if LocalX contains an Object Reference, it is
886overwritten.
887
888
889==========
890* TEST 27: CopyObject Object to LocalX
891==========
892
893
894Local0-Local7 can be written with any type object without any conversion
895(check CopyObject to LocalX).
896
897Write the same LocalX variable (use all the write operators for writing
898into LocalX) with all possible object types and ways of representing
899the source objects. Check that the resulting objects referenced by
900LocalX are the same as the original (or expected) ones {type,size,value}.
901Do these write and check actions for different type objects for the same
902LocalX, so we show that no conversion depending on the previous contents
903of the same LocalX takes place.
904
905Repeat the described checkings for each LocalX: {0-7}.
906
907FEATURE: Object:CopyObject_into_LocalX:verify
908
909
910==========
911* TEST 28: Store Object to LocalX
912==========
913
914
915Check the same as TEST 27 but for Store (check Store to LocalX)
916A set of available for Store types is restricted
917FEATURE: Object:Store_into_LocalX:verify
918
919
920==========
921* TEST 29: CopyObject ORef to LocalX
922==========
923
924
925Local0-Local7 can be written with ORef
926referencing any type object without any conversion.
927
928CopyObject the result of RefOf to LocalX
929
930Example:
931  CopyObject(RefOf(i000), Local0)
932  CopyObject(CondRefOf(i000), Local0)
933
934The same as the TEST 27, but obtain and write the ORef
935into LocalX and verify the contents of LocalX.
936
937FEATURE: ORef:CopyObject_into_LocalX:verify
938
939
940==========
941* TEST 30: Store ORef to LocalX
942==========
943
944
945Store the result of RefOf to LocalX
946(the same as TEST 29 but Store instead of CopyObject).
947
948Example:
949  Store(RefOf(i000), Local0)
950  Store(CondRefOf(i000), Local0)
951
952FEATURE: ORef:Store_into_LocalX:verify
953
954
955==========
956* TEST 31: CopyObject IRef to LocalX
957==========
958
959
960Local0-Local7 can be written with IRef without any conversion.
961
962CopyObject the result of Index to LocalX
963
964Example:
965  CopyObject(Index(s000, 1, Local0), Local1)
966
967The same as the TEST 29, but obtain and write the IRef but not ORef.
968FEATURE: IRef:CopyObject_into_LocalX:verify
969
970
971==========
972* TEST 32: Store IRef to LocalX
973==========
974
975
976Store the result of Index to LocalX
977(the same as TEST 31 but Store instead of CopyObject).
978
979Example:
980  Store(Index(s000, 1, Local0), Local1)
981
982FEATURE: IRef:Store_into_LocalX:verify
983
984
985==========
986* TEST 33: Mix of writing to LocalX
987==========
988
989
990Mix of all the legal ways enumerated in tests (TEST 27 - TEST 32)
991of initializing the LocalX:
992
993Example:
994  Store(RefOf(i000), Local0)
995  Store(CondRefOf(i000), Local0)
996  Store(Index(s000, 1, Local0), Local1)
997  Store(i000, Local0)
998
999  CopyObject(RefOf(i000), Local0)
1000  CopyObject(CondRefOf(i000), Local0)
1001  CopyObject(Index(s000, 1, Local0), Local1)
1002  CopyObject(i000, Local0)
1003
1004  Add(x, y, Local0)
1005  ...
1006
1007ISSUE: the same test for "initializing the ArgX"
1008
1009FEATURE: MIX:Object:CopyObject_into_LocalX:verify
1010FEATURE: MIX:Object:Store_into_LocalX:verify
1011FEATURE: MIX:ORef:CopyObject_into_LocalX:verify
1012FEATURE: MIX:ORef:Store_into_LocalX:verify
1013FEATURE: MIX:IRef:CopyObject_into_LocalX:verify
1014FEATURE: MIX:IRef:Store_into_LocalX:verify
1015
1016
1017SPEC:
1018
101917.2.5.9.3   Named Objects
1020
1021
1022==========
1023* TEST 34: NamedX of any type
1024==========
1025
1026
1027Obtain the NamedX objects of all the types and check their {type,size,value}.
1028SEE: it is implemented in name/name.asl
1029FEATURE: NamedX:verify {type,size,value}
1030
1031
1032==========
1033* TEST 35: ORef and IRef to NamedX of any type
1034==========
1035
1036
1037The same as the TEST 34, but obtain and verify the ORef
1038and IRef to named objects {type,size,value}.
1039
1040SEE: it is already verified by the following tests:
1041
1042TEST 01
1043TEST 02
1044TEST 03
1045TEST 04
1046TEST 06
1047TEST 07
1048
1049FEATURE: NamedX:RefOf:ORef:verify {type,size,value}
1050FEATURE: NamedX:Index:IRef:verify {type,size,value}
1051
1052
1053==========
1054* TEST 36: ArgX-ORef passed to another Method
1055==========
1056
1057
1058Check ArgX-ORef being passed further to another Method
1059
1060The same as the TEST 06, but from inside the Method (M1),
1061call to another Method (M2) and pass it with the ArgX of
1062(M1) containing the ORef.
1063
1064FEATURE: ArgX-ORef:M2:write:read
1065FEATURE: ArgX-ORef:M2:...:M*:write:read
1066
1067
1068==========
1069* TEST 37: ArgX-IRef passed to another Method
1070==========
1071
1072
1073Check ArgX-IRef being passed further to another Method
1074
1075The same as the TEST 36, but for IRef.
1076
1077FEATURE: ArgX-IRef:M2:write:read
1078FEATURE: ArgX-IRef:M2:...:M*:write:read
1079
1080
1081==========
1082* TEST 38: Write immediately into result of RefOf(Object)
1083==========
1084
1085
1086Check the immediate ORef (to any type object)
1087being passed as a target destination of write operators.
1088
1089Do the following:
1090
1091WRITE_OPERATOR(XXXX, RefOf(ArgX))
1092WRITE_OPERATOR(XXXX, RefOf(LocalX))
1093WRITE_OPERATOR(XXXX, RefOf(NamedX))
1094
1095Example:
1096  Store(XXX, RefOf(YYY))
1097
1098Initialize ArgX, LocalX, NamedX cosequetly with each {1-16} type object.
1099Do this for all the ASL Operators which write results.
1100Use BlackBox for to clarify ACPI specification.
1101
1102Note:
1103though these expressions are applied in other sub-tests,
1104nevertheles, this one (and some the following sub-tests
1105which verify similar constructions) are supposed and have
1106the perpose to verify this ability - immediate use of result
1107of the operator generating reference - comprehensively.
1108
1109FEATURE: write(Object:RefOf:ORef)
1110
1111
1112==========
1113* TEST 39: Write immediately into result of Index(String)
1114==========
1115
1116
1117Check the immediate IRef to the element of String
1118being passed as a target destination of write operators.
1119
1120Do the following:
1121
1122WRITE_OPERATOR(XXXX, Index(ArgX, 0))
1123WRITE_OPERATOR(XXXX, Index(LocalX, 0))
1124WRITE_OPERATOR(XXXX, Index(NamedX, 0))
1125
1126Example:
1127  Store(XXX, Index(YYY, 1))
1128  Store(XXX, Index(YYY, 1, ArgX))
1129  Store(XXX, Index(YYY, 1, LocalX))
1130  Store(XXX, Index(YYY, 1, NamedX))
1131
1132Do this for all the ASL Operators which write results.
1133
1134FEATURE: write(String:Index:IRef)
1135
1136
1137==========
1138* TEST 40: Write immediately into result of Index(Buffer)
1139==========
1140
1141
1142Check the immediate IRef to the element of Buffer
1143being passed as a target destination of write operators.
1144
1145Do the following:
1146
1147WRITE_OPERATOR(XXXX, Index(ArgX, 0))
1148WRITE_OPERATOR(XXXX, Index(LocalX, 0))
1149WRITE_OPERATOR(XXXX, Index(NamedX, 0))
1150
1151Do this for all the ASL Operators which write results.
1152FEATURE: write(Bufer:Index:IRef)
1153
1154
1155==========
1156* TEST 41: Store Object immediately into result of Index(Package(){Uninitialized})
1157==========
1158
1159
1160Check Store of available type Objects to the immediate IRef
1161to the element of Package.
1162
1163Element of Package is an Uninitialized.
1164
1165Example:
1166  Store(Object, Index(ArgX, 0))
1167  Store(Object, Index(LocalX, 0))
1168  Store(Object, Index(NamedX, 0))
1169
1170A set of available for Store types is restricted
1171
1172FEATURE: Store(Object, Index(Package(){Uninitialized}))
1173
1174
1175==========
1176* TEST 42  (no test): CopyObject Object immediately into result of Index(Package(){Uninitialized})
1177==========
1178
1179
1180Check CopyObject of any type Objects to the immediate IRef
1181to the element of Package.
1182
1183Element of Package is an Uninitialized.
1184
1185CURRENTLY: compiler failed CopyObject(xx, Index(xx,xx)), so - no test.
1186
1187Example:
1188  CopyObject(Object, Index(ArgX, 0))
1189  CopyObject(Object, Index(LocalX, 0))
1190  CopyObject(Object, Index(NamedX, 0))
1191
1192FEATURE: CopyObject(Object, Index(Package(){Uninitialized}))
1193
1194
1195=========
1196* TEST 43: Store ORef immediately into result of Index(Package(){Uninitialized})
1197=========
1198
1199
1200Check Store of ORef to the immediate IRef
1201to the element of Package.
1202
1203Element of Package is an Uninitialized.
1204
1205Example:
1206  Store(RefOf(Object), Index(ArgX, 0))
1207  Store(RefOf(Object), Index(LocalX, 0))
1208  Store(RefOf(Object), Index(NamedX, 0))
1209
1210FEATURE: Store(RefOf(Object), Index(Package(){Uninitialized}))
1211
1212
1213==========
1214* TEST 44: Store IRef immediately into result of Index(Package(){Uninitialized})
1215==========
1216
1217
1218Check Store of IRef to the immediate IRef
1219to the element of Package.
1220
1221Element of Package is an Uninitialized.
1222
1223Example:
1224  Store(Index(Object, 0), Index(ArgX, 0))
1225  Store(Index(Object, 0), Index(LocalX, 0))
1226  Store(Index(Object, 0), Index(NamedX, 0))
1227
1228FEATURE: Store(Index(Object,x), Index(Package(){Uninitialized}))
1229
1230
1231==========
1232* TEST 45: Store immediately into result of Index(Package(){Constants})
1233==========
1234
1235
1236Check the immediate IRef to the element of Package
1237being passed as a target destination of write operators.
1238
1239Element of Package is an immediate constant {Integer,String,Buffer,Package}.
1240
1241Do the following:
1242
1243WRITE_OPERATOR(XXXX, Index(ArgX, 0))
1244WRITE_OPERATOR(XXXX, Index(LocalX, 0))
1245WRITE_OPERATOR(XXXX, Index(NamedX, 0))
1246
1247Do this for all the ASL Operators which write results.
1248
1249FEATURE: write(x, Index(Package(){Constant}))
1250
1251
1252==========
1253* TEST 46: Store immediately into result of Index(Package(){NamedX {1-16}})
1254==========
1255
1256Check the immediate IRef to the element of Package
1257being passed as a target destination of write operators.
1258
1259Element of Package is a named object of any type: NamedX {1-16}.
1260
1261Do the following:
1262
1263WRITE_OPERATOR(XXXX, Index(ArgX, 0))
1264WRITE_OPERATOR(XXXX, Index(LocalX, 0))
1265WRITE_OPERATOR(XXXX, Index(NamedX, 0))
1266
1267Do this for all the ASL Operators which write results.
1268
1269FEATURE: write(x, Index(Package(){NamedX}))
1270
1271
1272==========
1273* TEST 47: Store immediately into result of Index(Package(){ORef to NamedX {1-16}})
1274==========
1275
1276
1277Check the immediate IRef to the element of Package
1278being passed as a target destination of write operators.
1279
1280Element of Package is a ORef to the named object
1281of any type: NamedX {1-16}.
1282
1283Do the following:
1284
1285WRITE_OPERATOR(XXXX, Index(ArgX, 0))
1286WRITE_OPERATOR(XXXX, Index(LocalX, 0))
1287WRITE_OPERATOR(XXXX, Index(NamedX, 0))
1288
1289Do this for all the ASL Operators which write results.
1290Check that the relevant elements of Package are properly changed.
1291Check that the original data are not changed.
1292
1293FEATURE: Store(Object, Index(Package(){ORef}))
1294
1295
1296==========
1297* TEST 48: Store immediately into result of Index(Package(){IRef})
1298==========
1299
1300
1301Check the immediate IRef to the element of Package
1302being passed as a target destination of write operators.
1303
1304Element of Package is an IRef to the element of another
1305object: {String, Buffer, Package}.
1306
1307Do the following:
1308
1309WRITE_OPERATOR(XXXX, Index(ArgX, 0))
1310WRITE_OPERATOR(XXXX, Index(LocalX, 0))
1311WRITE_OPERATOR(XXXX, Index(NamedX, 0))
1312
1313Do this for all the ASL Operators which write results.
1314Check that the relevant elements of Package are properly changed.
1315Check that the original data are not changed.
1316
1317Note: TEST 07 checks the writing into IRef passed
1318      to Method referencing elements of Package.
1319
1320FEATURE: Store(Object, Index(Package(){IRef}))
1321
1322
1323==========
1324* TEST 49: ORef-LocalX
1325==========
1326
1327FEATURE: Store(RefOf(), LocalX)
1328FEATURE: Copy(RefOf(), LocalX)
1329
1330
1331==========
1332* TEST 50: ORef-ArgX
1333==========
1334
1335FEATURE: Store(RefOf(), ArgX)
1336FEATURE: Copy(RefOf(), ArgX)
1337
1338SPEC:
1339
13405.5.2.3   Method Calling Convention
1341
1342Generally, the objects passed to a control method via the ArgX
1343terms cannot be directly written or modified by the called method.
1344In other words, when an ArgX term is used as a target operand in an
1345ASL statement, the existing ArgX object is not modified. Instead,
1346the new object replaces the existing object and the ArgX term
1347effectively becomes a LocalX term.
1348
1349
1350==========
1351* TEST 51: ORef-NamedX
1352==========
1353
1354FEATURE: Store(RefOf(), NamedX)
1355FEATURE: Copy(RefOf(), NamedX)
1356
1357
1358==========
1359* TEST 52: ORef-El_of_Package
1360==========
1361
1362FEATURE: Store(RefOf(), Index())
1363FEATURE: Copy(RefOf(), Index())
1364
1365
1366==========
1367* TEST 53: IRef-LocalX
1368==========
1369
1370FEATURE: Store(Index(), LocalX)
1371FEATURE: Store(LocalX, Index())
1372FEATURE: Copy(Index(), LocalX)
1373FEATURE: Copy(LocalX, Index())
1374
1375
1376==========
1377* TEST 54: IRef-ArgX
1378==========
1379
1380FEATURE: Store(Index(), ArgX)
1381FEATURE: Store(ArgX, Index())
1382FEATURE: Copy(Index(), ArgX)
1383FEATURE: Copy(ArgX, Index())
1384
1385
1386==========
1387* TEST 55: IRef-NamedX
1388==========
1389
1390FEATURE: Store(Index(), NamedX)
1391FEATURE: Store(NamedX, Index())
1392FEATURE: Copy(Index(), NamedX)
1393FEATURE: Copy(NamedX, Index())
1394
1395
1396==========
1397* TEST 56: IRef-El_of_Package
1398==========
1399
1400FEATURE: Store(Index(), Index())
1401FEATURE: Copy(Index(), Index())
1402FEATURE: Store(Index(arg0, x), Local0)
1403
1404
1405==========
1406* TEST 57: Store total
1407==========
1408
1409
1410When this satart work the user will feel himself free
1411in the way coding its toughts.
1412
1413Store(ImageX    , RefOf())
1414Store(ArgX      , RefOf())
1415Store(LocalX    , RefOf())
1416Store(NamedX    , RefOf())
1417Store(RefOf()   , RefOf())
1418Store(Index()   , RefOf())
1419Store(DerefOf() , RefOf())
1420
1421Store(ImageX    , Index())
1422Store(ArgX      , Index())
1423Store(LocalX    , Index())
1424Store(NamedX    , Index())
1425Store(RefOf()   , Index())
1426Store(Index()   , Index())
1427Store(DerefOf() , Index())
1428
1429Store(ImageX    , DerefOf())
1430Store(ArgX      , DerefOf())
1431Store(LocalX    , DerefOf())
1432Store(NamedX    , DerefOf())
1433Store(RefOf()   , DerefOf())
1434Store(Index()   , DerefOf())
1435Store(DerefOf() , DerefOf())
1436
1437Store(ImageX    , ArgX)
1438Store(ArgX      , ArgX)
1439Store(LocalX    , ArgX)
1440Store(NamedX    , ArgX)
1441Store(RefOf()   , ArgX)
1442Store(Index()   , ArgX)
1443Store(DerefOf() , ArgX)
1444
1445Store(ImageX    , LocalX)
1446Store(ArgX      , LocalX)
1447Store(LocalX    , LocalX)
1448Store(NamedX    , LocalX)
1449Store(RefOf()   , LocalX)
1450Store(Index()   , LocalX)
1451Store(DerefOf() , LocalX)
1452
1453Store(ImageX    , NamedX)
1454Store(ArgX      , NamedX)
1455Store(LocalX    , NamedX)
1456Store(NamedX    , NamedX)
1457Store(RefOf()   , NamedX)
1458Store(Index()   , NamedX)
1459Store(DerefOf() , NamedX)
1460
1461Verify all the aspects not including conversion issues.
1462Verify all the actions comprehensively enumerated in the
1463table. Do this comprehensive test after all the particular
1464bugs will be fixed. Now, due to the bugs, it looks difficult.
1465Extend in every possible way this test, see top of this spec,
1466as far as fixing the bugs.
1467
1468
1469==========
1470* TEST 58: CopyObject total
1471==========
1472
1473
1474When this satart work the user will feel himself free
1475in the way coding its toughts.
1476
1477Copy(ImageX    , RefOf())
1478Copy(ArgX      , RefOf())
1479Copy(LocalX    , RefOf())
1480Copy(NamedX    , RefOf())
1481Copy(RefOf()   , RefOf())
1482Copy(Index()   , RefOf())
1483Copy(DerefOf() , RefOf())
1484
1485Copy(ImageX    , Index())
1486Copy(ArgX      , Index())
1487Copy(LocalX    , Index())
1488Copy(NamedX    , Index())
1489Copy(RefOf()   , Index())
1490Copy(Index()   , Index())
1491Copy(DerefOf() , Index())
1492
1493Copy(ImageX    , DerefOf())
1494Copy(ArgX      , DerefOf())
1495Copy(LocalX    , DerefOf())
1496Copy(NamedX    , DerefOf())
1497Copy(RefOf()   , DerefOf())
1498Copy(Index()   , DerefOf())
1499Copy(DerefOf() , DerefOf())
1500
1501Copy(ImageX    , ArgX)
1502Copy(ArgX      , ArgX)
1503Copy(LocalX    , ArgX)
1504Copy(NamedX    , ArgX)
1505Copy(RefOf()   , ArgX)
1506Copy(Index()   , ArgX)
1507Copy(DerefOf() , ArgX)
1508
1509Copy(ImageX    , LocalX)
1510Copy(ArgX      , LocalX)
1511Copy(LocalX    , LocalX)
1512Copy(NamedX    , LocalX)
1513Copy(RefOf()   , LocalX)
1514Copy(Index()   , LocalX)
1515Copy(DerefOf() , LocalX)
1516
1517Copy(ImageX    , NamedX)
1518Copy(ArgX      , NamedX)
1519Copy(LocalX    , NamedX)
1520Copy(NamedX    , NamedX)
1521Copy(RefOf()   , NamedX)
1522Copy(Index()   , NamedX)
1523Copy(DerefOf() , NamedX)
1524
1525Verify all the aspects not including conversion issues.
1526Verify all the actions comprehensively enumerated in the
1527table. Do this comprehensive test after all the particular
1528bugs will be fixed. Now, due to the bugs, it looks difficult.
1529Extend in every possible way this test, see top of this spec,
1530as far as fixing the bugs.
1531
1532
1533==========
1534* TEST 59: Mix of Store and CopyObject total
1535==========
1536
1537
1538Mix of all the actions enumerated in two tests above.
1539Do it after the current bugs fixing.
1540
1541
1542==========
1543* TEST 60: Package total
1544==========
1545
1546When this starts work the user will feel himself free
1547in the way coding its toughts.
1548
1549Do this comprehensive test after all the particular
1550bugs will be fixed. Now, due to the bugs, it looks
1551difficult.
1552Extend in every possible way this test, see top of this spec,
1553as far as fixing the bugs.
1554
1555Duplicate it for Store and Copy.
1556
1557Concentrate all the issues declaring and accessing
1558elements of Package. Would be useful consider the
1559particular aspects enumerated below as elements of
1560the total table - do (in maximum) all the combinations
1561of the elements of the table. Specify as many different
1562aspects as possible.
1563
1564Aspects:
1565
1566Read immediate image element of Package
1567All the ways reading element of Package
1568...will be continued
1569
1570/*
1571SEE these and add to "Aspects":
1572
15731. Put immediate constant as an element of Package and access it
1574   with and without additional DerefOf.
1575
15762. Put NamedX {1-16} as an element of Package and access it
1577   with and without additional DerefOf.
1578
1579REMAINED TO DO THESE: 3 and 4
1580=====================
1581
15823. Put ORef (to any type object) as an element of Package
1583   and access it with and without additional DerefOf.
1584
15854. Put IRef (to element of String, Buffer, Package)
1586   as an element of Package and access it with and without
1587   additional DerefOf.
1588
1589* TEST 6x: Read element of Package without DerefOf
1590* TEST 6x: Write element of Package
1591* TEST 6x: Read element of Package
1592* TEST 6x: Method as an element of Package
1593*/
1594
1595
1596==========
1597* TEST 61: String total
1598==========
1599
1600
1601Do this test similar to "Package total"
1602when the major bugs will be fixed.
1603
1604
1605==========
1606* TEST 62: Buffer total
1607==========
1608
1609
1610Do this test similar to "Package total"
1611when the major bugs will be fixed.
1612
1613
1614      THE REFERENCE CALCULATIONS
1615      ==========================
1616
1617
1618==========
1619* TEST 63: All the legal ways of WRITING ORef reference to target location
1620==========
1621
1622
1623All the locations should show the same identical functionality.
1624
1625NamedX  - types 1-16
1626Named_X - types 1-4,6-13,15,16 (except Buffer Field & Field Unit)
1627
1628    63.0 Store
1629
1630 1. Store(RefOf(NamedX), LocalX)
1631 2. Store(RefOf(NamedX), ArgX-Object)
1632 3. CopyObject(
1633          RefOf(NamedX), Named_X)
1634    Store(RefOf(NamedX), Named_X)
1635 4. Store(RefOf(NamedX), ArgX-ORef-to-LocalX)
1636 5. Store(RefOf(NamedX), ArgX-ORef-to-ArgX)
1637 6. CopyObject(
1638          RefOf(NamedX),
1639          ArgX-ORef-to-Named_X)
1640    Store(RefOf(NamedX), ArgX-ORef-to-Named_X)
1641 7. Store(RefOf(NamedX), ArgX-IRef-to-El_of_Package)
1642 8. Store(RefOf(NamedX), RefOf(Named_X))
1643 9. Store(RefOf(NamedX), Index(Package, 0))
164410. Store(RefOf(NamedX), Method())
164511. Store(RefOf(NamedX), Method(x))
164612. Store(RefOf(NamedX), DerefOf(Expr_resulting_in_ORef))
1647
1648    63.1 Particular (not all) cases of (12)
1649
165013. Store(RefOf(NamedX), DerefOf(ArgX-ORef-to-LocalX))
165114. Store(RefOf(NamedX), DerefOf(ArgX-ORef-to-ArgX))
165215. CopyObject(
1653          RefOf(NamedX),
1654          ArgX-ORef-to-Named_X)
1655    Store(RefOf(NamedX), DerefOf(ArgX-ORef-to-Named_X))
165616. Store(RefOf(NamedX), DerefOf(ArgX-IRef-to-El_of_Package))
165717. Store(RefOf(NamedX), DerefOf(RefOf(Named_X)))
165818. Store(RefOf(NamedX), DerefOf(Index(Package, 0)))
165919. Store(RefOf(NamedX), DerefOf(Method()))
166020. Store(RefOf(NamedX), DerefOf(Method(x)))
1661
1662    63.2 CopyObject
1663
166421. CopyObject(RefOf(NamedX), LocalX)
166522. CopyObject(RefOf(NamedX), ArgX-Object)
166623. CopyObject(RefOf(NamedX), Named_X)
166724. CopyObject(RefOf(NamedX), ArgX-ORef-to-LocalX)
166825. CopyObject(RefOf(NamedX), ArgX-ORef-to-ArgX)
166926. CopyObject(RefOf(NamedX), ArgX-ORef-to-Named_X)
167027. CopyObject(RefOf(NamedX), ArgX-IRef-to-El_of_Package)
1671
1672    63.3 CopyObject (Compiler failed)
1673
167428. CopyObject(RefOf(NamedX), Index(Package, 0))
1675
1676
1677==========
1678* TEST 64: All the legal ways of WRITING IRef reference to target location
1679==========
1680
1681
1682The same as TEST 63 but Index() instead of RefOf()
1683
1684Example:
1685
1686 1. Store(Index(XXX,0), LocalX)
1687
1688    XXX - String, Buffer, Package.
1689
1690Additional are these given by Y below:
1691
1692 a. Index(x,0,y)
1693 b. Store(Index(x,0,y), XXX)
1694
1695
1696==========
1697* TEST 65: All the legal SOURCES of ORef reference
1698==========
1699
1700
1701Full test.
1702Do all the options enumerated in the tables 63.0-63.2.
1703Take each element of table 65.x below (XXX) instead of
1704RefOf() in 63.0-63.2.
1705
1706Example:
1707
1708 1. Store(XXX, LocalX)
1709
1710    XXX - all the types of sources of reference
1711
1712    Types of locations according to the right parts of 63.x tables
1713
1714    65.0 (from 63.0 Store)
1715
1716 1. ORef-LocalX                     // ORef reference assigned to LocalX
1717 2. ORef-ArgX                       // ORef reference assigned to ArgX effectively local
1718 3. ORef-Named_X                    // ORef reference assigned to Named_X
1719 4. ORef-ArgX-ORef-to-LocalX        // ORef reference assigned to LocalX, and ORef reference
1720                                    // to that LocalX is passed to Method
1721 5. ORef-ArgX-ORef-to-ArgX          // ORef reference assigned to "ArgX effectively local",
1722                                    // and ORef reference to that ArgX is passed to Method
1723 6. ORef-ArgX-ORef-to-Named_X       // ORef reference assigned to Named_X, and ORef reference
1724                                    // to that Named_X is passed to Method
1725 7. ORef-ArgX-IRef-to-El_of_Package // ORef reference assigned to the element of Package,
1726                                    // and IRef reference to that element is passed to Method
1727 8. RefOf(Named_X)
1728 9. Index(Package, 0)
172910. Method()
173011. Method(x)
173112. DerefOf(Expr_resulting_in_ORef)
1732
1733    65.1 (from 63.1 Particular (not all) cases of (12))
1734
173513. DerefOf(ArgX-ORef-to-LocalX)
173614. DerefOf(ArgX-ORef-to-ArgX)
173715. DerefOf(ArgX-ORef-to-Named_X)
173816. DerefOf(ArgX-IRef-to-El_of_Package)
173917. DerefOf(RefOf(Named_X))
174018. DerefOf(Index(Package, 0))
174119. DerefOf(Method())
174220. DerefOf(Method(x))
1743
1744Note: DerefOf(X) here means returning some reference pointed by X
1745
1746
1747==========
1748* TEST 66: All the legal SOURCES of IRef reference
1749==========
1750
1751
1752==========
1753* TEST 67: All the legal ways to READ the object pointed to by ORef reference
1754==========
1755
1756
1757==========
1758* TEST 68: All the legal ways to READ the object pointed to by IRef reference
1759==========
1760
1761
1762==========
1763* TEST 69: All the legal ways to WRITE to the object pointed to by ORef reference
1764==========
1765
1766
1767==========
1768* TEST 70: All the legal ways to WRITE to the object pointed to by IRef reference
1769==========
1770
1771
1772==========
1773* TEST 71: All the legal ways of READ automatic dereference
1774==========
1775
1776
1777==========
1778* TEST 72: All the legal ways of WRITE automatic dereference
1779==========
1780
1781
1782
1783
1784
1785====================================================================
1786====  SEE LATER CAREFULLY, SOME OF THE SUB-TESTS BELOW PERHAPS  ====
1787====  ARE OLREADY IMPLEMENTED IN THE TESTS ABOVE:               ====
1788====================================================================
1789
1790
1791
1792
1793SPEC:
1794
179517.5.102   Return
1796
1797Arg can be any valid object or reference.
1798
1799
1800==========
1801* TEST 73: Return ORef reference
1802==========
1803
1804
1805Clarify that the talk is actually about the ORef
1806and IRef (otherwise do only fixing of the ACPI
1807specification and omit the things below).
1808
1809Pass the ORef and IRef references
1810through the Method without any change only returning it.
1811After returning from the Method, check that all the source
1812features of the references are unchanged.
1813
1814
1815==========
1816* TEST 74: Return IRef reference
1817==========
1818
1819
1820SPEC:
1821
182217.5.13   CondRefOf
1823
1824On failure, Destination is unchanged and the execution
1825result of this operation is the value False.
1826
1827
1828==========
1829* TEST 75:
1830==========
1831
1832
1833Run CondRefOf in false conditions and check that FALSE
1834is returned and check that Destination is unchanged.
1835
1836
1837SPEC:
1838
183917.5.27   DerefOf
1840
1841If the Source evaluates to a string, the string is
1842evaluated as an ASL name (relative to the current scope)
1843and the contents of that object are returned.
1844
1845
1846==========
1847* TEST 76:
1848==========
1849
1850
1851Check the asertion above.
1852
1853
1854SPEC:
1855
185617.5.27   DerefOf
1857
1858If the object specified by Source does not exist
1859then a fatal error is generated.
1860
1861
1862==========
1863* TEST 77:
1864==========
1865
1866
1867Check the asertion above.
1868
1869
1870SPEC:
1871
187217.5.86   ObjectType
1873
1874Notice that if this operation is performed on an
1875object reference such as one produced by the Alias,
1876Index, or RefOf statements, the object type of the
1877base object is returned.
1878
1879
1880==========
1881* TEST 78:
1882==========
1883
1884
1885The asertion above has been verified for Index and RefOf
1886cases by all the tests above by the (TEST_00.2) entry.
1887
1888Check it for the Alias case in this test.
1889
1890
1891SPEC:
1892
189317.5.108   SizeOf
1894
1895For an object reference, the size of the referenced
1896object is returned.
1897
1898
1899==========
1900* TEST 79:
1901==========
1902
1903
1904Check SizeOf for ORef.
1905
1906
1907==========
1908* TEST 80:
1909==========
1910
1911
1912Check SizeOf for IRef.
1913
1914
1915==========
1916* TEST 81:
1917==========
1918
1919
1920Check SizeOf for Alias.
1921
1922
1923SPEC:
1924
192517.5.97   RefOf
1926
1927If the Object does not exist, the result of a RefOf
1928operation is fatal.
1929
1930
1931==========
1932* TEST 82:
1933==========
1934
1935
1936Run RefOf in false conditions and check that exception occurs.
1937
1938
1939==========
1940* TEST 83:
1941==========
1942
1943
1944All the possible ways to keep/pass/transfer the ORef
1945safes all its features.
1946
1947
1948==========
1949* TEST 84:
1950==========
1951
1952
1953All the possible ways to keep/pass/transfer the IRef
1954safes all its features.
1955
1956
1957==========
1958* TEST 85:
1959==========
1960
1961
1962Exercise the tricky way of writing everywhere.
1963Attempt to work with the keeped somewhere references.
1964Store everywhere the reference than do DerefOf
1965and pass the result immediately to the write operators.
1966
1967Store(0x12345678, Local0)
1968Store(Index(xxx, 0), Local0)
1969Store(RefOf(xxx, 0), Local0)
1970ORef passed by ArgX
1971IRef passed by ArgX
1972...
1973
1974Store(0, Derefof(Refof(Local0)))
1975
1976
1977==========
1978* TEST 86:
1979==========
1980
1981
1982Check presense/absence of Result conversion while writing
1983to ORef.
1984
1985Do that without details.
1986Details are to be exercised in onother separate test.
1987
1988
1989==========
1990* TEST 87:
1991==========
1992
1993
1994Check attempts to keep References in NamedX.
1995
1996
1997==========
1998* TEST 88:
1999==========
2000
2001
2002Check DerefOf(RefOf(DerefOf(RefOf(ArgX)))
2003See the test of exceptions exc_ref.
2004
2005
2006==========
2007* TEST 89:
2008==========
2009
2010
2011The same as TEST 26 but for IRef.
2012
2013Example:
2014  Store(Index(s000, 1, Arg0), Arg1)
2015
2016
2017==========
2018* TEST 90:
2019==========
2020
2021
2022Check References to the different relative and root names.
2023
2024Example:
2025  ^XXXX
2026  \XXXX.XXXX
2027  ...
2028
2029
2030==========
2031* TEST 91:
2032==========
2033
2034
2035In all the cases specified by tests TEST 38 - TEST 48
2036check ObjectType and SizeOf operators and say there that
2037DerefOf of these immediate cases is verified in TEST XX - TEST XX
2038(no more ability to use immediate result of RefOf/Index).
2039
2040
2041==========
2042* TEST 92:
2043==========
2044
2045From: Moore, Robert 
2046Sent: Thursday, November 10, 2005 2:35 AM
2047To: Podrezov, Valery A; Suietov, Fiodor F
2048Subject: FW: Support of Local Reference in the ACPI CA
2049
2050
2051Separately (though such are already):
2052put reference into element of Package
2053and then write another reference into
2054that element of that Package.
2055No any correlation must be.
2056
2057
2058
2059SEE LATER AND REMOVE THESE RECORDS:
2060===================================
2061
2062/*
2063SEE: where these take place, note them:
2064FEATURE: write any type reference: Store(RefOf(Int,Str,...TZone,Region), XXXX)
2065FEATURE: write into LocalX containing any type Index/RefOf reference: Store(RefOf(Int,Str,...TZone,Region), XXXX)
2066*/
2067
2068/*
2069SEE:
2070Index(XXXX, x, NamedX)
2071DerefOf(NamedX)
2072Store(RefOf(XXXX), NamedX))
2073DerefOf(NamedX)
2074*/
2075
2076/*
2077specify and verify all the ways storing,keeping references
2078and the following using of reference
2079*/
2080
2081/*
20821.1.1	RefOf (Create Object Reference)
2083Syntax
2084RefOf (Object) => ObjectReference
2085Arguments
2086Object can be any object type (for example, a package, a device object, and so on).
2087Description
2088Returns an object reference to Object. If the Object does not exist,
2089the result of a RefOf operation is fatal. Use the CondRefOf term in
2090cases where the Object might not exist. 
2091The primary purpose of RefOf() is to allow an object to be passed to
2092a method as an argument to the method without the object being evaluated
2093                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2094at the time the method was loaded.
2095*/
2096
2097/*
2098collect all the ways writing the value by the references
2099in the particular test
2100*/
2101
2102/*
2103RefOf(ArgX)
2104RefOf(LocalX)
2105*/
2106
2107/*
2108Remove it!!!!!!!!!!!!!
2109TEST 49
2110
2111Do the same as the tests {TEST 38 - TEST 48},
2112but store intermediately the values of both type References,
2113RefOf(X) and Index(X), into ArgX, LocalX, NamedX
2114before passing them to WRITE_OPERATOR:
2115
2116Do the following:
2117
2118Store(RefOf(ArgX), LocalY)
2119Store(RefOf(LocalX), LocalY)
2120Store(RefOf(NamedX), LocalY)
2121Store(Index(ArgX,   0, LocalY), LocalZ)
2122Store(Index(LocalX, 0, LocalY), LocalZ)
2123Store(Index(NamedX, 0, LocalY), LocalZ)
2124
2125Store(RefOf(ArgX), ArgY)
2126Store(RefOf(LocalX), ArgY)
2127Store(RefOf(NamedX), ArgY)
2128Store(Index(ArgX,   0, ArgY), ArgZ)
2129Store(Index(LocalX, 0, ArgY), ArgZ)
2130Store(Index(NamedX, 0, ArgY), ArgZ)
2131
2132Store(RefOf(ArgX), NamedY)
2133Store(RefOf(LocalX), NamedY)
2134Store(RefOf(NamedX), NamedY)
2135Store(Index(ArgX,   0, NamedY), NamedZ)
2136Store(Index(LocalX, 0, NamedY), NamedZ)
2137Store(Index(NamedX, 0, NamedY), NamedZ)
2138
2139WRITE_OPERATOR(XXXX, ArgY)
2140WRITE_OPERATOR(XXXX, LocalY)
2141WRITE_OPERATOR(XXXX, NamedY)
2142
2143WRITE_OPERATOR(XXXX, ArgZ)
2144WRITE_OPERATOR(XXXX, LocalZ)
2145WRITE_OPERATOR(XXXX, NamedZ)
2146
2147INCORRECT:
2148
2149  there is no any way, except DerefOf operator, how
2150  to use the value of Reference keeped intermediately
2151  in any type object.
2152
2153So, all the write operators:
2154
2155  WRITE_OPERATOR(XXXX, ArgZ)
2156  WRITE_OPERATOR(XXXX, LocalZ)
2157  WRITE_OPERATOR(XXXX, NamedZ)
2158
2159will write into ArgZ, LocalZ and NamedZ but NOT
2160into the References containend into them (mean
2161containend into ArgZ, LocalZ and NamedZ).
2162
2163????????????????? !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2164enumerate here (or specify and implement) the tests which verify:
2165  "will write into ArgZ, LocalZ and NamedZ but NOT
2166   into the References containend into them"
2167????????????????? !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2168
2169*/
2170
2171/*
2172SEE: 0011_take_this/bugs/0012
2173!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2174SEE aslts that all these are implemented.
2175!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2176
2177Store(Index(arg0, V001), i003)
2178Store(RefOf(i000), i003)
2179
2180Store(Index(arg0, V001, Index(p000, 0)), Index(p000, 1))
2181Store(RefOf(xxx), RefOf(xxx))
2182
2183test of printing references to all the possible types:
2184*/
2185/*
2186describe and demo for the implicit
2187conversion of String (references to the end of string
2188should ???????) - also Packages, Buffers,...
2189presence of references to such objects should cause
2190exceptions (???????????? !!!!!!!!!!!!).
2191*/