1 2 Collection of the functional information about the 3 Object Reference and the call-by-reference convention. 4 5 6 7NOTATIONS: 8 9x - impossible to generate situation 10c - expected is a compiler error 11e - is not caught by compiler but causes exception 12+ - expected is a positive result 13? - should be more investigated 14... - means everywhere below too 15 16 A. ALL THE LEGAL WAYS TO GENERATE REFERENCES 17 18 (means that Debug reports the obtained object like this: 19 [ACPI Debug] Reference: 004D4068) 20 ^^^^^^^^^^ 21 22 23 24 25 TABLE 1: all the legal ways to generate references to the 26 immediate images (constants) 27 28--------------------|---------------------------|-----------|-----------|-----------| 29 Type | Examples | Index | RefOf | CondRefOf | 30 | | I IR | R | C CR | 31--------------------|---------------------------|-----------|-----------|-----------| 32 0 Uninitialized | | x x | x | x x | 33 1 Integer | 0xabcdef | c c | c | c c | 34 2 String | "qwrtu" | + + | c | c c | 35 3 Buffer | Buffer(){7} | + + | c | c c | 36 4 Package | Package(){8} | + + | c | c c | 37 5 Field Unit | Field(..) {f000,..} | c c | c | c c | 38 | BankField(..) {bkf0..} | c c | c | c c | 39 | IndexField(..) {if00..} | c c | c | c c | 40 6 Device | Device(d000) {OL} | c c | c | c c | 41 7 Event | Event(e000) | c c | c | c c | 42 8 Method | Method(m000) {return(0)} | c c | c | c c | 43 9 Mutex | Mutex(mx00, 0) | c c | c | c c | 4410 Operation Region | OperationRegion(r000,..) | c c | c | c c | 4511 Power Resource | PowerResource(pwr0,..){OL}| c c | c | c c | 4612 Processor | Processor(prc0,..){OL} | c c | c | c c | 4713 Thermal Zone | ThermalZone(tz00){OL} | c c | c | c c | 4814 Buffer Field | Create*Field(..,bf00) | c c | c | c c | 4915 DDB Handle | | x x | x | x x | 5016 Debug Object | Debug | c c | c | c c | 51--------------------|---------------------------|-----------|-----------|-----------| 52 53Examples of I: 54 55Store(Index("qwrtyuiop", 5), Local0) 56Store(Index(Buffer() {1,2,3,4,5,6,7,8}, 5), Local0) 57Store(Index(Package() {1,2,3,4,5,6,7,8}, 5), Local0) 58 59Examples of IR: 60 61Store(Index("qwrtyuiop", 5, Local1), Local0) 62Store(Index(Buffer() {1,2,3,4,5,6,7,8}, 5, Local1), Local0) 63Store(Index(Package() {1,2,3,4,5,6,7,8}, 5, Local1), Local0) 64 65 66 67 68 TABLE 2: all the legal ways to generate references to the named objects 69 70--------------------|---------------------------|-----------|-----------|-----------| 71 Type | Examples | Index | RefOf | CondRefOf | 72 | | I IR | R | C CR | 73--------------------|---------------------------|-----------|-----------|-----------| 74 0 Uninitialized | | x x | x | x x | 75 1 Integer | Name(i000, 0xabcdef)) | ?2004 ? | + | + + | 76 2 String | Name(s000, "qwrtu") | + + | + | + + | 77 3 Buffer | Name(b000, Buffer(){7}) | + + | + | + + | 78 4 Package | Name(p000, Package(){8}) | + + | + | + + | 79 5 Field Unit | Field(..) {f000,..} | ?2004 ? | + | + + | 80 | BankField(..) {bkf0..} | ?2004 ? | + | + + | 81 | IndexField(..) {if00..} | ?2004 ? | + | + + | 82 6 Device | Device(d000) {OL} | c c | + | + + | 83 7 Event | Event(e000) | c c | + | + + | 84 8 Method | Method(m000) {return(0)} | ?2006 ? | + | + + | 85 9 Mutex | Mutex(mx00, 0) | c c | + | + + | 8610 Operation Region | OperationRegion(r000,..) | c c | + | + + | 8711 Power Resource | PowerResource(pwr0,..){OL}| c c | + | + + | 8812 Processor | Processor(prc0,..){OL} | c c | + | + + | 8913 Thermal Zone | ThermalZone(tz00){OL} | c c | + | + + | 9014 Buffer Field | Create*Field(..,bf00) | ?2004 ? | + | + + | 9115 DDB Handle | | x x | x | x x | 9216 Debug Object | | x x | x | x x | 93--------------------|---------------------------|-----------|-----------|-----------| 94 95Examples of I: 96 97Store(Index(s000, 0), Local0) 98Store(Index(b000, 0), Local0) 99Store(Index(p000, 0), Local0) 100 101Examples of IR: 102 103Store(Index(s000, 0, Local1), Local0) 104Store(Index(b000, 0, Local1), Local0) 105Store(Index(p000, 0, Local1), Local0) 106 107Examples of R: 108 109Store(RefOf(i000), Local0) 110Store(RefOf(s000), Local0) 111Store(RefOf(b000), Local0) 112Store(RefOf(p000), Local0) 113Store(RefOf(f000), Local0) 114Store(RefOf(bkf0), Local0) 115Store(RefOf(if00), Local0) 116Store(RefOf(d000), Local0) 117Store(RefOf(e000), Local0) 118Store(RefOf(m000), Local0) 119Store(RefOf(mx00), Local0) 120Store(RefOf(r000), Local0) 121Store(RefOf(pwr0), Local0) 122Store(RefOf(prc0), Local0) 123Store(RefOf(tz00), Local0) 124Store(RefOf(bf00), Local0) 125 126Examples of C: 127 128Store(CondRefOf(i000), Local0) 129Store(CondRefOf(s000), Local0) 130Store(CondRefOf(b000), Local0) 131Store(CondRefOf(p000), Local0) 132Store(CondRefOf(f000), Local0) 133Store(CondRefOf(bkf0), Local0) 134Store(CondRefOf(if00), Local0) 135Store(CondRefOf(d000), Local0) 136Store(CondRefOf(e000), Local0) 137Store(CondRefOf(m000), Local0) 138Store(CondRefOf(mx00), Local0) 139Store(CondRefOf(r000), Local0) 140Store(CondRefOf(pwr0), Local0) 141Store(CondRefOf(prc0), Local0) 142Store(CondRefOf(tz00), Local0) 143Store(CondRefOf(bf00), Local0) 144 145Examples of CR: 146 147Store(CondRefOf(i000, Local1), Local0) 148Store(CondRefOf(s000, Local1), Local0) 149Store(CondRefOf(b000, Local1), Local0) 150Store(CondRefOf(p000, Local1), Local0) 151Store(CondRefOf(f000, Local1), Local0) 152Store(CondRefOf(bkf0, Local1), Local0) 153Store(CondRefOf(if00, Local1), Local0) 154Store(CondRefOf(d000, Local1), Local0) 155Store(CondRefOf(e000, Local1), Local0) 156Store(CondRefOf(m000, Local1), Local0) 157Store(CondRefOf(mx00, Local1), Local0) 158Store(CondRefOf(r000, Local1), Local0) 159Store(CondRefOf(pwr0, Local1), Local0) 160Store(CondRefOf(prc0, Local1), Local0) 161Store(CondRefOf(tz00, Local1), Local0) 162Store(CondRefOf(bf00, Local1), Local0) 163 164 165 166 167 TABLE 3: all the legal ways to generate references to the 168 immediate images (constants) being elements of Package 169 170--------------------|----------------------------|-----------|-----------|-----------| 171 Type | Examples | Index | RefOf | CondRefOf | 172 | | I IR | R | C CR | 173--------------------|----------------------------|-----------|-----------|-----------| 174 0 Uninitialized | Package(1){} | + + | x | x x | 175 1 Integer | Package(){0xabcdef} | + + | ... | ... ...| 176 2 String | Package(){"qwrtu"} | + + | | | 177 3 Buffer | Package(){Buffer(){7}} | + + | | | 178 4 Package | Package(){Package(){8}} | + + | | | 179 5 Field Unit | Package(){Field(f000)} | x x | | | 180 | Package(){BankField(bkf0)} | ... ...| | | 181 | Package(){IndexField(if00)}| | | | 182 6 Device | Package(){Device(d000)} | | | | 183 7 Event | Package(){Event(e000)} | | | | 184 8 Method | Package(){Method(m000)} | | | | 185 9 Mutex | Package(){Mutex(mx00)} | | | | 18610 Operation Region | Package(){OperRegion(r000)}| | | | 18711 Power Resource | Package(){PwResource(pwr0)}| | | | 18812 Processor | Package(){Processor(prc0)} | | | | 18913 Thermal Zone | Package(){ThermZone(tz00)} | | | | 19014 Buffer Field | Package(){Cr*Field(bf00)} | | | | 19115 DDB Handle | | | | | 19216 Debug Object | Package(){Debug} | | | | 193--------------------|----------------------------|-----------|-----------|-----------| 194 195Examples of I: 196 197Store(Index(Package(1){}, 0), Local0) 198Store(Index(Package(){0xabcdef}, 0), Local0) 199Store(Index(Package(){"qwrtyuiop"}, 0), Local0) 200Store(Index(Package(){Buffer() {1,2,3,4,5,6,7,8,9}}, 0), Local0) 201Store(Index(Package(){Package(){0xabcdef}}, 0), Local0) 202Store(Index(Package(){Package(){"qwrtyuiop"}}, 0), Local0) 203Store(Index(Package(){Package(){Buffer() {1,2,3,4,5,6,7,8,9}}}, 0), Local0) 204Store(Index(Package(){Package(){Package(){0xabcdef}}}, 0), Local0) 205 206Examples of IR: 207 208Store(Index(Package(1){}, 0, Local1), Local0) 209Store(Index(Package(){0xabcdef}, 0, Local1), Local0) 210Store(Index(Package(){"qwrtyuiop"}, 0, Local1), Local0) 211Store(Index(Package(){Buffer() {1,2,3,4,5,6,7,8,9}}, 0, Local1), Local0) 212Store(Index(Package(){Package(){0xabcdef}}, 0, Local1), Local0) 213Store(Index(Package(){Package(){"qwrtyuiop"}}, 0, Local1), Local0) 214Store(Index(Package(){Package(){Buffer() {1,2,3,4,5,6,7,8,9}}}, 0, Local1), Local0) 215Store(Index(Package(){Package(){Package(){0xabcdef}}}, 0, Local1), Local0) 216 217 218 219 220 TABLE 4: all the legal ways to generate references to the 221 named objects being elements of Package 222 223--------------------|---------------------------|-----------|-----------|-----------| 224 Type | Examples | Index | RefOf | CondRefOf | 225 | | I IR | R | C CR | 226--------------------|---------------------------|-----------|-----------|-----------| 227 0 Uninitialized | | x x | x | x x | 228 1 Integer | Package(){i000} | + + | ... | ... ...| 229 2 String | Package(){s000} | + + | | | 230 3 Buffer | Package(){b000} | ... ...| | | 231 4 Package | Package(){p000} | | | | 232 5 Field Unit | Package(){f000} | | | | 233 | Package(){bkf0} | | | | 234 | Package(){if00} | | | | 235 6 Device | Package(){d000} | | | | 236 7 Event | Package(){e000} | | | | 237 8 Method | Package(){m000} | | | | 238 9 Mutex | Package(){mx00} | | | | 23910 Operation Region | Package(){r000} | | | | 24011 Power Resource | Package(){pwr0} | | | | 24112 Processor | Package(){prc0} | | | | 24213 Thermal Zone | Package(){tz00} | | | | 24314 Buffer Field | Package(){bf00} | | | | 24415 DDB Handle | | x x | | | 24516 Debug Object | | x x | | | 246--------------------|---------------------------|-----------|-----------|-----------| 247 248 249Examples of I: 250 251Store(Index(Package(){i000}, 0), Local0) 252Store(Index(Package(){s000}, 0), Local0) 253Store(Index(Package(){b000}, 0), Local0) 254Store(Index(Package(){p000}, 0), Local0) 255Store(Index(Package(){f000}, 0), Local0) 256Store(Index(Package(){bkf0}, 0), Local0) 257Store(Index(Package(){if00}, 0), Local0) 258Store(Index(Package(){d000}, 0), Local0) 259Store(Index(Package(){e000}, 0), Local0) 260Store(Index(Package(){m000}, 0), Local0) 261Store(Index(Package(){mx00}, 0), Local0) 262Store(Index(Package(){r000}, 0), Local0) 263Store(Index(Package(){pwr0}, 0), Local0) 264Store(Index(Package(){prc0}, 0), Local0) 265Store(Index(Package(){tz00}, 0), Local0) 266Store(Index(Package(){bf00}, 0), Local0) 267 268Examples of IR: 269 270Store(Index(Package(){i000}, 0, Local1), Local0) 271Store(Index(Package(){s000}, 0, Local1), Local0) 272Store(Index(Package(){b000}, 0, Local1), Local0) 273Store(Index(Package(){p000}, 0, Local1), Local0) 274Store(Index(Package(){f000}, 0, Local1), Local0) 275Store(Index(Package(){bkf0}, 0, Local1), Local0) 276Store(Index(Package(){if00}, 0, Local1), Local0) 277Store(Index(Package(){d000}, 0, Local1), Local0) 278Store(Index(Package(){e000}, 0, Local1), Local0) 279Store(Index(Package(){m000}, 0, Local1), Local0) 280Store(Index(Package(){mx00}, 0, Local1), Local0) 281Store(Index(Package(){r000}, 0, Local1), Local0) 282Store(Index(Package(){pwr0}, 0, Local1), Local0) 283Store(Index(Package(){prc0}, 0, Local1), Local0) 284Store(Index(Package(){tz00}, 0, Local1), Local0) 285Store(Index(Package(){bf00}, 0, Local1), Local0) 286 287 288 289 290 TABLE 5: all the legal ways to generate references to LocalX 291 292--------------------|---------------------------|-----------|-----------|-----------| 293 Type | Examples | Index | RefOf | CondRefOf | 294 | | I IR | R | C CR | 295--------------------|---------------------------|-----------|-----------|-----------| 296 0 Uninitialized | Store(UNIN, Local0); RF(L)| e e | + | + + | 297 1 Integer | Store(i000, Local0); RF(L)| e e | + | + + | 298 2 String | Store(s000, Local0); RF(L)| + + | + | + + | 299 3 Buffer | Store(b000, Local0); RF(L)| + + | + | + + | 300 4 Package | Store(p000, Local0); RF(L)| + + | + | + + | 301 5 Field Unit | Store(f000, Local0); RF(L)| e e | + | + + | 302 | Store(bkf0, Local0); RF(L)| e e | + | + + | 303 | Store(if00, Local0); RF(L)| e e | + | + + | 304 6 Device | Store(d000, Local0); RF(L)| x x | x | x x | 305 7 Event | Store(e000, Local0); RF(L)| ... ...| ... | ... ...| 306 8 Method | Store(m000, Local0); RF(L)| | | | 307 9 Mutex | Store(mx00, Local0); RF(L)| | | | 30810 Operation Region | Store(r000, Local0); RF(L)| | | | 30911 Power Resource | Store(pwr0, Local0); RF(L)| | | | 31012 Processor | Store(prc0, Local0); RF(L)| | | | 31113 Thermal Zone | Store(tz00, Local0); RF(L)| | | | 31214 Buffer Field | Store(bf00, Local0); RF(L)| e e | + | + + | 31315 DDB Handle | Store(HDL, Local0); RF(L)| | | | 31416 Debug Object | Store(Debug,Local0); RF(L)| | | | 315--------------------|---------------------------|-----------|-----------|-----------| 316 317 318Examples of I: 319 320Store(s000, Local7) 321Store(Index(Local7, 0), Local0) 322Store(b000, Local7) 323Store(Index(Local7, 0), Local0) 324Store(p000, Local7) 325Store(Index(Local7, 0), Local0) 326 327Examples of IR: 328 329Store(s000, Local7) 330Store(Index(Local7, 0, Local1), Local0) 331Store(b000, Local7) 332Store(Index(Local7, 0, Local1), Local0) 333Store(p000, Local7) 334Store(Index(Local7, 0, Local1), Local0) 335 336Examples of R: 337 338Store(i000, Local7) 339Store(RefOf(Local7), Local0) 340Store(s000, Local7) 341Store(RefOf(Local7), Local0) 342Store(b000, Local7) 343Store(RefOf(Local7), Local0) 344Store(p000, Local7) 345Store(RefOf(Local7), Local0) 346Store(f000, Local7) 347Store(RefOf(Local7), Local0) 348Store(bkf0, Local7) 349Store(RefOf(Local7), Local0) 350Store(if00, Local7) 351Store(RefOf(Local7), Local0) 352 353Examples of C: 354 355Store(i000, Local7) 356Store(CondRefOf(Local7), Local0) 357Store(s000, Local7) 358Store(CondRefOf(Local7), Local0) 359Store(b000, Local7) 360Store(CondRefOf(Local7), Local0) 361Store(p000, Local7) 362Store(CondRefOf(Local7), Local0) 363Store(f000, Local7) 364Store(CondRefOf(Local7), Local0) 365Store(bkf0, Local7) 366Store(CondRefOf(Local7), Local0) 367Store(if00, Local7) 368Store(CondRefOf(Local7), Local0) 369 370Examples of CR: 371 372Store(i000, Local7) 373Store(CondRefOf(Local7, Local1), Local0) 374Store(s000, Local7) 375Store(CondRefOf(Local7, Local1), Local0) 376Store(b000, Local7) 377Store(CondRefOf(Local7, Local1), Local0) 378Store(p000, Local7) 379Store(CondRefOf(Local7, Local1), Local0) 380Store(f000, Local7) 381Store(CondRefOf(Local7, Local1), Local0) 382Store(bkf0, Local7) 383Store(CondRefOf(Local7, Local1), Local0) 384Store(if00, Local7) 385Store(CondRefOf(Local7, Local1), Local0) 386 387 388 389 390 TABLE 6: all the legal ways to generate references to ArgX 391 392--------------------|---------------------------|-----------|-----------|-----------| 393 Type | Examples | Index | RefOf | CondRefOf | 394 | | I IR | R | C CR | 395--------------------|---------------------------|-----------|-----------|-----------| 396 0 Uninitialized | Store(UNIN, Arg0); RF(L) | e e | + | + + | 397 1 Integer | Store(i000, Arg0); RF(L) | e e | + | + + | 398 2 String | Store(s000, Arg0); RF(L) | + + | + | + + | 399 3 Buffer | Store(b000, Arg0); RF(L) | + + | + | + + | 400 4 Package | Store(p000, Arg0); RF(L) | + + | + | + + | 401 5 Field Unit | Store(f000, Arg0); RF(L) | e e | + | + + | 402 | Store(bkf0, Arg0); RF(L) | e e | + | + + | 403 | Store(if00, Arg0); RF(L) | e e | + | + + | 404 6 Device | Store(d000, Arg0); RF(L) | x x | x | x x | 405 7 Event | Store(e000, Arg0); RF(L) | ... ...| ... | ... ...| 406 8 Method | Store(m000, Arg0); RF(L) | | | | 407 9 Mutex | Store(mx00, Arg0); RF(L) | | | | 40810 Operation Region | Store(r000, Arg0); RF(L) | | | | 40911 Power Resource | Store(pwr0, Arg0); RF(L) | | | | 41012 Processor | Store(prc0, Arg0); RF(L) | | | | 41113 Thermal Zone | Store(tz00, Arg0); RF(L) | | | | 41214 Buffer Field | Store(bf00, Arg0); RF(L) | e e | + | + + | 41315 DDB Handle | Store(HDL, Arg0); RF(L) | | | | 41416 Debug Object | Store(Debug,Arg0); RF(L) | | | | 415--------------------|---------------------------|-----------|-----------|-----------| 416 417 418Examples of I: 419 420Store(s000, Arg6) 421Store(Index(Arg6, 0), Local0) 422Store(b000, Arg6) 423Store(Index(Arg6, 0), Local0) 424Store(p000, Arg6) 425Store(Index(Arg6, 0), Local0) 426 427Examples of IR: 428 429Store(s000, Arg6) 430Store(Index(Arg6, 0, Local1), Local0) 431Store(b000, Arg6) 432Store(Index(Arg6, 0, Local1), Local0) 433Store(p000, Arg6) 434Store(Index(Arg6, 0, Local1), Local0) 435 436Examples of R: 437 438Store(i000, Arg6) 439Store(RefOf(Arg6), Local0) 440Store(s000, Arg6) 441Store(RefOf(Arg6), Local0) 442Store(b000, Arg6) 443Store(RefOf(Arg6), Local0) 444Store(p000, Arg6) 445Store(RefOf(Arg6), Local0) 446Store(f000, Arg6) 447Store(RefOf(Arg6), Local0) 448Store(bkf0, Arg6) 449Store(RefOf(Arg6), Local0) 450Store(if00, Arg6) 451Store(RefOf(Arg6), Local0) 452 453Examples of C: 454 455Store(i000, Arg6) 456Store(CondRefOf(Arg6), Local0) 457Store(s000, Arg6) 458Store(CondRefOf(Arg6), Local0) 459Store(b000, Arg6) 460Store(CondRefOf(Arg6), Local0) 461Store(p000, Arg6) 462Store(CondRefOf(Arg6), Local0) 463Store(f000, Arg6) 464Store(CondRefOf(Arg6), Local0) 465Store(bkf0, Arg6) 466Store(CondRefOf(Arg6), Local0) 467Store(if00, Arg6) 468Store(CondRefOf(Arg6), Local0) 469 470Examples of CR: 471 472Store(i000, Arg6) 473Store(CondRefOf(Arg6, Local1), Local0) 474Store(s000, Arg6) 475Store(CondRefOf(Arg6, Local1), Local0) 476Store(b000, Arg6) 477Store(CondRefOf(Arg6, Local1), Local0) 478Store(p000, Arg6) 479Store(CondRefOf(Arg6, Local1), Local0) 480Store(f000, Arg6) 481Store(CondRefOf(Arg6, Local1), Local0) 482Store(bkf0, Arg6) 483Store(CondRefOf(Arg6, Local1), Local0) 484Store(if00, Arg6) 485Store(CondRefOf(Arg6, Local1), Local0) 486 487 488 B. ALL THE LEGAL WAYS TO USE REFERENCES 489 490The ways of using the RefOf and Index References are comprehensively 491specified and commented in the test specification (see file SPEC2). 492 493 494