Re: [PATCH 2/4] ACPI: PCC: Preserve shared memory signature in OpRegion handler

"Rafael J. Wysocki (Intel)" <[email protected]> Tue, 21 Jul 2026 21:20:15 +0200
Newsgroups dev.linux.lists.acpica-devel,org.kernel.vger.linux-acpi,org.kernel.vger.linux-kernel
Message-ID <CAJZ5v0jAOA3iQB6htExJNAtLu5oVJB9nZGzh=0+uaerVwgHMxQ@mail.gmail.com>
On Tue, Jul 21, 2026 at 2:27=E2=80=AFPM Sudeep Holla <[email protected]=
rg> wrote:
>
> On Tue, Jul 21, 2026 at 07:43:53PM +0800, lihuisong (C) wrote:
> >
> > On 7/17/2026 4:10 PM, Sudeep Holla wrote:
> > > ACPI 6.3 introduced PCC OperationRegions. Section 5.5.2.4.7.3,
> > > "Declaring message fields within a PCC OperationRegion", states that,
> > > for all PCC subspace types, the PCC Operation Region pertains to the
> > > region of PCC subspace that succeeds the PCC signature.
> > >
> > > The PCC address space handler currently copies the OperationRegion
> > > buffer to and from the start of the PCC shared memory region. That ca=
n
> > > overwrite or expose the signature at byte offset 0, and it also misse=
s
> > > the last 4 bytes of the actual PCC OperationRegion data.
> > >
> > > Offset OperationRegion copies by the size of the signature and reject
> > > regions that do not fit in the shared memory after that signature. AM=
L
> > > that sizes the PCC OperationRegion to include the signature is not
> > > conforming to the PCC OperationRegion definition.
> > >
> > > Cc: "Rafael J. Wysocki" <[email protected]>
> > > Fixes: 77e2a04745ff ("ACPI: PCC: Implement OperationRegion handler fo=
r the PCC Type 3 subtype")
> > > Signed-off-by: Sudeep Holla <[email protected]>
> > > ---
> > The below commit description said the PCC operationRegion contains the
> > signature field.
> > "77e2a04745ff ("ACPI: PCC: Implement OperationRegion handler for the PC=
C
> > Type 3 subtype")"
> > And I find that the definition of this OperationRegion in ACPI spec 6.3=
 is
> > the same with spec 6.5 and 6.6.
> > That is, the original implementation already didn't comply with ACPI sp=
ec.
> >
> > Patch 1/4 also requires the change of platform AML about PCC
> > OperationRegion.
> > These modification may lead to the existed PCC OperationRegion method i=
n
> > some drivers doesn't work.
> > Because the platform AML still contains signature field in PCC
> > OperationRegion method.
> > I don't know how many drivers in linux have used this method.
> > IMO, we at least need to reclarify this usage change and provide a new =
usage
> > example in the commit log like the original commit did.
> >
>
> Good point, I didn't realise I had wrong example in the original commit.
> I will add the example of correct usage in this change. Thanks for pointi=
ng
> it out.
>
> > Anyway, this patch also makes the driver more compliant with the
> > specifications.
> > So I agree.
> > Reviewed-by: Huisong Li <[email protected]>
> >
>
> Thanks again for all the review.

I gather that there will be a v2 then.