Re: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node

2024-05-09 Thread Sami Mujawar
Hi Liming,

If the decision is to merge this patch, I have created a pull request at 
https://github.com/tianocore/edk2/pull/5647

Regards,

Sami Mujawar

From:  on behalf of "Sami Mujawar via groups.io" 

Reply to: "devel@edk2.groups.io" , Sami Mujawar 

Date: Thursday 9 May 2024 at 11:18
To: "devel@edk2.groups.io" , "gaolim...@byosoft.com.cn" 
, "'Attar, AbdulLateef (Abdul Lateef)'" 

Cc: Pierre Gondois , 'Leif Lindholm' 
, 'Andrew Fish' , 'Michael Kinney' 

Subject: Re: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] 
DynamicTablesPkg: Adds integer to the AML package node
Resent from: 
Resent date: Thursday 9 May 2024 at 11:18

Hi Liming,

> What’s 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 patch. 
Ideally Pierre’s the r-b tag could have been carried forward.

> Is this a required bug fix or new feature?
This is adding a new feature by introducing a new API, and I think it should 
not impact the existing functionality as such.
So, by merging this patch the risk of breaking existing functionality seems to 
be low.

This patch looks good to me.
Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar



From:  on behalf of "gaoliming via groups.io" 

Reply to: "devel@edk2.groups.io" , 
"gaolim...@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 
, 'Leif Lindholm' , 'Andrew 
Fish' , 'Michael Kinney' 
Subject: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] 
DynamicTablesPkg: Adds integer to the AML package node
Resent from: 
Resent date: Thursday 9 May 2024 at 10:00

Sami and Pierre:
  What’s your comments for this patch? Is this a required bug fix or new 
feature?

Thanks
Liming
发件人: Attar, AbdulLateef (Abdul Lateef) 
发送时间: 2024年5月9日 16:39
收件人: gaoliming ; devel@edk2.groups.io
抄送: 'Pierre Gondois' ; 'Sami Mujawar' 

主题: Re: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: 
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 static ASL files.

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

Thanks
AbduL

From: gaoliming mailto:gaolim...@byosoft.com.cn>>
Sent: Thursday, May 9, 2024 1:10 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>>; Attar, AbdulLateef (Abdul 
Lateef) mailto:abdullateef.at...@amd.com>>
Cc: 'Pierre Gondois' mailto:pierre.gond...@arm.com>>; 
'Sami Mujawar' mailto:sami.muja...@arm.com>>
Subject: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] 
DynamicTablesPkg: Adds integer to the AML package node

Caution: This message originated from an External Source. Use proper caution 
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
> -邮件原件-
> 发件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
> mailto:devel@edk2.groups.io>> 代表 Abdul Lateef
> Attar via groups.io
> 发送时间: 2024年5月9日 12:49
> 收件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> 抄送: Abdul Lateef Attar 
> mailto:abdullateef.at...@amd.com>>; Pierre Gondois
> mailto:pierre.gond...@arm.com>>; Sami Mujawar 
> mailto:sami.muja...@arm.com>>
> 主题: [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 mailto:pierre.gond...@arm.com>>
> Cc: Sami Mujawar mailto:sami.muja...@arm.com>>
> Signed-off-by: Abdul Lateef Attar 
> mailto:abdullateef.at...@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/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 

Re: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node

2024-05-09 Thread Sami Mujawar
Hi Liming,

> What’s 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 patch. 
Ideally Pierre’s the r-b tag could have been carried forward.

> Is this a required bug fix or new feature?
This is adding a new feature by introducing a new API, and I think it should 
not impact the existing functionality as such.
So, by merging this patch the risk of breaking existing functionality seems to 
be low.

This patch looks good to me.
Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar


From:  on behalf of "gaoliming via groups.io" 

Reply to: "devel@edk2.groups.io" , 
"gaolim...@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 
, 'Leif Lindholm' , 'Andrew 
Fish' , 'Michael Kinney' 
Subject: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] 
DynamicTablesPkg: Adds integer to the AML package node
Resent from: 
Resent date: Thursday 9 May 2024 at 10:00

Sami and Pierre:
  What’s your comments for this patch? Is this a required bug fix or new 
feature?

Thanks
Liming
发件人: Attar, AbdulLateef (Abdul Lateef) 
发送时间: 2024年5月9日 16:39
收件人: gaoliming ; devel@edk2.groups.io
抄送: 'Pierre Gondois' ; 'Sami Mujawar' 

主题: Re: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: 
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 static ASL files.

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

Thanks
AbduL

From: gaoliming mailto:gaolim...@byosoft.com.cn>>
Sent: Thursday, May 9, 2024 1:10 PM
To: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>>; Attar, AbdulLateef (Abdul 
Lateef) mailto:abdullateef.at...@amd.com>>
Cc: 'Pierre Gondois' mailto:pierre.gond...@arm.com>>; 
'Sami Mujawar' mailto:sami.muja...@arm.com>>
Subject: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] 
DynamicTablesPkg: Adds integer to the AML package node

Caution: This message originated from an External Source. Use proper caution 
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
> -邮件原件-
> 发件人: devel@edk2.groups.io 
> mailto:devel@edk2.groups.io>> 代表 Abdul Lateef
> Attar via groups.io
> 发送时间: 2024年5月9日 12:49
> 收件人: devel@edk2.groups.io
> 抄送: Abdul Lateef Attar 
> mailto:abdullateef.at...@amd.com>>; Pierre Gondois
> mailto:pierre.gond...@arm.com>>; Sami Mujawar 
> mailto:sami.muja...@arm.com>>
> 主题: [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 mailto:pierre.gond...@arm.com>>
> Cc: Sami Mujawar mailto:sami.muja...@arm.com>>
> Signed-off-by: Abdul Lateef Attar 
> mailto:abdullateef.at...@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/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, );
> +  AmlGetEisaIdFromString ("PNP0A03", );
> +  AmlAddIntegerToNamedPackage (EisaId, NameNode);
> +  AmlGetEisaIdFromString ("PNP0A08", );
> +  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