From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.86]) by mx.groups.io with SMTP id smtpd.web09.10075.1633702638891794337 for ; Fri, 08 Oct 2021 07:17:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=2hrWX/Uo; spf=pass (domain: arm.com, ip: 40.107.6.86, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pZ1dlNs5Dp1scdpzzQMERZCWhPfP+fF1HaD6RV50qR8=; b=2hrWX/Uoou5AMtOL6YU1LEEftrl1f0gzbXHCokbooIVb8nwRFBHedpkgklkzj0v8rSkv5EMkqA8+DmGojCpHeZsexnDBMRLfjPmWrYL2xj4vfqfyaPLE2RNHEUVJRTd3L3/96vX8RsT5+tinoIH/HPnnJfHQFfUAMJa1xtjYKQk= Received: from AM0PR03CA0035.eurprd03.prod.outlook.com (2603:10a6:208:14::48) by VI1PR08MB2910.eurprd08.prod.outlook.com (2603:10a6:802:25::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14; Fri, 8 Oct 2021 14:17:15 +0000 Received: from VE1EUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:14:cafe::c8) by AM0PR03CA0035.outlook.office365.com (2603:10a6:208:14::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.16 via Frontend Transport; Fri, 8 Oct 2021 14:17:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT039.mail.protection.outlook.com (10.152.19.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18 via Frontend Transport; Fri, 8 Oct 2021 14:17:14 +0000 Received: ("Tessian outbound d5def7722ff7:v103"); Fri, 08 Oct 2021 14:17:14 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 296f1c181f4a1996 X-CR-MTA-TID: 64aa7808 Received: from 899ee85c972b.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D3DC95A9-0E59-4081-8C58-74CA46A790F7.1; Fri, 08 Oct 2021 14:17:03 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 899ee85c972b.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 08 Oct 2021 14:17:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TfbKW6mvhAoKDweBY8lEcm1atFueBa1LOWEdvNqyTp+Wg6di5SLqWtBegpo37QpQagumC+Ttc8gUUQOGN02ersY3k68EEK/14DJ5usm7t6agX5QoptC1YxHXdzg7hG0eDKEnju385l3NWvBfCu4qa5Y0LOWG2Nr9K2WDVXjSWcwgj5LCRXj7xf6w0aHu+0f1dW361h0jha44ru7hC7hXozAauqmwHQAS0Gyj7qWc3l5EgCHiPzE1gt63Dphz2ugWsvVaKzscvzA/p6tsBjxRpQrK2dYTFMnhJbuPy+ZVJydgAIUECz8pG20I2N5mcY5f/c+oc2eJihBCCLvJIzQW8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pZ1dlNs5Dp1scdpzzQMERZCWhPfP+fF1HaD6RV50qR8=; b=GE1ElovtQ0pSr1pV4wPjrlhB8nKW4fc45anLJprwNRyLCgR8YwiD/W8txsi89N5OHH2fbsZhFTcwyQSJjb0rjjLfHij5VJxHsBuBxqAhLfVXsqSU8UbsTW9xS6Q0YL6XuFsm+1z0k+dQEiKnS7wO/XDLiapJHUV16tmyUqTipEd8tYtUqGzwM1nBYJ6L9TSXN5BibcJwDZuez8P1wxcQy8zyAmWZsRtA+Rk8payE40vjqshXtNLbomcda7mbebU+Bp1Qf4bAoovUdu1RY8vswzluxvzlxiUjRGOWqd7AELcx2Jyq7jU/MvgsCRk7csJKr84Vxwz+D+yg0jn4dzwfXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pZ1dlNs5Dp1scdpzzQMERZCWhPfP+fF1HaD6RV50qR8=; b=2hrWX/Uoou5AMtOL6YU1LEEftrl1f0gzbXHCokbooIVb8nwRFBHedpkgklkzj0v8rSkv5EMkqA8+DmGojCpHeZsexnDBMRLfjPmWrYL2xj4vfqfyaPLE2RNHEUVJRTd3L3/96vX8RsT5+tinoIH/HPnnJfHQFfUAMJa1xtjYKQk= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AS8PR08MB6119.eurprd08.prod.outlook.com (2603:10a6:20b:290::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20; Fri, 8 Oct 2021 14:17:01 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::54b5:239d:9896:ee65%4]) with mapi id 15.20.4587.022; Fri, 8 Oct 2021 14:17:01 +0000 Subject: Re: [PATCH v2 17/21] DynamicTablesPkg: AML code generation for a Method returning a NS To: Pierre.Gondois@arm.com, devel@edk2.groups.io, Alexei.Fedorov@arm.com, nd References: <20211007153210.26608-1-Pierre.Gondois@arm.com> <20211007153210.26608-18-Pierre.Gondois@arm.com> From: "Sami Mujawar" Message-ID: <484b43a2-b47d-98c6-3da2-05c89cc3f681@arm.com> Date: Fri, 8 Oct 2021 15:17:07 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20211007153210.26608-18-Pierre.Gondois@arm.com> X-ClientProxiedBy: LO2P265CA0268.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a1::16) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 Received: from [10.1.196.43] (217.140.106.52) by LO2P265CA0268.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20 via Frontend Transport; Fri, 8 Oct 2021 14:17:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3a515bd3-d47b-4c3e-f564-08d98a6653e1 X-MS-TrafficTypeDiagnostic: AS8PR08MB6119:|VI1PR08MB2910: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7219;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 6d1njKU6ILD/0paGixV+QHByj/9sAulzOjb9KEaEAKPFSgWLKKnTZiU9v41YZUcI7ZJpTUOfkgZpi63e7BdJt9pZz+yyCa/vMsukhhuy1vUqluEIlyrILfnITuPhBBnL/vT2+tNgzEV3SlYrHvyhJEHc7LPvXbuBpcYFz6emGh6B2BoTaJrsYtInuOWoD2dUaajK0CnEU8fy3ayQHY23SeESuRZoR1iTfplpxkuFUI+KpE1BlB7X6XsLloUnAXe+/wAFO/a28kIyJS0sKo70dzANB+Tef3XDchSJAHOjFTz7tcOLq1oWuxhfpBj4DNIER4JiVBqVYwhTEtBljWvS/BgjwnVaCZIb2b1mJOxYAPEZgusTa5fojVLDeOhXD7AQnwLjxlyiXAiBShlopcdhCaevoD46KLs0++yRB+7AGPKPfDm7m/dcPJIuaqBWIbBDtudDsBu++k05Vq1m2QZnQe/CpMTtr4uG2dBj/uX/net+mN0WKI52Qm+zEt2KXZ3bOwmOmoLo12rdkVaACmN9TwQv4QYE4DObPxSvK0eSQ54TKPmtfjOpsl2QECqwXA4yFFKokgnc/4vMJCBO8FYEVp8srBOskK9u4A8ZbuOeJf27WHn7TVc61UI0C6lc2tXFSW4rQNP5sSzuoAvgHBJ0cqPkgzp2HrtKn1g4f/MBzgfYN0pqUxAuFHhiQy5O+rdb+Tm7EuPtHFB+IuKdEYu5Vp0KR4a6TblGCawTsojfp6i3XFpE15pFGObLl4UBEHgP2qBqlMWI8grNuId6t2WtuQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(8676002)(316002)(2906002)(6636002)(16576012)(6862004)(8936002)(508600001)(66946007)(37006003)(6486002)(5660300002)(52116002)(44832011)(38100700002)(31686004)(38350700002)(86362001)(31696002)(53546011)(186003)(26005)(2616005)(36756003)(66476007)(66556008)(956004)(83380400001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6119 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 41da92c6-3612-4e89-0b44-08d98a664c04 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pAES+qTXtSzQWZGtfnsFQCRc4P456SFhi/senkDPngYlR1UP9EStURFGEpLb2zxTzmq5wXLBz2c6zPngL3GmndfJ94FEy4F3bFEpCikPn2Bk8URPG5RC0kETnW5Va6zATKJ+ux9LDbUerM/9W9KeLs3ZMEP0Y/kw11DCWhT8uMZRlTQlwkuKR/6HpQVMFwusoR8R5b0xD24DCPVnNZ80pK97XG7DohJ63digY+PYk7gmt1nMqdcIdnpHlJ3h/tD2PeBNRzi1vwYz27QrhUzZo2eBKvL4tc2c4Iz1BRfAgXEXmMijip/+dcTZiJZxNz/HI1tAwUNqUlF2mkfGe2VPrLvkbb3wHelPuevQXa3SxS9rYv6Hd6KKyHJM3GQAQPK4kaLBL98A2H4HtAkC1bo69cBlwKLimwrQgOPo7V1hd4rklPJj3hSAbhbDf0C/eUDjE/bGIddWGZ8m35EkHWyX9BFXyzGm5rUZvTKRbwwA+yAthRn71biYl7Ni3Ft/86ZiNthGhknzCXTRDhHjoOg/JN4Kg8/Y+xa2pyZX2TOc4e6zvQmKZNHVMR9cOIud7UZqunUdIesJurlNODMZXq4elyog1Dz6X5MtfRVh3VbKKuM11X6tSNz9rUl4xXEFhG7EtLym29znU3G6w/NImBXNQR8c6jxbKkC9LtVdlAPFMSpwTpbEQTxB5uUZa4khjAcp9XAzAEHkiFwMX6DO0Gy3hxVHsBlB+PAL5jt8ePevGq4= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(8676002)(186003)(316002)(956004)(31686004)(81166007)(36860700001)(26005)(53546011)(47076005)(37006003)(6636002)(2616005)(6486002)(70206006)(16576012)(83380400001)(86362001)(508600001)(8936002)(5660300002)(36756003)(336012)(70586007)(31696002)(44832011)(356005)(82310400003)(2906002)(6862004)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2021 14:17:14.6887 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3a515bd3-d47b-4c3e-f564-08d98a6653e1 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2910 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-GB Hi Pierre, I think this v2 patch has introduced an issue (which was not there in v1), see my comment marked inline as [SAMI]. With that fixed, Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 07/10/2021 04:32 PM, Pierre.Gondois@arm.com wrote: > From: Pierre Gondois > > Add AmlCodeGenMethodRetNameString() to generate AML code to create > a Method returning a NameString (NS). > > AmlCodeGenMethodRetNameString ( > "MET0", "_CRS", 1, TRUE, 3, ParentNode, NewObjectNode > ); > is equivalent of the following ASL code: > Method(MET0, 1, Serialized, 3) { > Return (_CRS) > } > > Signed-off-by: Pierre Gondois > --- > .../Include/Library/AmlLib/AmlLib.h | 53 +++++++++ > .../Common/AmlLib/CodeGen/AmlCodeGen.c | 107 ++++++++++++++++++ > 2 files changed, 160 insertions(+) > > diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h b/DynamicTa= blesPkg/Include/Library/AmlLib/AmlLib.h > index 6824cf3a6c82..7740aac24470 100644 > --- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h > +++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h > @@ -619,6 +619,59 @@ AmlCodeGenScope ( > OUT AML_OBJECT_NODE_HANDLE * NewObjectNode OPTIONAL > ); > > +/** AML code generation for a method returning a NameString. > + > + AmlCodeGenMethodRetNameString ( > + "MET0", "_CRS", 1, TRUE, 3, ParentNode, NewObjectNode > + ); > + is equivalent of the following ASL code: > + Method(MET0, 1, Serialized, 3) { > + Return (_CRS) > + } > + > + The ASL parameters "ReturnType" and "ParameterTypes" are not asked > + in this function. They are optional parameters in ASL. > + > + @ingroup CodeGenApis > + > + @param [in] MethodNameString The new Method's name. > + Must be a NULL-terminated ASL NameSt= ring > + e.g.: "MET0", "_SB.MET0", etc. > + The input string is copied. > + @param [in] ReturnedNameString The name of the object returned by t= he > + method. Optional parameter, can be: > + - NULL (ignored). > + - A NULL-terminated ASL NameString. > + e.g.: "MET0", "_SB.MET0", etc. > + The input string is copied. > + @param [in] NumArgs Number of arguments. > + Must be 0 <=3D NumArgs <=3D 6. > + @param [in] IsSerialized TRUE is equivalent to Serialized. > + FALSE is equivalent to NotSerialized= . > + Default is NotSerialized in ASL spec= . > + @param [in] SyncLevel Synchronization level for the method= . > + Must be 0 <=3D SyncLevel <=3D 15. > + Default is 0 in ASL. > + @param [in] ParentNode If provided, set ParentNode as the p= arent > + of the node created. > + @param [out] NewObjectNode If success, contains the created nod= e. > + > + @retval EFI_SUCCESS Success. > + @retval EFI_INVALID_PARAMETER Invalid parameter. > + @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. > +**/ > +EFI_STATUS > +EFIAPI > +AmlCodeGenMethodRetNameString ( > + IN CONST CHAR8 * MethodNameString, > + IN CONST CHAR8 * ReturnedNameString, OPTIONAL > + IN UINT8 NumArgs, > + IN BOOLEAN IsSerialized, > + IN UINT8 SyncLevel, > + IN AML_NODE_HANDLE ParentNode, OPTIONAL > + OUT AML_OBJECT_NODE_HANDLE * NewObjectNode OPTIONAL > + ); > + > // DEPRECATED APIS > #ifndef DISABLE_NEW_DEPRECATED_INTERFACES > > diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c = b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c > index 93d4ba79e937..67474094b975 100644 > --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c > +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c > @@ -1335,3 +1335,110 @@ exit_handler: > } > return Status; > } > + > +/** AML code generation for a method returning a NameString. > + > + AmlCodeGenMethodRetNameString ( > + "MET0", "_CRS", 1, TRUE, 3, ParentNode, NewObjectNode > + ); > + is equivalent of the following ASL code: > + Method(MET0, 1, Serialized, 3) { > + Return (_CRS) > + } > + > + The ASL parameters "ReturnType" and "ParameterTypes" are not asked > + in this function. They are optional parameters in ASL. > + > + @param [in] MethodNameString The new Method's name. > + Must be a NULL-terminated ASL NameSt= ring > + e.g.: "MET0", "_SB.MET0", etc. > + The input string is copied. > + @param [in] ReturnedNameString The name of the object returned by t= he > + method. Optional parameter, can be: > + - NULL (ignored). > + - A NULL-terminated ASL NameString. > + e.g.: "MET0", "_SB.MET0", etc. > + The input string is copied. > + @param [in] NumArgs Number of arguments. > + Must be 0 <=3D NumArgs <=3D 6. > + @param [in] IsSerialized TRUE is equivalent to Serialized. > + FALSE is equivalent to NotSerialized= . > + Default is NotSerialized in ASL spec= . > + @param [in] SyncLevel Synchronization level for the method= . > + Must be 0 <=3D SyncLevel <=3D 15. > + Default is 0 in ASL. > + @param [in] ParentNode If provided, set ParentNode as the p= arent > + of the node created. > + @param [out] NewObjectNode If success, contains the created nod= e. > + > + @retval EFI_SUCCESS Success. > + @retval EFI_INVALID_PARAMETER Invalid parameter. > + @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. > +**/ > +EFI_STATUS > +EFIAPI > +AmlCodeGenMethodRetNameString ( > + IN CONST CHAR8 * MethodNameString, > + IN CONST CHAR8 * ReturnedNameString, OPTIONAL > + IN UINT8 NumArgs, > + IN BOOLEAN IsSerialized, > + IN UINT8 SyncLevel, > + IN AML_NODE_HANDLE ParentNode, OPTIONAL > + OUT AML_OBJECT_NODE_HANDLE * NewObjectNode OPTIONAL > + ) > +{ > + EFI_STATUS Status; > + AML_OBJECT_NODE_HANDLE MethodNode; > + > + if ((MethodNameString =3D=3D NULL) || > + ((ParentNode =3D=3D NULL) && (NewObjectNode =3D=3D NULL))) { > + ASSERT (0); > + return EFI_INVALID_PARAMETER; > + } > + > + // Create a Method named MethodNameString. > + Status =3D AmlCodeGenMethod ( > + MethodNameString, > + NumArgs, > + IsSerialized, > + SyncLevel, > + NULL, > + &MethodNode > + ); > + if (EFI_ERROR (Status)) { > + ASSERT (0); > + return Status; > + } > + > + // Return ReturnedNameString if provided. > + if (ReturnedNameString !=3D NULL) { > + Status =3D AmlCodeGenReturnNameString ( > + ReturnedNameString, > + (AML_NODE_HANDLE)MethodNode, > + NULL > + ); > + if (EFI_ERROR (Status)) { > + ASSERT (0); > + MethodNode =3D NULL; [SAMI] Setting MethodNode to NULL will result in the MethodNode not being deleted in case of an error. > + goto error_handler; > + } > + } > + > + Status =3D LinkNode ( > + MethodNode, > + ParentNode, > + NewObjectNode > + ); > + if (EFI_ERROR (Status)) { > + ASSERT (0); > + goto error_handler; > + } > + > + return Status; > + > +error_handler: > + if (MethodNode !=3D NULL) { > + AmlDeleteTree ((AML_NODE_HANDLE)MethodNode); > + } > + return Status; > +} 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.