From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id B2C3DAC0F80 for ; Thu, 9 May 2024 12:37:04 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=PMQMaatbzdLAXEIgycO8jQzsF+cV6bXEBshC9kK9tgQ=; c=relaxed/simple; d=groups.io; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Thread-Index:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Language; s=20240206; t=1715258223; v=1; b=rwwkmzUv/O9yF/Lk9Z8b6iNErOUpZ+b7Llo2hLZTa/EiFgedpTLAuHTOZ2Tg90Ldq3Qbw71Q JuSI/3vor0bwgQY9XaDvUrwUGFM6id3WpaCKbPBiji9CfYoCuVo6AQ22EBjP+sLgWSrnLQPjqzk DBdJFCVe3hTjVlMt3XcmuzpPW+mC2VipmkubEcb/vO9fy8m//FHjkRiYQbm2uDCKQnIWfgqvbeR +91u9wPb+lPiFyTxbt1jwBZ/mWv2dOrKY/a+lCD4KfuE2ZmRE1WjbU+foCUQ1mmd1+7gazuEhgw +LMknWZ2qxX0I7qrGhhHkq01oD59sZzilioxnCJw3ka3A== X-Received: by 127.0.0.2 with SMTP id tX1pYY7687511x6e2GdySBe8; Thu, 09 May 2024 05:37:03 -0700 X-Received: from cxsh.intel-email.com (cxsh.intel-email.com [121.46.250.151]) by mx.groups.io with SMTP id smtpd.web10.9317.1715258221456715984 for ; Thu, 09 May 2024 05:37:02 -0700 X-Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id BB5B3DDA7B4 for ; Thu, 9 May 2024 20:36:59 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id B6B53DDA796 for ; Thu, 9 May 2024 20:36:59 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by cxsh.intel-email.com (Postfix) with SMTP id DF35CDDA785 for ; Thu, 9 May 2024 20:36:53 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([114.92.182.254]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Thu, 09 May 2024 20:36:39 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 114.92.182.254 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: , , "'Attar, AbdulLateef \(Abdul Lateef\)'" Cc: "'Pierre Gondois'" , "'Leif Lindholm'" , "'Andrew Fish'" , "'Michael Kinney'" References: <5A6ABFE2-1B83-46DD-B33F-68F3510FA421@arm.com> In-Reply-To: <5A6ABFE2-1B83-46DD-B33F-68F3510FA421@arm.com> Subject: =?UTF-8?B?5Zue5aSNOiDlm57lpI06IFtlZGsyLWRldmVsXSBbZWRrMi1zdGFibGUyMDI0MDUgUkVTRU5EIFBBVENIIHYyIDEvMV0gRHluYW1pY1RhYmxlc1BrZzogQWRkcyBpbnRlZ2VyIHRvIHRoZSBBTUwgcGFja2FnZSBub2Rl?= Date: Thu, 9 May 2024 20:36:41 +0800 Message-ID: <000101daa20d$8ba8a1d0$a2f9e570$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQI6uf1G+cxOCBhKBVnn1NK1DcLBhbDOptMw Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 09 May 2024 05:37:02 -0700 Resent-From: gaoliming@byosoft.com.cn Reply-To: devel@edk2.groups.io,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ASWhCj0ecRygWfjHyRYSLpZ6x7686176AA= Content-Type: multipart/alternative; boundary="----=_NextPart_000_0002_01DAA250.99CE52D0" Content-Language: zh-cn X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=rwwkmzUv; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io ------=_NextPart_000_0002_01DAA250.99CE52D0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sami: Thanks for your update. I agree Pierre reviewed this patch before the sof= t feature freeze. So, this patch can be merged for this stable tag 202405. =20 Thanks Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Sami Mujawar =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9=B45=E6=9C=889=E6=97=A5 18:= 18 =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; gaoliming@byosoft.com.cn= ; 'Attar, AbdulLateef (Abdul Lateef)' =E6=8A=84=E9=80=81: Pierre Gondois ; 'Leif Lindholm= ' ; 'Andrew Fish' ; 'Michael Ki= nney' =E4=B8=BB=E9=A2=98: Re: =E5=9B=9E=E5=A4=8D: [edk2-devel] [edk2-stable202405= RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package nod= e =20 Hi Liming, =20 > What=E2=80=99s your comments for this patch? The patch was reviewed by Pierre at https://edk2.groups.io/g/devel/message/= 118589 before the feature freeze email was sent out. Pierre had some minor recommendations that Abdul has addressed in the V2 pa= tch. Ideally Pierre=E2=80=99s the r-b tag could have been carried forward. =20 > Is this a required bug fix or new feature? This is adding a new feature by introducing a new API, and I think it shoul= d not impact the existing functionality as such.=20 So, by merging this patch the risk of breaking existing functionality seems= to be low. =20 This patch looks good to me. Reviewed-by: Sami Mujawar > =20 Regards, =20 Sami Mujawar =20 =20 =20 From: > on behalf of "g= aoliming via groups.io" > Reply to: "devel@edk2.groups.io " >, "gaoliming@byosoft.com.cn " > Date: Thursday 9 May 2024 at 10:01 To: "'Attar, AbdulLateef (Abdul Lateef)'" >, "devel@edk2.groups.io " > Cc: Pierre Gondois = >, Sami Mujawar >, 'Lei= f Lindholm' >= , 'Andrew Fish' >, 'Michael Kinne= y' > Subject: =E5=9B=9E=E5=A4=8D: [edk2-devel] [edk2-stable202405 RESEND PATCH v= 2 1/1] DynamicTablesPkg: Adds integer to the AML package node Resent from: > Resent date: Thursday 9 May 2024 at 10:00 =20 Sami and Pierre: What=E2=80=99s your comments for this patch? Is this a required bug fix o= r new feature? =20 Thanks Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: Attar, AbdulLateef (Abdul Lateef) >=20 =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9=B45=E6=9C=889=E6=97=A5 16:= 39 =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming >; devel@edk2.groups.io =20 =E6=8A=84=E9=80=81: 'Pierre Gondois' >; 'Sami Mujawar' > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1= ] DynamicTablesPkg: Adds integer to the AML package node =20 [AMD Official Use Only - General] =20 Hi Liming, This patch provides an API to add integer value to AML package node. Using this API user can create CXL device with two PNPID. Without this API user has to rely on static ASL files. =20 This patch is required for platform who uses DynamicTablesPkg to generate A= CPI tables based on this stable release. =20 Thanks AbduL _____ =20 From: gaoliming = > Sent: Thursday, May 9, 2024 1:10 PM To: devel@edk2.groups.io >; Attar, AbdulLateef (Abdul Lateef) > Cc: 'Pierre Gondois' >; 'Sami Mujawar' > Subject: =E5=9B=9E=E5=A4=8D: [edk2-devel] [edk2-stable202405 RESEND PATCH v= 2 1/1] DynamicTablesPkg: Adds integer to the AML package node=20 =20 Caution: This message originated from an External Source. Use proper cautio= n when opening attachments, clicking links, or responding. Abdul: Can you give more information why this change is required for this stable tag 202405? Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > =E4=BB=A3=E8= =A1=A8 Abdul Lateef > Attar via groups.io > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9=B45=E6=9C=889=E6=97=A5 1= 2:49 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io =20 > =E6=8A=84=E9=80=81: Abdul Lateef Attar >; Pierre Gondois > >; Sami Mujawar <= sami.mujawar@arm.com > > =E4=B8=BB=E9=A2=98: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] > DynamicTablesPkg: Adds integer to the AML package node > > Adds an AmlAddIntegerToNamedPackage() API to generate AML code, > which adds an integer value to the package node. > > Cc: Pierre Gondois > > Cc: Sami Mujawar > > Signed-off-by: Abdul Lateef Attar > > --- > .../Include/Library/AmlLib/AmlLib.h | 41 +++++++++++- > .../Common/AmlLib/CodeGen/AmlCodeGen.c | 67 > +++++++++++++++++++ > 2 files changed, 107 insertions(+), 1 deletion(-) > > diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h > b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h > index 82d5464084..4427ab68fa 100644 > --- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h > +++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h > @@ -2,7 +2,7 @@ > AML Lib. > > Copyright (c) 2019 - 2023, Arm Limited. All rights reserved.
> - Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> + Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights > reserved.
> > SPDX-License-Identifier: BSD-2-Clause-Patent > **/ > @@ -1743,6 +1743,45 @@ AmlAddNameStringToNamedPackage ( > IN AML_OBJECT_NODE_HANDLE NamedNode > ); > > +/** Add an integer value to the named package node. > + > + AmlCodeGenNamePackage ("_CID", NULL, &PackageNode); > + AmlGetEisaIdFromString ("PNP0A03", &EisaId); > + AmlAddIntegerToNamedPackage (EisaId, NameNode); > + AmlGetEisaIdFromString ("PNP0A08", &EisaId); > + AmlAddIntegerToNamedPackage (EisaId, NameNode); > + > + equivalent of the following ASL code: > + Name (_CID, Package (0x02) // _CID: Compatible ID > + { > + EisaId ("PNP0A03"), > + EisaId ("PNP0A08") > + }) > + > + The package is added at the tail of the list of the input package node > + name: > + Name ("NamePackageNode", Package () { > + [Pre-existing package entries], > + [Newly created integer entry] > + }) > + > + > + @ingroup CodeGenApis > + > + @param [in] Integer Integer value that need to be added to > package node. > + @param [in, out] NameNode Package named node to add the object > to. > + > + @retval EFI_SUCCESS Success. > + @retval EFI_INVALID_PARAMETER Invalid parameter. > + @retval Others Error occurred during the operation. > +**/ > +EFI_STATUS > +EFIAPI > +AmlAddIntegerToNamedPackage ( > + IN UINT32 Integer, > + IN OUT AML_OBJECT_NODE_HANDLE NameNode > + ); > + > /** AML code generation to invoke/call another method. > > This method is a subset implementation of MethodInvocation > diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c > b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c > index 22c2d598d0..89fa4e06f8 100644 > --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c > +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c > @@ -3871,6 +3871,73 @@ exit_handler: > return Status; > } > > +/** Add an integer value to the named package node. > + > + AmlCodeGenNamePackage ("_CID", NULL, &PackageNode); > + AmlGetEisaIdFromString ("PNP0A03", &EisaId); > + AmlAddIntegerToNamedPackage (EisaId, NameNode); > + AmlGetEisaIdFromString ("PNP0A08", &EisaId); > + AmlAddIntegerToNamedPackage (EisaId, NameNode); > + > + equivalent of the following ASL code: > + Name (_CID, Package (0x02) // _CID: Compatible ID > + { > + EisaId ("PNP0A03"), > + EisaId ("PNP0A08") > + }) > + > + The package is added at the tail of the list of the input package node > + name: > + Name ("NamePackageNode", Package () { > + [Pre-existing package entries], > + [Newly created integer entry] > + }) > + > + > + @ingroup CodeGenApis > + > + @param [in] Integer Integer value that need to be added to > package node. > + @param [in, out] NameNode Package named node to add the object > to. > + > + @retval EFI_SUCCESS Success. > + @retval EFI_INVALID_PARAMETER Invalid parameter. > + @retval Others Error occurred during the operation. > +**/ > +EFI_STATUS > +EFIAPI > +AmlAddIntegerToNamedPackage ( > + IN UINT32 Integer, > + IN OUT AML_OBJECT_NODE_HANDLE NameNode > + ) > +{ > + EFI_STATUS Status; > + AML_OBJECT_NODE *PackageNode; > + > + if (NameNode =3D=3D NULL) { > + ASSERT_EFI_ERROR (FALSE); > + return EFI_INVALID_PARAMETER; > + } > + > + PackageNode =3D (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument ( > + NameNode, > + EAmlParseIndexTerm1 > + ); > + if ((PackageNode =3D=3D NULL) > || > + (AmlGetNodeType ((AML_NODE_HANDLE)PackageNode) !=3D > EAmlNodeObject) || > + (!AmlNodeHasOpCode (PackageNode, AML_PACKAGE_OP, 0))) > + { > + ASSERT_EFI_ERROR (FALSE); > + return EFI_INVALID_PARAMETER; > + } > + > + Status =3D AmlAddRegisterOrIntegerToPackage (NULL, Integer, PackageNod= e); > + if (EFI_ERROR (Status)) { > + ASSERT_EFI_ERROR (Status); > + } > + > + return Status; > +} > + > /** AML code generation to invoke/call another method. > > This method is a subset implementation of MethodInvocation > -- > 2.34.1 > > > >=20 > IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118764): https://edk2.groups.io/g/devel/message/118764 Mute This Topic: https://groups.io/mt/105999922/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- ------=_NextPart_000_0002_01DAA250.99CE52D0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Sami:

=C2=A0 T= hanks for your update. I agree Pierre reviewed this patch before the soft f= eature freeze. So, this patch can be merged for this stable tag 202405.

 

Thanks

Liming<= o:p>

=E5=8F=91=E4=BB=B6=E4=BA=BA= : devel@edk2.groups.io <devel@edk= 2.groups.io> =E4=BB=A3=E8=A1=A8 Sami Mujawar
= =E5=8F=91= =E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9= =B45=E6=9C=889=E6=97=A5= 18:18
=E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; gaoliming@b= yosoft.com.cn; 'Attar, AbdulLateef (Abdul Lateef)' <AbdulLateef.Attar@am= d.com>
=E6=8A=84=E9=80=81: Pierre Gondois <Pierre.Gondois@arm.com>; 'Leif Lindh= olm' <quic_llindhol@quicinc.com>; 'Andrew Fish' <afish@apple.com&g= t;; 'Michael Kinney' <michael.d.kinney@intel.com>
=E4=B8= =BB=E9=A2=98: Re: = =E5=9B=9E=E5=A4=8D: [edk2-devel] [edk2-stable202405 RESE= ND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node

 

Hi Liming,

 

> What=E2=80=99s your commen= ts for this patch?<= /p>

The patch was review= ed by Pierre at h= ttps://edk2.groups.io/g/devel/message/118589 before the feature freeze = email was sent out.

Pierre had some minor recommendations that Abdul has addr= essed in the V2 patch. Ideally Pierre=E2=80=99s the r-b tag could have been= carried forward.

 

> Is this a required bug fix or n= ew feature?

This is adding a new feature by introducing a new API, and I thin= k it should not impact the existing functionality as such.

So, by merging th= is patch the risk of breaking existing functionality seems to be low.<= /o:p>

&n= bsp;

Th= is patch looks good to me.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

 

=

Regards,

 

Sami Mujawa= r

 

<= p class=3DMsoNormal> =

 

From: <devel@edk2.groups.io> on behalf of "g= aoliming via groups.io" <gaoliming=3Dbyosoft.com.cn@groups.io>
Reply to: = "devel@edk2.groups.io&= quot; <devel@edk2.groups.io&= gt;, "gaoliming@byosoft.co= m.cn" <gaoliming@by= osoft.com.cn>
Date: Thursday 9 May 2024 at 10:01
To:= "'Attar, AbdulLateef (Abdul Lateef)'" <AbdulLateef.Attar@amd.com>, "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Pierre Gondois <Pierre.Gondoi= s@arm.com>, Sami Mujawar <Sami.Mujawar@arm.com>, 'Leif Lindholm' <quic_llindhol@quicinc.com>, 'Andrew Fish' <<= a href=3D"mailto:afish@apple.com">afish@apple.com>, 'Michael Kinney'= <michael.d.kinney@intel.c= om>
Subject:
=E5=9B=9E=E5=A4=8D: [edk2-devel] [edk2-stable202405 RES= END PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package nodeResent from: <gaolim= ing@byosoft.com.cn>
Resent date: Thursday 9 May 2024 at 10= :00

 

Sami and Pierre:

  What=E2=80=99s your comments for this patch? Is th= is a required bug fix or new feature?

 

Thanks

Liming

=E5=8F=91=E4=BB=B6=E4=BA=BA:= Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>
=E5=8F=91=E9=80=81=E6= =97=B6=E9=97=B4: 2024=E5=B9=B45=E6=9C=889=E6=97=A5 16:39
=E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming <gaoli= ming@byosoft.com.cn>; devel@= edk2.groups.io
=E6=8A=84=E9=80=81: 'Pier= re Gondois' <pierre.gondois@ar= m.com>; 'Sami Mujawar' <s= ami.mujawar@arm.com>
=E4=B8=BB=E9=A2=98: Re: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTable= sPkg: Adds integer to the AML package node

 

[AMD Official Use Only - General]

 

Hi Liming,

    This patch provides an API to add integer= value to AML package node.

Using this API user can create CXL device with two PNPID.

Without this API user has to rely on st= atic ASL files.

&nbs= p;

This patch is required for = platform who uses DynamicTablesPkg to generate ACPI tables based on this st= able release.

 =

Thanks

AbduL

=

Caution: This message originated from an External Sou= rce. Use proper caution when opening attachments, clicking links, or respon= ding.


Abdul:
  Can you give more information why this ch= ange is required for this stable
tag 202405?

Thanks
Liming
= > -----
=E9=82=AE=E4=BB=B6=E5=8E= =9F=E4=BB=B6-----
&= gt;
=E5=8F=91=E4=BB=B6=E4=BA=BA:
devel@edk2.groups.io <devel@edk2.groups.io> =E4=BB=A3=E8=A1=A8= Abdul Lateef
> Attar via groups.io
>
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024= =E5=B9=B45=E6=9C=889=E6=97=A5 12:49
> =E6=94=B6=E4=BB=B6=E4=BA=BA: devel= @edk2.groups.io
>
=E6=8A= =84=E9=80=81: Abdul La= teef Attar <AbdulLateef.Att= ar@amd.com>; Pierre Gondois
> <pierre.gondois@arm.com>; Sami Mujawar <sami.mujawar@arm.com>
>
=E4=B8=BB=E9=A2=98: [edk2-devel] [edk2-stable202405 RESEND PATCH v2= 1/1]
> DynamicTablesPkg: Adds integer to the AML package node
>= ;
> Adds an AmlAddIntegerToNamedPackage() API to generate AML code,> which adds an integer value to the package node.
>
> Cc:= Pierre Gondois <pierre.gondoi= s@arm.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Signed-off-by: Abdul Latee= f Attar <AbdulLateef.Attar@= amd.com>
> ---
>  .../Include/Library/AmlLib/AmlLib= .h           | 41 +++++++= ++++-
>  .../Common/AmlLib/CodeGen/AmlCodeGen.c   = ;     | 67
> +++++++++++++++++++
>  2 = files changed, 107 insertions(+), 1 deletion(-)
>
> diff --git = a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
> b/DynamicTablesP= kg/Include/Library/AmlLib/AmlLib.h
> index 82d5464084..4427ab68fa 100= 644
> --- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
> = +++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
> @@ -2,7 +2,7= @@
>    AML Lib.
>
>    Co= pyright (c) 2019 - 2023, Arm Limited. All rights reserved.<BR>
>= ; -  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
res= erved.<BR>
> +  Copyright (C) 2023 - 2024, Advanced Micro = Devices, Inc. All rights
> reserved.<BR>
>
> &= nbsp;  SPDX-License-Identifier: BSD-2-Clause-Patent
>  **/<= br>> @@ -1743,6 +1743,45 @@ AmlAddNameStringToNamedPackage (
>&nbs= p;   IN AML_OBJECT_NODE_HANDLE  NamedNode
>  = ;  );
>
> +/** Add an integer value to the named package n= ode.
> +
> +  AmlCodeGenNamePackage ("_CID", NUL= L, &PackageNode);
> +  AmlGetEisaIdFromString ("PNP0A03= ", &EisaId);
> +  AmlAddIntegerToNamedPackage (EisaId, = NameNode);
> +  AmlGetEisaIdFromString ("PNP0A08", &am= p;EisaId);
> +  AmlAddIntegerToNamedPackage (EisaId, NameNode);<= br>> +
> +  equivalent of the following ASL code:
> +&n= bsp; Name (_CID, Package (0x02)  // _CID: Compatible ID
> + = ; {
> +      EisaId ("PNP0A03"),> +      EisaId ("PNP0A08")
>= +  })
> +
> +  The package is added at the tail of t= he list of the input package node
> +  name:
> + &nbs= p;  Name ("NamePackageNode", Package () {
> + &nb= sp;    [Pre-existing package entries],
> +  =     [Newly created integer entry]
> +   = ; })
> +
> +
> +  @ingroup CodeGenApis
> +
= > +  @param [in]       Integer &= nbsp;     Integer value that need to be added to
>= ; package node.
> +  @param [in, out]  NameNode  =     Package named node to add the object
> to.
>= +
> +  @retval EFI_SUCCESS      &= nbsp;      Success.
> +  @retval EFI_IN= VALID_PARAMETER   Invalid parameter.
> +  @retval Othe= rs            &= nbsp;     Error occurred during the operation.
> = +**/
> +EFI_STATUS
> +EFIAPI
> +AmlAddIntegerToNamedPacka= ge (
> +  IN        UINT32&nb= sp;            =      Integer,
> +  IN  OUT   = AML_OBJECT_NODE_HANDLE  NameNode
> +  );
> +
>&= nbsp; /** AML code generation to invoke/call another method.
>
>= ;    This method is a subset implementation of MethodInvocat= ion
> diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/Aml= CodeGen.c
> b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeG= en.c
> index 22c2d598d0..89fa4e06f8 100644
> --- a/DynamicTable= sPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
> +++ b/DynamicTables= Pkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
> @@ -3871,6 +3871,73 = @@ exit_handler:
>    return Status;
>  }>
> +/** Add an integer value to the named package node.
>= +
> +  AmlCodeGenNamePackage ("_CID", NULL, &Pack= ageNode);
> +  AmlGetEisaIdFromString ("PNP0A03", &= ;EisaId);
> +  AmlAddIntegerToNamedPackage (EisaId, NameNode);> +  AmlGetEisaIdFromString ("PNP0A08", &EisaId);> +  AmlAddIntegerToNamedPackage (EisaId, NameNode);
> +> +  equivalent of the following ASL code:
> +  Name (_= CID, Package (0x02)  // _CID: Compatible ID
> +  {
> = +      EisaId ("PNP0A03"),
> +&nbs= p;     EisaId ("PNP0A08")
> +  })<= br>> +
> +  The package is added at the tail of the list of t= he input package node
> +  name:
> +    Nam= e ("NamePackageNode", Package () {
> +   &nb= sp;  [Pre-existing package entries],
> +    =   [Newly created integer entry]
> +    })
>= +
> +
> +  @ingroup CodeGenApis
> +
> + = @param [in]       Integer   &= nbsp;   Integer value that need to be added to
> package no= de.
> +  @param [in, out]  NameNode    =   Package named node to add the object
> to.
> +
> +=   @retval EFI_SUCCESS        &= nbsp;    Success.
> +  @retval EFI_INVALID_PARAME= TER   Invalid parameter.
> +  @retval Others &nbs= p;            &= nbsp;   Error occurred during the operation.
> +**/
>= +EFI_STATUS
> +EFIAPI
> +AmlAddIntegerToNamedPackage (
>= +  IN        UINT32  &nb= sp;            =    Integer,
> +  IN  OUT   AML_OBJECT_N= ODE_HANDLE  NameNode
> +  )
> +{
> +  EFI_= STATUS       Status;
> +  AML_OBJE= CT_NODE  *PackageNode;
> +
> +  if (NameNode =3D=3D N= ULL) {
> +    ASSERT_EFI_ERROR (FALSE);
> + = ;   return EFI_INVALID_PARAMETER;
> +  }
> +
= > +  PackageNode =3D (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (<= br>> +           =             &nb= sp;            =       NameNode,
> +    &= nbsp;           &nbs= p;            &= nbsp;            EAm= lParseIndexTerm1
> +        &= nbsp;           &nbs= p;            &= nbsp;        );
> +  if ((Pac= kageNode =3D=3D NULL)
> ||
> +      (A= mlGetNodeType ((AML_NODE_HANDLE)PackageNode) !=3D
> EAmlNodeObject)&n= bsp; ||
> +      (!AmlNodeHasOpCode (Package= Node, AML_PACKAGE_OP, 0)))
> +  {
> +    AS= SERT_EFI_ERROR (FALSE);
> +    return EFI_INVALID_PARA= METER;
> +  }
> +
> +  Status =3D AmlAddRegiste= rOrIntegerToPackage (NULL, Integer, PackageNode);
> +  if (EFI_E= RROR (Status)) {
> +    ASSERT_EFI_ERROR (Status);
= > +  }
> +
> +  return Status;
> +}
> = +
>  /** AML code generation to invoke/call another method.
&= gt;
>    This method is a subset implementation of Met= hodInvocation
> --
> 2.34.1
>
>
>
> >

IMPORTANT NOTICE: The contents of this email and any attach= ments are confidential and may also be privileged. If you are not the inten= ded recipient, please notify the sender immediately and do not disclose the= contents to any other person, use it for any purpose, or store or copy the= information in any medium. Thank you.

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#118764) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
------=_NextPart_000_0002_01DAA250.99CE52D0--