On Fri, 2022-09-16 at 09:37 +0200, Igor Mammedov wrote: > > Fine, get your point now. > > In ASL it will look like this: > > Local1 = Package (0x3) {STTS, SLSA, MAXT} > > Return (Local1) > > > > > > But as for > > CreateDWordField (Local0, Zero, STTS) // > > Status > > CreateDWordField (Local0, 0x04, SLSA) // > > SizeofLSA > > CreateDWordField (Local0, 0x08, MAXT) // Max > > Trans > > > > I cannot figure out how to substitute with LocalX. Can you shed > > more > > light? > > Leave this as is, there is no way to make it anonymous/local with > FooField. > > (well one might try to use Index and copy field's bytes into a buffer > and > then explicitly convert to Integer, but that's a rather convoluted > way > around limitation so I'd not go this route) > OK, pls. take a look, how about this?
Method (_LSI, 0, Serialized) // _LSI: Label Storage Information { Local0 = NCAL (ToUUID("4309ac30-0d11-11e4-9191-0800200c9a66"), 0x02, 0x04, Zero, One) // Buffer CreateDWordField (Local0, Zero, STTS) // Status CreateDWordField (Local0, 0x04, SLSA) // Size of LSA CreateDWordField (Local0, 0x08, MAXT) // Max Transfer Size Local1 = Package (0x3) {STTS, SLSA, MAXT} Return (Local1) } Method (_LSR, 2, Serialized) // _LSR: Label Storage Read { Name (INPT, Buffer(8) {}) CreateDWordField (INPT, Zero, OFST); CreateDWordField (INPT, 4, LEN); OFST = Arg0 LEN = Arg1 Local0 = Package (0x01) {INPT} Local3 = NCAL (ToUUID("4309ac30-0d11-11e4-9191-0800200c9a66"), 0x02, 0x05, Local0, One) CreateDWordField (Local3, Zero, STTS) CreateField (Local3, 32, LEN << 3, LDAT) Local1 = Package (0x2) {STTS, toBuffer(LDAT)} Return (Local1) } Method (_LSW, 3, Serialized) // _LSW: Label Storage Write { Local2 = Arg2 Name (INPT, Buffer(8) {}) CreateDWordField (INPT, Zero, OFST); CreateDWordField (INPT, 4, TLEN); OFST = Arg0 TLEN = Arg1 Concatenate(INPT, Local2, INPT) Local0 = Package (0x01) { INPT } Local3 = NCAL (ToUUID ("4309ac30-0d11-11e4-9191-0800200c9a66"), 0x02, 0x06, Local0, One) CreateDWordField (Local3, 0, STTS) Return (STTS) }