From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-DB5-obe.outbound.protection.outlook.com (EUR03-DB5-obe.outbound.protection.outlook.com [40.107.4.68]) by mx.groups.io with SMTP id smtpd.web11.9744.1633101852826987373 for ; Fri, 01 Oct 2021 08:24:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=clcq9pJc; spf=pass (domain: arm.com, ip: 40.107.4.68, 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=B5BaXCx6Bw9/yekLY+EgvRQbDvbI0OJ05mfS2I1kMhk=; b=clcq9pJcY+9UJTG15oSL5AuFe8xnQIg68KbpWwwlBPIuSVAZJWzI/Th3Aj+rAjIkqz0fobvkLZ28RDkqN6MDpQDxjWI7wsfNZCPXLAmwesaxcAeSEC2KsFLlZJajU6KQolIIXqTjum0OLTW04IGkH4fuw4QHNqioKf9bBymnRtY= Received: from AM6PR02CA0004.eurprd02.prod.outlook.com (2603:10a6:20b:6e::17) by VI1PR08MB4208.eurprd08.prod.outlook.com (2603:10a6:803:ec::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Fri, 1 Oct 2021 15:24:05 +0000 Received: from VE1EUR03FT011.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:6e:cafe::2d) by AM6PR02CA0004.outlook.office365.com (2603:10a6:20b:6e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Fri, 1 Oct 2021 15:24:05 +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 VE1EUR03FT011.mail.protection.outlook.com (10.152.18.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Fri, 1 Oct 2021 15:24:04 +0000 Received: ("Tessian outbound 010023020eef:v103"); Fri, 01 Oct 2021 15:24:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4349117bb481a36f X-CR-MTA-TID: 64aa7808 Received: from 53098f937234.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9477C9FB-D02F-402A-A6EE-D96BB87F9C64.1; Fri, 01 Oct 2021 15:23:54 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 53098f937234.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 01 Oct 2021 15:23:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V7UiaMckompNBa2C7vaDZYfsE5UqeeQFcwyA3XoUfYplvQ7HmtlRQ8PUKouGce8gjsF9Z+IXgUkj5u+ZIOCu1GzTl/3FgWw7peqDmmUefEnWWzLaqcl/tao0e7tZ13CW/cc0HYFssZPwDIJ9h5XOxr1O3dqCwDsG+nhD21i3dr5AzwVbNMfkAnyZ+HSciPkUEQ4kJOxdt0bip9B654d/5ZmuXddbWBxtAvSn4PY7zRKhxew5VdIcXcxyQNkiwNOn9tUFcyWBgNfw4gXboxgb2FF2iI2BnUY+z3uOaeOU9gao+ha6Hs+Eps6zHZW5FxUXmMn5QAJrbz0cykh8PizuOw== 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=B5BaXCx6Bw9/yekLY+EgvRQbDvbI0OJ05mfS2I1kMhk=; b=TDnKtTEZ+Df8tAzc+hpOjueW+I8uktKjLRZDsX8z5c1C5mMGUmhPoNIuXdPxoXxwGu4gNG4jOkn9S3uC5rOC1n4sAAo9e/1qNp/bDDp/5T5q6JSIp4uWzcqFCZQ2SvuSLH/NN/ZRxWFWtu1sa7kXwUxW7bpzzdEyH37bzlv19ItkQ5tPfdQ4NHN4G0+k3tm9jv3p2V5uaA5jOHkMYXpptiOnmRxT4foU0dfc6s7UjtLybIjiK/zS5YSPF2m/cJMrktU7yLt7IDilhHz2vENiu+EadhdojGySnSLy6MQ5PCWscxEWYoWGg9FZfHdDohq3+l6ILGQvcPq+Fu07wEAsKA== 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=B5BaXCx6Bw9/yekLY+EgvRQbDvbI0OJ05mfS2I1kMhk=; b=clcq9pJcY+9UJTG15oSL5AuFe8xnQIg68KbpWwwlBPIuSVAZJWzI/Th3Aj+rAjIkqz0fobvkLZ28RDkqN6MDpQDxjWI7wsfNZCPXLAmwesaxcAeSEC2KsFLlZJajU6KQolIIXqTjum0OLTW04IGkH4fuw4QHNqioKf9bBymnRtY= 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 AM6PR08MB5255.eurprd08.prod.outlook.com (2603:10a6:20b:ef::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.22; Fri, 1 Oct 2021 15:23:52 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::c8a5:672a:9ff2:e554]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::c8a5:672a:9ff2:e554%6]) with mapi id 15.20.4566.019; Fri, 1 Oct 2021 15:23:52 +0000 Subject: Re: [PATCH v1 09/13] DynamicTablesPkg: AML code generation for a Method returning a NS To: Pierre.Gondois@arm.com, devel@edk2.groups.io, Alexei Fedorov Cc: Akanksha Jain , Alexandru Elisei , nd References: <20210623114039.24491-1-Pierre.Gondois@arm.com> <20210623114039.24491-10-Pierre.Gondois@arm.com> From: "Sami Mujawar" Message-ID: <75fcbce8-4d42-3677-afa8-6857fd01be19@arm.com> Date: Fri, 1 Oct 2021 16:23:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20210623114039.24491-10-Pierre.Gondois@arm.com> X-ClientProxiedBy: LO4P123CA0292.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:196::9) 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 LO4P123CA0292.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:196::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15 via Frontend Transport; Fri, 1 Oct 2021 15:23:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2158d50c-9375-4136-5fdd-08d984ef812d X-MS-TrafficTypeDiagnostic: AM6PR08MB5255:|VI1PR08MB4208: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: icdOsAPdsFIoHsPoJOREpWfZwgsoI40fe5jZUvkQXJkHEeOLPqbNVisBNVt00cttK/hyHrY1f+Bodbi8n6b0AsxNQFW6rB9pmO7s+nvG2SQI5CDs9gYg4HvxTqiI2YfXOt0AmwbqbH0X8oWTCEHMHevjYac3x+vjvSCLcnDi54m832hEx1wWaK9KysKLDvd/lNb9Wu2nxCWBr/Ycd3IRAGcUSxiDto/iqFwy2hsl9Ql9aV6hZ/WyKbotwKvXlXvKhUy6Z7w3MiUy6w6bu1wHO3aGYcgvUEcHTzKsaeZPI7Ir190OYl8FAlW4VW6H3Ys6uLPqW041nQVH8nJoBpTage14Ce0fenPqhEc4x05oRy7QpP3Otn5eAG1tzxJLpwR+G4QCWvBGFl7AG4orfsS9ZxI8HQDntrhe7R/1cd9dlvU8cN0I14KHCAsbJsXQ6rdRMqMPE9MxvImnjV1exiWf3kLrFndcQ+gUR9Dbp23JQz+KGeLc846DBRYF5oNAu5gx26/AlNPqFMR786OHUup3MN8fqOr6ay1NLEXyUAzEWJ2OS1oA08khyKTO7O3Jtl2SgF3opkt1Uou+58/P/MIjxIkdSRMkGdIkIfYjlUxRV8rIx2y7nZk2s7jMFYXgHUx39KD5pybJzxcq3bfxE336kpJRGa00VVjzXxTrznT4D6djIcM+DwynLniMahonY+thF/hHTuCoGg/sr7RGED9Gk3SPyu18LS4Q41wgw77UsPy0aer/Se9ngwTaLCkLIMb/RHWcNVeTg8Ec6SWZ5MBWXQ== 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)(316002)(36756003)(37006003)(54906003)(16576012)(186003)(53546011)(5660300002)(2616005)(956004)(66556008)(26005)(31686004)(6486002)(66946007)(66476007)(83380400001)(52116002)(86362001)(8936002)(44832011)(508600001)(4326008)(31696002)(38350700002)(6862004)(38100700002)(8676002)(2906002)(6636002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5255 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: VE1EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ac24476b-2eaf-4d1e-af89-08d984ef790b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hc6ac3UeeesUQoBRN4YHf+mt+IqCZlYI7cXyOrv6ZxMn/zmzBC8lekDwejn+hbfowLD/yJs47mm9VTU0co7dfTNMea1GLJtOAxzI5vvd8hp50dJU9e9Kcu3/0N0Zy+iIMNKkNnOLMQJ8wHIGnEyIRWgaobzL/YAtSO2/RpKw7q7drvcXh2GGsMcXNJTEqxkGKdBlBDo+tXwGowvoWWFODc6sFzHaC2qnpGCYlLZh10M67i6TefRQYQhLyvTyZcFNge+pAF640rrRJXSDNiGiIyME/ELy0sd7z/1j/k8OiI+nNb42xeDI4gRUKQjfpeBK1xx+eMu8jenizJO9tGCoSOsuepJE+jJaQdcOMaWBE81M0SI/EDZ/oYICxJfk0rpnkKPwJe9ENbXt7VIxOXnJCSlayzq3eNyE5bo+Q68/CjwD+9whDUcUPVCBW4Ep4/9qFgUkjGAP33qEUwC3EV6WlbkalJaQFNuU59BI9p76C/CitNc8Ld5GB29UlrqVhqAfUM6wCFOmQ3SUNi9Yfzg+vJxxMavFeAaDbU6WOIZ3u8XzCo5Q5oquYJLlckuJqS2KdEdpXAkzFYsIIqwYhMji3rUXDwW+NhsXMc0uLigiuoq3OXBUggqdLXhg2CGG/dzlOj+6WOxXktBnY5TyzcgzeKYXQvj8zVPh4LbcTQar5ofoewCR9uLDsKzZ+NNHscjMYaX8Lu+QMPJVmOuoDzPHu1+JBCQJehky1/Q0+4i5S1U= 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)(46966006)(36840700001)(6862004)(70206006)(54906003)(70586007)(31696002)(81166007)(37006003)(316002)(508600001)(47076005)(16576012)(53546011)(8936002)(4326008)(8676002)(83380400001)(86362001)(356005)(36756003)(82310400003)(44832011)(6486002)(31686004)(26005)(2616005)(186003)(2906002)(5660300002)(36860700001)(956004)(336012)(6636002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2021 15:24:04.7561 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2158d50c-9375-4136-5fdd-08d984ef812d 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: VE1EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4208 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Hi Pierre, Please find my response inline marked [SAMI]. Regards, Sami Mujawar On 23/06/2021 12:40 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 | 106 ++++++++++++++++++ > 2 files changed, 159 insertions(+) > > diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h b/DynamicTablesPkg/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 NameString > + e.g.: "MET0", "_SB.MET0", etc. > + The input string is copied. > + @param [in] ReturnedNameString The name of the object returned by the > + method. Optional parameter, can be: > + - NULL (ignored). > + - A NULL-terminated ASL NameString. > + e.g.: "MET0", "_SB.MET0", etc. > + The input string is copied. [SAMI] I think this should be a mandatory parameter and corresponding change is needed to the function code. > + @param [in] NumArgs Number of arguments. > + Must be 0 <= NumArgs <= 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 <= SyncLevel <= 15. > + Default is 0 in ASL. > + @param [in] ParentNode If provided, set ParentNode as the parent > + of the node created. > + @param [out] NewObjectNode If success, contains the created node. > + > + @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 75dadbaf4ac3..a9922871c311 100644 > --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c > +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c > @@ -1315,3 +1315,109 @@ 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 NameString > + e.g.: "MET0", "_SB.MET0", etc. > + The input string is copied. > + @param [in] ReturnedNameString The name of the object returned by the > + 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 <= NumArgs <= 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 <= SyncLevel <= 15. > + Default is 0 in ASL. > + @param [in] ParentNode If provided, set ParentNode as the parent > + of the node created. > + @param [out] NewObjectNode If success, contains the created node. > + > + @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 == NULL) || > + ((ParentNode == NULL) && (NewObjectNode == NULL))) { > + ASSERT (0); > + return EFI_INVALID_PARAMETER; > + } > + > + // Create a Method named MethodNameString. > + Status = AmlCodeGenMethod ( > + MethodNameString, > + NumArgs, > + IsSerialized, > + SyncLevel, > + NULL, > + &MethodNode > + ); > + if (EFI_ERROR (Status)) { > + ASSERT (0); > + return Status; > + } > + > + // Return ReturnedNameString if provided. > + if (ReturnedNameString != NULL) { > + Status = AmlCodeGenReturnNameString ( > + ReturnedNameString, > + (AML_NODE_HANDLE)MethodNode, > + NULL > + ); > + if (EFI_ERROR (Status)) { > + ASSERT (0); > + goto error_handler; > + } > + } > + > + Status = LinkNode ( > + MethodNode, > + ParentNode, > + NewObjectNode > + ); > + if (EFI_ERROR (Status)) { > + ASSERT (0); > + goto error_handler; > + } > + > + return Status; > + > +error_handler: > + if (MethodNode != NULL) { > + AmlDeleteTree ((AML_NODE_HANDLE)MethodNode); > + } > + return Status; > +}