* Re: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
@ 2024-05-09 10:17 Sami Mujawar
2024-05-09 12:36 ` 回复: " gaoliming via groups.io
0 siblings, 1 reply; 6+ messages in thread
From: Sami Mujawar @ 2024-05-09 10:17 UTC (permalink / raw)
To: devel@edk2.groups.io, gaoliming@byosoft.com.cn,
'Attar, AbdulLateef (Abdul Lateef)'
Cc: Pierre Gondois, 'Leif Lindholm', 'Andrew Fish',
'Michael Kinney'
[-- Attachment #1: Type: text/plain, Size: 10127 bytes --]
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 <sami.mujawar@arm.com>
Regards,
Sami Mujawar
From: <devel@edk2.groups.io> on behalf of "gaoliming via groups.io" <gaoliming=byosoft.com.cn@groups.io>
Reply to: "devel@edk2.groups.io" <devel@edk2.groups.io>, "gaoliming@byosoft.com.cn" <gaoliming@byosoft.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.Gondois@arm.com>, Sami Mujawar <Sami.Mujawar@arm.com>, 'Leif Lindholm' <quic_llindhol@quicinc.com>, 'Andrew Fish' <afish@apple.com>, 'Michael Kinney' <michael.d.kinney@intel.com>
Subject: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
Resent from: <gaoliming@byosoft.com.cn>
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) <AbdulLateef.Attar@amd.com>
发送时间: 2024年5月9日 16:39
收件人: gaoliming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io
抄送: 'Pierre Gondois' <pierre.gondois@arm.com>; 'Sami Mujawar' <sami.mujawar@arm.com>
主题: 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 <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
Sent: Thursday, May 9, 2024 1:10 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>
Cc: 'Pierre Gondois' <pierre.gondois@arm.com<mailto:pierre.gondois@arm.com>>; 'Sami Mujawar' <sami.mujawar@arm.com<mailto:sami.mujawar@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> <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 <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Pierre Gondois
> <pierre.gondois@arm.com<mailto:pierre.gondois@arm.com>>; Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@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 <pierre.gondois@arm.com<mailto:pierre.gondois@arm.com>>
> Cc: Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>
> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto: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/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.<BR>
> - Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
reserved.<BR>
> + Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights
> reserved.<BR>
>
> 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 == NULL) {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + PackageNode = (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (
> + NameNode,
> + EAmlParseIndexTerm1
> + );
> + if ((PackageNode == NULL)
> ||
> + (AmlGetNodeType ((AML_NODE_HANDLE)PackageNode) !=
> EAmlNodeObject) ||
> + (!AmlNodeHasOpCode (PackageNode, AML_PACKAGE_OP, 0)))
> + {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + Status = AmlAddRegisterOrIntegerToPackage (NULL, Integer, PackageNode);
> + 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
>
>
>
>
>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended 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: You receive all messages sent to this group.
View/Reply Online (#118761): https://edk2.groups.io/g/devel/message/118761
Mute This Topic: https://groups.io/mt/105997751/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 28876 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* 回复: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
2024-05-09 10:17 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node Sami Mujawar
@ 2024-05-09 12:36 ` gaoliming via groups.io
2024-05-09 13:02 ` Abdul Lateef Attar via groups.io
0 siblings, 1 reply; 6+ messages in thread
From: gaoliming via groups.io @ 2024-05-09 12:36 UTC (permalink / raw)
To: devel, sami.mujawar, 'Attar, AbdulLateef (Abdul Lateef)'
Cc: 'Pierre Gondois', 'Leif Lindholm',
'Andrew Fish', 'Michael Kinney'
[-- Attachment #1: Type: text/plain, Size: 11686 bytes --]
Sami:
Thanks for your update. I agree Pierre reviewed this patch before the soft feature freeze. So, this patch can be merged for this stable tag 202405.
Thanks
Liming
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Sami Mujawar
发送时间: 2024年5月9日 18:18
收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn; 'Attar, AbdulLateef (Abdul Lateef)' <AbdulLateef.Attar@amd.com>
抄送: Pierre Gondois <Pierre.Gondois@arm.com>; 'Leif Lindholm' <quic_llindhol@quicinc.com>; 'Andrew Fish' <afish@apple.com>; 'Michael Kinney' <michael.d.kinney@intel.com>
主题: Re: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
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 <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> >
Regards,
Sami Mujawar
From: <devel@edk2.groups.io <mailto:devel@edk2.groups.io> > on behalf of "gaoliming via groups.io" <gaoliming=byosoft.com.cn@groups.io <mailto:gaoliming=byosoft.com.cn@groups.io> >
Reply to: "devel@edk2.groups.io <mailto:devel@edk2.groups.io> " <devel@edk2.groups.io <mailto:devel@edk2.groups.io> >, "gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> " <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >
Date: Thursday 9 May 2024 at 10:01
To: "'Attar, AbdulLateef (Abdul Lateef)'" <AbdulLateef.Attar@amd.com <mailto:AbdulLateef.Attar@amd.com> >, "devel@edk2.groups.io <mailto:devel@edk2.groups.io> " <devel@edk2.groups.io <mailto:devel@edk2.groups.io> >
Cc: Pierre Gondois <Pierre.Gondois@arm.com <mailto:Pierre.Gondois@arm.com> >, Sami Mujawar <Sami.Mujawar@arm.com <mailto:Sami.Mujawar@arm.com> >, 'Leif Lindholm' <quic_llindhol@quicinc.com <mailto:quic_llindhol@quicinc.com> >, 'Andrew Fish' <afish@apple.com <mailto:afish@apple.com> >, 'Michael Kinney' <michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com> >
Subject: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
Resent from: <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >
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) <AbdulLateef.Attar@amd.com <mailto:AbdulLateef.Attar@amd.com> >
发送时间: 2024年5月9日 16:39
收件人: gaoliming <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >; devel@edk2.groups.io <mailto:devel@edk2.groups.io>
抄送: 'Pierre Gondois' <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com> >; 'Sami Mujawar' <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> >
主题: 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 <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >
Sent: Thursday, May 9, 2024 1:10 PM
To: devel@edk2.groups.io <mailto:devel@edk2.groups.io> <devel@edk2.groups.io <mailto:devel@edk2.groups.io> >; Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com <mailto:AbdulLateef.Attar@amd.com> >
Cc: 'Pierre Gondois' <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com> >; 'Sami Mujawar' <sami.mujawar@arm.com <mailto:sami.mujawar@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> <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 <AbdulLateef.Attar@amd.com <mailto:AbdulLateef.Attar@amd.com> >; Pierre Gondois
> <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com> >; Sami Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@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 <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com> >
> Cc: Sami Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> >
> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com <mailto: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/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.<BR>
> - Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
reserved.<BR>
> + Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights
> reserved.<BR>
>
> 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 == NULL) {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + PackageNode = (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (
> + NameNode,
> + EAmlParseIndexTerm1
> + );
> + if ((PackageNode == NULL)
> ||
> + (AmlGetNodeType ((AML_NODE_HANDLE)PackageNode) !=
> EAmlNodeObject) ||
> + (!AmlNodeHasOpCode (PackageNode, AML_PACKAGE_OP, 0)))
> + {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + Status = AmlAddRegisterOrIntegerToPackage (NULL, Integer, PackageNode);
> + 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
>
>
>
>
>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended 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: 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]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 28815 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 回复: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
2024-05-09 12:36 ` 回复: " gaoliming via groups.io
@ 2024-05-09 13:02 ` Abdul Lateef Attar via groups.io
0 siblings, 0 replies; 6+ messages in thread
From: Abdul Lateef Attar via groups.io @ 2024-05-09 13:02 UTC (permalink / raw)
To: gaoliming, devel, sami.mujawar
Cc: 'Pierre Gondois', 'Leif Lindholm',
'Andrew Fish', 'Michael Kinney'
[-- Attachment #1: Type: text/plain, Size: 11468 bytes --]
Thanks Sami and Liming for quick response and creating the PR.
PR looks good : https://github.com/tianocore/edk2/pull/5647/
Thanks
AbduL
On 09-05-2024 18:06, gaoliming wrote:
>
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Sami:
>
> Thanks for your update. I agree Pierre reviewed this patch before the
> soft feature freeze. So, this patch can be merged for this stable tag
> 202405.
>
> Thanks
>
> Liming
>
> *发件人:*devel@edk2.groups.io <devel@edk2.groups.io> *代表 *Sami Mujawar
> *发送时间:*2024年5月9日18:18
> *收件人:*devel@edk2.groups.io; gaoliming@byosoft.com.cn; 'Attar,
> AbdulLateef (Abdul Lateef)' <AbdulLateef.Attar@amd.com>
> *抄送:*Pierre Gondois <Pierre.Gondois@arm.com>; 'Leif Lindholm'
> <quic_llindhol@quicinc.com>; 'Andrew Fish' <afish@apple.com>; 'Michael
> Kinney' <michael.d.kinney@intel.com>
> *主题:*Re: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1]
> DynamicTablesPkg: Adds integer to the AML package node
>
> 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 <sami.mujawar@arm.com>
>
> Regards,
>
> Sami Mujawar
>
> *From: *<devel@edk2.groups.io> on behalf of "gaoliming via groups.io"
> <gaoliming=byosoft.com.cn@groups.io>
> *Reply to: *"devel@edk2.groups.io" <devel@edk2.groups.io>,
> "gaoliming@byosoft.com.cn" <gaoliming@byosoft.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.Gondois@arm.com>, Sami Mujawar
> <Sami.Mujawar@arm.com>, 'Leif Lindholm' <quic_llindhol@quicinc.com>,
> 'Andrew Fish' <afish@apple.com>, 'Michael Kinney'
> <michael.d.kinney@intel.com>
> *Subject: *回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1]
> DynamicTablesPkg: Adds integer to the AML package node
> *Resent from: *<gaoliming@byosoft.com.cn>
> *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) <AbdulLateef.Attar@amd.com>
> *发送时间**:*2024年5月9日16:39
> *收件人**:*gaoliming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io
> *抄送**:*'Pierre Gondois' <pierre.gondois@arm.com>; 'Sami Mujawar'
> <sami.mujawar@arm.com>
> *主题**:*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 <gaoliming@byosoft.com.cn>
> *Sent:* Thursday, May 9, 2024 1:10 PM
> *To:* devel@edk2.groups.io <devel@edk2.groups.io>; Attar, AbdulLateef
> (Abdul Lateef) <AbdulLateef.Attar@amd.com>
> *Cc:* 'Pierre Gondois' <pierre.gondois@arm.com>; 'Sami Mujawar'
> <sami.mujawar@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 <devel@edk2.groups.io> 代表Abdul Lateef
> > Attar via groups.io
> > 发送时间: 2024年5月9日12:49
> > 收件人: devel@edk2.groups.io
> > 抄送: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Pierre Gondois
> > <pierre.gondois@arm.com>; Sami Mujawar <sami.mujawar@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 <pierre.gondois@arm.com>
> > Cc: Sami Mujawar <sami.mujawar@arm.com>
> > Signed-off-by: Abdul Lateef 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/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.<BR>
> > - Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> reserved.<BR>
> > + Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights
> > reserved.<BR>
> >
> > 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 == NULL) {
> > + ASSERT_EFI_ERROR (FALSE);
> > + return EFI_INVALID_PARAMETER;
> > + }
> > +
> > + PackageNode = (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (
> > + NameNode,
> > + EAmlParseIndexTerm1
> > + );
> > + if ((PackageNode == NULL)
> > ||
> > + (AmlGetNodeType ((AML_NODE_HANDLE)PackageNode) !=
> > EAmlNodeObject) ||
> > + (!AmlNodeHasOpCode (PackageNode, AML_PACKAGE_OP, 0)))
> > + {
> > + ASSERT_EFI_ERROR (FALSE);
> > + return EFI_INVALID_PARAMETER;
> > + }
> > +
> > + Status = AmlAddRegisterOrIntegerToPackage (NULL, Integer,
> PackageNode);
> > + 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
> >
> >
> >
> >
> >
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> 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: You receive all messages sent to this group.
View/Reply Online (#118766): https://edk2.groups.io/g/devel/message/118766
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]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 41662 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <17CDCAB2D4B8C078.5110@groups.io>]
* Re: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
[not found] <17CDCAB2D4B8C078.5110@groups.io>
@ 2024-05-09 11:40 ` Sami Mujawar
0 siblings, 0 replies; 6+ messages in thread
From: Sami Mujawar @ 2024-05-09 11:40 UTC (permalink / raw)
To: devel@edk2.groups.io, Sami Mujawar, gaoliming@byosoft.com.cn,
'Attar, AbdulLateef (Abdul Lateef)'
Cc: Pierre Gondois, 'Leif Lindholm', 'Andrew Fish',
'Michael Kinney', nd
[-- Attachment #1: Type: text/plain, Size: 11079 bytes --]
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: <devel@edk2.groups.io> on behalf of "Sami Mujawar via groups.io" <sami.mujawar=arm.com@groups.io>
Reply to: "devel@edk2.groups.io" <devel@edk2.groups.io>, Sami Mujawar <Sami.Mujawar@arm.com>
Date: Thursday 9 May 2024 at 11:18
To: "devel@edk2.groups.io" <devel@edk2.groups.io>, "gaoliming@byosoft.com.cn" <gaoliming@byosoft.com.cn>, "'Attar, AbdulLateef (Abdul Lateef)'" <AbdulLateef.Attar@amd.com>
Cc: Pierre Gondois <Pierre.Gondois@arm.com>, 'Leif Lindholm' <quic_llindhol@quicinc.com>, 'Andrew Fish' <afish@apple.com>, 'Michael Kinney' <michael.d.kinney@intel.com>
Subject: Re: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
Resent from: <sami.mujawar@arm.com>
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 <sami.mujawar@arm.com>
Regards,
Sami Mujawar
From: <devel@edk2.groups.io> on behalf of "gaoliming via groups.io" <gaoliming=byosoft.com.cn@groups.io>
Reply to: "devel@edk2.groups.io" <devel@edk2.groups.io>, "gaoliming@byosoft.com.cn" <gaoliming@byosoft.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.Gondois@arm.com>, Sami Mujawar <Sami.Mujawar@arm.com>, 'Leif Lindholm' <quic_llindhol@quicinc.com>, 'Andrew Fish' <afish@apple.com>, 'Michael Kinney' <michael.d.kinney@intel.com>
Subject: 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
Resent from: <gaoliming@byosoft.com.cn>
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) <AbdulLateef.Attar@amd.com>
发送时间: 2024年5月9日 16:39
收件人: gaoliming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io
抄送: 'Pierre Gondois' <pierre.gondois@arm.com>; 'Sami Mujawar' <sami.mujawar@arm.com>
主题: 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 <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
Sent: Thursday, May 9, 2024 1:10 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>
Cc: 'Pierre Gondois' <pierre.gondois@arm.com<mailto:pierre.gondois@arm.com>>; 'Sami Mujawar' <sami.mujawar@arm.com<mailto:sami.mujawar@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> <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 <AbdulLateef.Attar@amd.com<mailto:AbdulLateef.Attar@amd.com>>; Pierre Gondois
> <pierre.gondois@arm.com<mailto:pierre.gondois@arm.com>>; Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@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 <pierre.gondois@arm.com<mailto:pierre.gondois@arm.com>>
> Cc: Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>
> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com<mailto: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/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.<BR>
> - Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
reserved.<BR>
> + Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights
> reserved.<BR>
>
> 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 == NULL) {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + PackageNode = (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (
> + NameNode,
> + EAmlParseIndexTerm1
> + );
> + if ((PackageNode == NULL)
> ||
> + (AmlGetNodeType ((AML_NODE_HANDLE)PackageNode) !=
> EAmlNodeObject) ||
> + (!AmlNodeHasOpCode (PackageNode, AML_PACKAGE_OP, 0)))
> + {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + Status = AmlAddRegisterOrIntegerToPackage (NULL, Integer, PackageNode);
> + 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
>
>
>
>
>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended 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: You receive all messages sent to this group.
View/Reply Online (#118762): https://edk2.groups.io/g/devel/message/118762
Mute This Topic: https://groups.io/mt/105997751/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 32189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [edk2-devel] [edk2-stable202405 RESEND PATCH v2 0/1] DynamicTablesPkg: Adds integer to the AML package node
@ 2024-05-09 4:48 Abdul Lateef Attar via groups.io
2024-05-09 4:48 ` [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] " Abdul Lateef Attar via groups.io
0 siblings, 1 reply; 6+ messages in thread
From: Abdul Lateef Attar via groups.io @ 2024-05-09 4:48 UTC (permalink / raw)
To: devel
Cc: Abdul Lateef Attar, Pierre Gondois, Sami Mujawar, Liming Gao,
Michael D Kinney
Please concider this patch for stable release.
PR: https://github.com/tianocore/edk2/pull/5636
This patch adds integer to the AML package node.
v2 delta : Addressed comments from Pierre Gondois
Cc: Pierre Gondois <pierre.gondois@arm.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Abdul Lateef Attar (1):
DynamicTablesPkg: Adds integer to the AML package node
.../Include/Library/AmlLib/AmlLib.h | 41 +++++++++++-
.../Common/AmlLib/CodeGen/AmlCodeGen.c | 67 +++++++++++++++++++
2 files changed, 107 insertions(+), 1 deletion(-)
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118713): https://edk2.groups.io/g/devel/message/118713
Mute This Topic: https://groups.io/mt/105995994/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 6+ messages in thread
* [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
2024-05-09 4:48 [edk2-devel] [edk2-stable202405 RESEND PATCH v2 0/1] " Abdul Lateef Attar via groups.io
@ 2024-05-09 4:48 ` Abdul Lateef Attar via groups.io
2024-05-09 7:40 ` 回复: " gaoliming via groups.io
0 siblings, 1 reply; 6+ messages in thread
From: Abdul Lateef Attar via groups.io @ 2024-05-09 4:48 UTC (permalink / raw)
To: devel; +Cc: Abdul Lateef Attar, Pierre Gondois, Sami Mujawar
Adds an AmlAddIntegerToNamedPackage() API to generate AML code,
which adds an integer value to the package node.
Cc: Pierre Gondois <pierre.gondois@arm.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Abdul Lateef 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/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.<BR>
- Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+ Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights reserved.<BR>
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 == NULL) {
+ ASSERT_EFI_ERROR (FALSE);
+ return EFI_INVALID_PARAMETER;
+ }
+
+ PackageNode = (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (
+ NameNode,
+ EAmlParseIndexTerm1
+ );
+ if ((PackageNode == NULL) ||
+ (AmlGetNodeType ((AML_NODE_HANDLE)PackageNode) != EAmlNodeObject) ||
+ (!AmlNodeHasOpCode (PackageNode, AML_PACKAGE_OP, 0)))
+ {
+ ASSERT_EFI_ERROR (FALSE);
+ return EFI_INVALID_PARAMETER;
+ }
+
+ Status = AmlAddRegisterOrIntegerToPackage (NULL, Integer, PackageNode);
+ 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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118714): https://edk2.groups.io/g/devel/message/118714
Mute This Topic: https://groups.io/mt/105995995/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 6+ messages in thread
* 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
2024-05-09 4:48 ` [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] " Abdul Lateef Attar via groups.io
@ 2024-05-09 7:40 ` gaoliming via groups.io
2024-05-09 8:39 ` Abdul Lateef Attar via groups.io
0 siblings, 1 reply; 6+ messages in thread
From: gaoliming via groups.io @ 2024-05-09 7:40 UTC (permalink / raw)
To: devel, AbdulLateef.Attar; +Cc: 'Pierre Gondois', 'Sami Mujawar'
Abdul:
Can you give more information why this change is required for this stable
tag 202405?
Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Abdul Lateef
> Attar via groups.io
> 发送时间: 2024年5月9日 12:49
> 收件人: devel@edk2.groups.io
> 抄送: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Pierre Gondois
> <pierre.gondois@arm.com>; Sami Mujawar <sami.mujawar@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 <pierre.gondois@arm.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Signed-off-by: Abdul Lateef 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/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.<BR>
> - Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
reserved.<BR>
> + Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights
> reserved.<BR>
>
> 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 == NULL) {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + PackageNode = (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (
> + NameNode,
> + EAmlParseIndexTerm1
> + );
> + if ((PackageNode == NULL)
> ||
> + (AmlGetNodeType ((AML_NODE_HANDLE)PackageNode) !=
> EAmlNodeObject) ||
> + (!AmlNodeHasOpCode (PackageNode, AML_PACKAGE_OP, 0)))
> + {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + Status = AmlAddRegisterOrIntegerToPackage (NULL, Integer, PackageNode);
> + 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
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118747): https://edk2.groups.io/g/devel/message/118747
Mute This Topic: https://groups.io/mt/105997290/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
2024-05-09 7:40 ` 回复: " gaoliming via groups.io
@ 2024-05-09 8:39 ` Abdul Lateef Attar via groups.io
2024-05-09 9:00 ` 回复: " gaoliming via groups.io
0 siblings, 1 reply; 6+ messages in thread
From: Abdul Lateef Attar via groups.io @ 2024-05-09 8:39 UTC (permalink / raw)
To: gaoliming, devel@edk2.groups.io
Cc: 'Pierre Gondois', 'Sami Mujawar'
[-- Attachment #1: Type: text/plain, Size: 7307 bytes --]
[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 <gaoliming@byosoft.com.cn>
Sent: Thursday, May 9, 2024 1:10 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>; Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>
Cc: 'Pierre Gondois' <pierre.gondois@arm.com>; 'Sami Mujawar' <sami.mujawar@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 <devel@edk2.groups.io> 代表 Abdul Lateef
> Attar via groups.io
> 发送时间: 2024年5月9日 12:49
> 收件人: devel@edk2.groups.io
> 抄送: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>; Pierre Gondois
> <pierre.gondois@arm.com>; Sami Mujawar <sami.mujawar@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 <pierre.gondois@arm.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Signed-off-by: Abdul Lateef 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/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.<BR>
> - Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
reserved.<BR>
> + Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights
> reserved.<BR>
>
> 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 == NULL) {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + PackageNode = (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (
> + NameNode,
> + EAmlParseIndexTerm1
> + );
> + if ((PackageNode == NULL)
> ||
> + (AmlGetNodeType ((AML_NODE_HANDLE)PackageNode) !=
> EAmlNodeObject) ||
> + (!AmlNodeHasOpCode (PackageNode, AML_PACKAGE_OP, 0)))
> + {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + Status = AmlAddRegisterOrIntegerToPackage (NULL, Integer, PackageNode);
> + 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
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118752): https://edk2.groups.io/g/devel/message/118752
Mute This Topic: https://groups.io/mt/105997619/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 13940 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node
2024-05-09 8:39 ` Abdul Lateef Attar via groups.io
@ 2024-05-09 9:00 ` gaoliming via groups.io
0 siblings, 0 replies; 6+ messages in thread
From: gaoliming via groups.io @ 2024-05-09 9:00 UTC (permalink / raw)
To: 'Attar, AbdulLateef (Abdul Lateef)', devel
Cc: 'Pierre Gondois', 'Sami Mujawar',
'Leif Lindholm', 'Andrew Fish',
'Michael Kinney'
[-- Attachment #1: Type: text/plain, Size: 8347 bytes --]
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) <AbdulLateef.Attar@amd.com>
发送时间: 2024年5月9日 16:39
收件人: gaoliming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io
抄送: 'Pierre Gondois' <pierre.gondois@arm.com>; 'Sami Mujawar'
<sami.mujawar@arm.com>
主题: 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 <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>
>
Sent: Thursday, May 9, 2024 1:10 PM
To: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
<devel@edk2.groups.io <mailto:devel@edk2.groups.io> >; Attar, AbdulLateef
(Abdul Lateef) <AbdulLateef.Attar@amd.com <mailto:AbdulLateef.Attar@amd.com>
>
Cc: 'Pierre Gondois' <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com>
>; 'Sami Mujawar' <sami.mujawar@arm.com <mailto:sami.mujawar@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>
<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 <AbdulLateef.Attar@amd.com
<mailto:AbdulLateef.Attar@amd.com> >; Pierre Gondois
> <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com> >; Sami Mujawar
<sami.mujawar@arm.com <mailto:sami.mujawar@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 <pierre.gondois@arm.com <mailto:pierre.gondois@arm.com>
>
> Cc: Sami Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> >
> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com
<mailto: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/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.<BR>
> - Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
reserved.<BR>
> + Copyright (C) 2023 - 2024, Advanced Micro Devices, Inc. All rights
> reserved.<BR>
>
> 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 == NULL) {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + PackageNode = (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (
> + NameNode,
> + EAmlParseIndexTerm1
> + );
> + if ((PackageNode == NULL)
> ||
> + (AmlGetNodeType ((AML_NODE_HANDLE)PackageNode) !=
> EAmlNodeObject) ||
> + (!AmlNodeHasOpCode (PackageNode, AML_PACKAGE_OP, 0)))
> + {
> + ASSERT_EFI_ERROR (FALSE);
> + return EFI_INVALID_PARAMETER;
> + }
> +
> + Status = AmlAddRegisterOrIntegerToPackage (NULL, Integer, PackageNode);
> + 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
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118757): https://edk2.groups.io/g/devel/message/118757
Mute This Topic: https://groups.io/mt/105997751/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 18022 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-05-09 13:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09 10:17 回复: [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] DynamicTablesPkg: Adds integer to the AML package node Sami Mujawar
2024-05-09 12:36 ` 回复: " gaoliming via groups.io
2024-05-09 13:02 ` Abdul Lateef Attar via groups.io
[not found] <17CDCAB2D4B8C078.5110@groups.io>
2024-05-09 11:40 ` Sami Mujawar
-- strict thread matches above, loose matches on Subject: below --
2024-05-09 4:48 [edk2-devel] [edk2-stable202405 RESEND PATCH v2 0/1] " Abdul Lateef Attar via groups.io
2024-05-09 4:48 ` [edk2-devel] [edk2-stable202405 RESEND PATCH v2 1/1] " Abdul Lateef Attar via groups.io
2024-05-09 7:40 ` 回复: " gaoliming via groups.io
2024-05-09 8:39 ` Abdul Lateef Attar via groups.io
2024-05-09 9:00 ` 回复: " gaoliming via groups.io
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox