On Mon, 2022-09-26 at 15:22 +0200, Igor Mammedov wrote: > > > 0800200c9a66"), One, 0x05, Local0, One) > > > + CreateDWordField (Local3, Zero, STTS) > > > + CreateField (Local3, 0x20, (LEN << 0x03), > > > LDAT) > > > + Name (LSA, Buffer (Zero){}) > > > + ToBuffer (LDAT, LSA) /* > > > \_SB_.NVDR.NV00._LSR.LSA_ */ > > > + Local1 = Package (0x02) > > > + { > > > + STTS, > > > + LSA > > > + } > > > > Hi Igor, > > > > Here is a little different from original proposal > > https://lore.kernel.org/qemu-devel/80b09055416c790922c7c3db60d2ba865792d1b0.ca...@linux.intel.com/ > > > > Local1 = Package (0x2) {STTS, toBuffer(LDAT)} > > > > Because in my test, Linux guest complains: > > > > [ 3.884656] ACPI Error: AE_SUPPORT, Expressions within package > > elements are not supported (20220331/dspkginit-172) > > [ 3.887104] ACPI Error: Aborting method \_SB.NVDR.NV00._LSR due > > to > > previous error (AE_SUPPORT) (20220331/psparse-531) > > > > > > So I have to move toBuffer() out of Package{} and name LSA to hold > > the > > buffer. If you have better idea, pls. let me know. > > Would something like following work? > > LocalX = Buffer (Zero){} > LocalY = Package (0x01) { LocalX }
No, Package{} doesn't accept LocalX as elements. PackageTerm := Package ( NumElements // Nothing | ByteConstExpr | TermArg => Integer ) {PackageList} => Package PackageList := Nothing | <PackageElement PackageListTail> PackageElement := DataObject | NameString