From: Robert Hoo <robert.hu@linux.intel.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: mst@redhat.com, xiaoguangrong.eric@gmail.com, ani@anisinha.ca,
dan.j.williams@intel.com, jingqi.liu@intel.com,
qemu-devel@nongnu.org, robert.hu@intel.com
Subject: Re: [PATCH v3 4/5] acpi/nvdimm: Implement ACPI NVDIMM Label Methods
Date: Tue, 20 Sep 2022 20:28:31 +0800 [thread overview]
Message-ID: <79e4c6a123e5b1edfaaa88f6ea12facedbaf5711.camel@linux.intel.com> (raw)
In-Reply-To: <20220920111302.0c1716af@redhat.com>
On Tue, 2022-09-20 at 11:13 +0200, Igor Mammedov wrote:
> On Fri, 16 Sep 2022 21:15:35 +0800
> Robert Hoo <robert.hu@linux.intel.com> wrote:
>
> > 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);
>
> why do you have to create and use INPT, wouldn't local be enough to
> keep the buffer?
If substitute INPT with LocalX, then later
Local0 = Package (0x01) {LocalX} isn't accepted.
PackageElement :=
DataObject | NameString
>
> > 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) {})
>
> ditto
>
> > 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)
> > }
next prev parent reply other threads:[~2022-09-20 14:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 3:27 [PATCH v3 0/5] Support ACPI NVDIMM Label Methods Robert Hoo
2022-09-01 3:27 ` [PATCH v3 1/5] tests/acpi: allow SSDT changes Robert Hoo
2022-09-01 3:27 ` [PATCH v3 2/5] acpi/ssdt: Fix aml_or() and aml_and() in if clause Robert Hoo
2022-09-01 3:27 ` [PATCH v3 3/5] acpi/nvdimm: define macro for NVDIMM Device _DSM Robert Hoo
2022-09-07 9:15 ` Igor Mammedov
2022-09-01 3:27 ` [PATCH v3 4/5] acpi/nvdimm: Implement ACPI NVDIMM Label Methods Robert Hoo
2022-09-09 13:39 ` Igor Mammedov
2022-09-09 14:02 ` Robert Hoo
2022-09-12 8:48 ` Igor Mammedov
2022-09-16 2:27 ` Robert Hoo
2022-09-16 7:37 ` Igor Mammedov
2022-09-16 13:15 ` Robert Hoo
2022-09-20 9:13 ` Igor Mammedov
2022-09-20 12:28 ` Robert Hoo [this message]
2022-09-21 13:29 ` Igor Mammedov
2022-09-22 1:22 ` Robert Hoo
2022-09-01 3:27 ` [PATCH v3 5/5] test/acpi/bios-tables-test: SSDT: update golden master binaries Robert Hoo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=79e4c6a123e5b1edfaaa88f6ea12facedbaf5711.camel@linux.intel.com \
--to=robert.hu@linux.intel.com \
--cc=ani@anisinha.ca \
--cc=dan.j.williams@intel.com \
--cc=imammedo@redhat.com \
--cc=jingqi.liu@intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=robert.hu@intel.com \
--cc=xiaoguangrong.eric@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).