From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.76]) by mx.groups.io with SMTP id smtpd.web09.19620.1660675037454099722 for ; Tue, 16 Aug 2022 11:37:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=RUKAK9jR; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.93.76, mailfrom: jbrasen@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jnkKHHVWWPCIWRJZOW4Q1Vz3Wsmq56VZv8V2vfyFPhj9AVf44FoEBxeokr55IBSv9TLAi73jzu9uxpvog5r21/8m+ZM/5MxVYf0bFUk1jWvLSG9aSyKLLTvyEw7O40NSFI3PCGQW3ynLV4P4FrsHncR/VPQ2qJ/BfEZ6cvfB0eP5sutFtb6rOOhTA2sw4QuzikkMX1WA3oW2yO47+rcRSPRqbskBLS00cz4F0bH+J7Ef2whZtTGuAQwcOv0Og4AauzHJrvmi0+63UQnC/uTvLF2a0f+zbcuDjInVCjhbxOXhn9Ldd9+Oyrb9bzV2FoWoemnNUBUXG5Ji4YtqCl3nyw== 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=ppJoHFqNnHZnRCoxnnCfcTvMaxANREaonMiliQ6/Qr8=; b=lvn3i7jCP5kcQ0lRdYS+Nuc73D+iuMs0zzcXr9kfFVfHUCiKDsMe0NJ4JOQEoNk2kih98HIxAs2Wlf6eMbCJs45wE0i0HjBtDd8a+qwhP2FqOdQCalG6pSw9n/Xevo3XF8xcYuTJ3Qd1ZeW9dxRuFGtT/tmS3DMsb+l8JIQ8Z+XWyTzfhjBG9b6p9Gh29q1+6ZQzqlCtbm5t7+ljWpXCdbQJp9XEAdJVOEhlZ1s3q1EWnmMpy9wRU4dkL6omUhMnvQJHR9tGXcJGLaK03bABlcxenGpwljMp/dFWdPMtqvXqfm0tLnUGrxS212/yd6iHAuyIJAMf7o20KA0LdlRLmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ppJoHFqNnHZnRCoxnnCfcTvMaxANREaonMiliQ6/Qr8=; b=RUKAK9jRNlK3GvOlEIeYDw/b4adCNJr1iduEjncpfAz4O3rkwii9sdVJ28LM5GjEkNod3ApxR0TOQY8uaibVIDhogJt3eJTZcMh6wK5m6cE+BLtV4wbAX02D8AvRJXBIadq92ZBMrqbZcGgvX81QOt441rNhoZHh+TYBGGol1SW5xEA7I2bJl7ZB/m9KABN6TBz8ljGN+1t+/+qFK5mSeoL9FUAfwrELWl5zD2ZRSK8GR8FwniMT1x2VwgQOMoY0SNNmT17/8B7s0YyK2R2ZaAnNkYFJBBTgmzAHPj0wPE0H0Us5MQOcSG93jEEr0CctKlbAQEYGiP6PWHZ7PjMCHQ== Received: from DS7PR03CA0075.namprd03.prod.outlook.com (2603:10b6:5:3bb::20) by DM4PR12MB5916.namprd12.prod.outlook.com (2603:10b6:8:69::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.11; Tue, 16 Aug 2022 18:37:14 +0000 Received: from DM6NAM11FT086.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3bb:cafe::c2) by DS7PR03CA0075.outlook.office365.com (2603:10b6:5:3bb::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.15 via Frontend Transport; Tue, 16 Aug 2022 18:37:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by DM6NAM11FT086.mail.protection.outlook.com (10.13.173.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5546.7 via Frontend Transport; Tue, 16 Aug 2022 18:37:14 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Tue, 16 Aug 2022 18:37:13 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Tue, 16 Aug 2022 11:37:13 -0700 Received: from ed7fa55790ac.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Tue, 16 Aug 2022 11:37:12 -0700 From: "Jeff Brasen" To: CC: , , , , Jeff Brasen Subject: [PATCH v2] DynamicTablesPkg: Add support to build _DSD Date: Tue, 16 Aug 2022 12:37:05 -0600 Message-ID: <271411ea70c897459a6e257e75cbed40018cde00.1660674939.git.jbrasen@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-NVConfidentiality: public Return-Path: jbrasen@nvidia.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 52abd79c-9c14-4f5b-12ba-08da7fb65707 X-MS-TrafficTypeDiagnostic: DM4PR12MB5916:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QcG2K4TUoK3fFgnOG6RH8epwubrtbwXOaqdCnr/we6uN4aLC1DjueUSduqc1u8ethoEXOZSrnrK2+9BVfA7q7lFRutM/JLxu2EyYfwYUMJa6hjRYzIPBmGqVbti4WnDRD4JxoKVjSl6oVeSHQpT9qNRx/7FZCwF0DRued+s21ZAd3MafFb4kN17HBtKKF9FYwajxeoJpLbArdNRRB9lIiInV3rJ25jwvUBRNlgoZhGiC3UqB76d/wd9RGoCRRS7nruOZx0r2QF+GAoXKIhw5wUyA1DJ4tqCJ4xenZxp6xVeC2oTN6Y/Df0z5HpAzZDBYmQQ4nRr8S/ruDTN2EtBLCbdZM/cO2fq0c0NgRh+Is2EZ71shtnruQBKo6aU/bQTi1vjPX52YiYi0ltkuoxfgGT9buyB1I8H52lHgoUIIjcRwtLopjTtB/uriLU8F01ly8Ko/a84FN2VspXJeqsruZlrR5ia8gx3Z33KnEz+v5BiET7JHuuVCTjX6UEhjOI4++ciORZWvbi9koPLUzzfUEv9bjzg6w1xf8W2Kv9aDQ1ebObmQoWH1H8F0Gc3bePPhcMqVJUl4oyw3FDMJX1OtK67QIGHc1DGa5KIBF0gXPV2mGlNW8lVxw/pJTl2XQ8CDO8wAp+w+KrHgvdOZIiOHJGQaUJmL54NwG9KgZKXO1Mqt83bCaLhWk+JmQf996/vJXARdfOljJ5OLgnsz+0seEGkbu311GjtwJSDlCgXkZtf+1eY9Ao7bc9r9epQ2fcWhgh44f0QExbPLMPl+3w1WuKqPyHh250jB9z7sBTwolta1Rfsg8Mul44cnp4b+KdhPJJm4AxOS3ldxIXcPJLnGAw== X-Forefront-Antispam-Report: CIP:12.22.5.236;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230016)(4636009)(396003)(39860400002)(376002)(346002)(136003)(36840700001)(46966006)(40470700004)(186003)(47076005)(107886003)(86362001)(6666004)(40460700003)(40480700001)(26005)(336012)(7696005)(2616005)(36860700001)(36756003)(426003)(6916009)(82310400005)(54906003)(4326008)(316002)(41300700001)(83380400001)(70206006)(70586007)(5660300002)(478600001)(356005)(8676002)(81166007)(8936002)(82740400003)(2906002)(19627235002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2022 18:37:14.5640 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 52abd79c-9c14-4f5b-12ba-08da7fb65707 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[12.22.5.236];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT086.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5916 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Add APIs needed to build _DSD with different UUIDs.=0D This is per ACPI specification 6.4 s6.2.5.=0D =0D Adds support for building data packages with format=0D Package {"Name", Integer}=0D =0D Signed-off-by: Jeff Brasen =0D ---=0D .../Include/Library/AmlLib/AmlLib.h | 55 ++++=0D .../Common/AmlLib/CodeGen/AmlCodeGen.c | 249 ++++++++++++++++++=0D 2 files changed, 304 insertions(+)=0D =0D diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h b/DynamicTabl= esPkg/Include/Library/AmlLib/AmlLib.h=0D index 6f214c0dfa..86a0e802f4 100644=0D --- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h=0D +++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h=0D @@ -1280,6 +1280,61 @@ AmlAddLpiState (=0D IN AML_OBJECT_NODE_HANDLE LpiNode=0D );=0D =0D +/** AML code generation for a _DSD device data object.=0D +=0D + AmlAddDeviceDataDescriptorPackage (Uuid, DsdNode, PackageNode) is=0D + equivalent of the following ASL code:=0D + ToUUID(Uuid),=0D + Package () {}=0D +=0D + Cf ACPI 6.4 specification, s6.2.5 "_DSD (Device Specific Data)".=0D +=0D + @ingroup CodeGenApis=0D +=0D + @param [in] Uuid The Uuid of the descriptor to be created=0D + @param [in] DsdNode Node of the DSD Package.=0D + @param [out] PackageNode If success, contains the created package nod= e.=0D +=0D + @retval EFI_SUCCESS Success.=0D + @retval EFI_INVALID_PARAMETER Invalid parameter.=0D + @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +AmlAddDeviceDataDescriptorPackage (=0D + IN CONST EFI_GUID *Uuid,=0D + IN AML_OBJECT_NODE_HANDLE DsdNode,=0D + OUT AML_OBJECT_NODE_HANDLE *PackageNode=0D + );=0D +=0D +/** AML code generation to add a package with a name and value,=0D + to a parent package.=0D + This is useful for build the _DSD package but can be used in other cas= es.=0D +=0D + AmlAddNameValuePackage ("Name", Value, ParentNode) is=0D + equivalent of the following ASL code:=0D + Package (2) {"Name", Value}=0D +=0D + Cf ACPI 6.4 specification, s6.2.5 "_DSD (Device Specific Data)".=0D +=0D + @ingroup CodeGenApis=0D +=0D + @param [in] Name String to place in first entry of package=0D + @param [in] Value Integer to place in second entry of package= =0D + @param [in] PackageNode Package to add new sub package to.=0D +=0D + @retval EFI_SUCCESS Success.=0D + @retval EFI_INVALID_PARAMETER Invalid parameter.=0D + @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +AmlAddNameIntegerPackage (=0D + IN CHAR8 *Name,=0D + IN UINT64 Value,=0D + IN AML_OBJECT_NODE_HANDLE PackageNode=0D + );=0D +=0D // DEPRECATED APIS=0D #ifndef DISABLE_NEW_DEPRECATED_INTERFACES=0D =0D diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c b/= DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c=0D index e51d2dd7f0..6f96e5952b 100644=0D --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c=0D +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c=0D @@ -2600,3 +2600,252 @@ error_handler:=0D =0D return Status;=0D }=0D +=0D +/** AML code generation for a _DSD device data object.=0D +=0D + AmlAddDeviceDataDescriptorPackage (Uuid, DsdNode, PackageNode) is=0D + equivalent of the following ASL code:=0D + ToUUID(Uuid),=0D + Package () {}=0D +=0D + Cf ACPI 6.4 specification, s6.2.5 "_DSD (Device Specific Data)".=0D +=0D + @ingroup CodeGenApis=0D +=0D + @param [in] Uuid The Uuid of the descriptor to be created=0D + @param [in] DsdNode Node of the DSD Package.=0D + @param [out] PackageNode If success, contains the created package nod= e.=0D +=0D + @retval EFI_SUCCESS Success.=0D + @retval EFI_INVALID_PARAMETER Invalid parameter.=0D + @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +AmlAddDeviceDataDescriptorPackage (=0D + IN CONST EFI_GUID *Uuid,=0D + IN AML_OBJECT_NODE_HANDLE DsdNode,=0D + OUT AML_OBJECT_NODE_HANDLE *PackageNode=0D + )=0D +{=0D + EFI_STATUS Status;=0D + AML_OBJECT_NODE *UuidNode;=0D + AML_DATA_NODE *UuidDataNode;=0D + AML_OBJECT_NODE_HANDLE DsdEntryList;=0D +=0D + if ((Uuid =3D=3D NULL) ||=0D + (PackageNode =3D=3D NULL) ||=0D + (AmlGetNodeType ((AML_NODE_HANDLE)DsdNode) !=3D EAmlNodeObject) ||=0D + (!AmlNodeHasOpCode (DsdNode, AML_NAME_OP, 0)) ||=0D + !AmlNameOpCompareName (DsdNode, "_DSD"))=0D + {=0D + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER);=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + // Get the Package object node of the _DSD node,=0D + // which is the 2nd fixed argument (i.e. index 1).=0D + DsdEntryList =3D (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (=0D + DsdNode,=0D + EAmlParseIndexTerm1=0D + );=0D + if ((DsdEntryList =3D=3D NULL) = ||=0D + (AmlGetNodeType ((AML_NODE_HANDLE)DsdEntryList) !=3D EAmlNodeObject)= ||=0D + (!AmlNodeHasOpCode (DsdEntryList, AML_PACKAGE_OP, 0)))=0D + {=0D + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER);=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + *PackageNode =3D NULL;=0D + UuidDataNode =3D NULL;=0D +=0D + Status =3D AmlCodeGenBuffer (NULL, 0, &UuidNode);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + return Status;=0D + }=0D +=0D + Status =3D AmlCreateDataNode (=0D + EAmlNodeDataTypeRaw,=0D + (CONST UINT8 *)Uuid,=0D + sizeof (EFI_GUID),=0D + &UuidDataNode=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlVarListAddTail (=0D + (AML_NODE_HEADER *)UuidNode,=0D + (AML_NODE_HEADER *)UuidDataNode=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + UuidDataNode =3D NULL;=0D +=0D + // Append to the list of _DSD entries.=0D + Status =3D AmlVarListAddTail (=0D + (AML_NODE_HANDLE)DsdEntryList,=0D + (AML_NODE_HANDLE)UuidNode=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlCodeGenPackage (PackageNode);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler_detach;=0D + }=0D +=0D + // Append to the list of _DSD entries.=0D + Status =3D AmlVarListAddTail (=0D + (AML_NODE_HANDLE)DsdEntryList,=0D + (AML_NODE_HANDLE)*PackageNode=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler_detach;=0D + }=0D +=0D + return Status;=0D +=0D +error_handler_detach:=0D + if (UuidNode !=3D NULL) {=0D + AmlDetachNode ((AML_NODE_HANDLE)UuidNode);=0D + }=0D +=0D +error_handler:=0D + if (UuidNode !=3D NULL) {=0D + AmlDeleteTree ((AML_NODE_HANDLE)UuidNode);=0D + }=0D +=0D + if (*PackageNode !=3D NULL) {=0D + AmlDeleteTree ((AML_NODE_HANDLE)*PackageNode);=0D + *PackageNode =3D NULL;=0D + }=0D +=0D + if (UuidDataNode !=3D NULL) {=0D + AmlDeleteTree ((AML_NODE_HANDLE)UuidDataNode);=0D + }=0D +=0D + return Status;=0D +}=0D +=0D +/** AML code generation to add a package with a name and value,=0D + to a parent package.=0D + This is useful for build the _DSD package but can be used in other cas= es.=0D +=0D + AmlAddNameValuePackage ("Name", Value, ParentNode) is=0D + equivalent of the following ASL code:=0D + Package (2) {"Name", Value}=0D +=0D + Cf ACPI 6.4 specification, s6.2.5 "_DSD (Device Specific Data)".=0D +=0D + @ingroup CodeGenApis=0D +=0D + @param [in] Name String to place in first entry of package=0D + @param [in] Value Integer to place in second entry of package= =0D + @param [in] PackageNode Package to add new sub package to.=0D +=0D + @retval EFI_SUCCESS Success.=0D + @retval EFI_INVALID_PARAMETER Invalid parameter.=0D + @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +AmlAddNameIntegerPackage (=0D + IN CHAR8 *Name,=0D + IN UINT64 Value,=0D + IN AML_OBJECT_NODE_HANDLE PackageNode=0D + )=0D +{=0D + EFI_STATUS Status;=0D + AML_OBJECT_NODE *NameNode;=0D + AML_OBJECT_NODE *ValueNode;=0D + AML_OBJECT_NODE *NewPackageNode;=0D +=0D + if ((Name =3D=3D NULL) ||=0D + (AmlGetNodeType ((AML_NODE_HANDLE)PackageNode) !=3D EAmlNodeObject) = ||=0D + (!AmlNodeHasOpCode (PackageNode, AML_PACKAGE_OP, 0)))=0D + {=0D + ASSERT_EFI_ERROR (EFI_INVALID_PARAMETER);=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + NameNode =3D NULL;=0D + ValueNode =3D NULL;=0D +=0D + // The new package entry.=0D + Status =3D AmlCodeGenPackage (&NewPackageNode);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + return Status;=0D + }=0D +=0D + Status =3D AmlCodeGenString (Name, &NameNode);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlVarListAddTail (=0D + (AML_NODE_HANDLE)NewPackageNode,=0D + (AML_NODE_HANDLE)NameNode=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + NameNode =3D NULL;=0D +=0D + Status =3D AmlCodeGenInteger (Value, &ValueNode);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlVarListAddTail (=0D + (AML_NODE_HANDLE)NewPackageNode,=0D + (AML_NODE_HANDLE)ValueNode=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + ValueNode =3D NULL;=0D +=0D + Status =3D AmlVarListAddTail (=0D + (AML_NODE_HANDLE)PackageNode,=0D + (AML_NODE_HANDLE)NewPackageNode=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + return Status;=0D +=0D +error_handler:=0D + if (NewPackageNode !=3D NULL) {=0D + AmlDeleteTree ((AML_NODE_HANDLE)NewPackageNode);=0D + }=0D +=0D + if (NameNode !=3D NULL) {=0D + AmlDeleteTree ((AML_NODE_HANDLE)NameNode);=0D + }=0D +=0D + if (ValueNode !=3D NULL) {=0D + AmlDeleteTree ((AML_NODE_HANDLE)ValueNode);=0D + }=0D +=0D + return Status;=0D +}=0D -- =0D 2.25.1=0D =0D