From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.51]) by mx.groups.io with SMTP id smtpd.web08.9917.1663247486935227083 for ; Thu, 15 Sep 2022 06:11:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=bCFXjJVo; 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.223.51, mailfrom: jbrasen@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iv/MhmLHbPQ+4cwFtP2DcbxtfhZD8Q5lKWvnZu5h1Ca9kjHpYQbv2FxWzA1osb1AzwymmM5e1L41Ue5RTyVepLpGRiXLMr0qkm99trvxLNUnWzN4g3gL88mejUNAVZcylpt53e0GyAs8Y16LHa8r0tmASYAc/bIREXyQtubyLSbKu6esPJUTY+VmQTpUglc5ctZtdTL4nmAS8Uav2qOwodxwgcmd78v2aRPj5YK7tcH52aEGymqISPeFcyIMKEot/QJo2cVxaGxWVpJzhx3cHH6JpqiiJOBSVPKBFRPskBRbgnHc33HHVeo77sGoYxRQARZxJ8HRfaxBTtD+1Wqgvw== 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=iY6ZS2Rai0svUmUYq2JKTZoWQ+vi1mM7DOqTbxnX/vI=; b=D05NpieLHAvP+Z4Bq5pmbrMDlNDcR3GJ/iwTaTb39NRwibDjRzS25whHTukKhksTYlqCQoqOkO3za3FZQMniLCHWqyEMo2OhDMNDc7jBtZNpfKOA7c5Yqm9NluB4BKe64okjK7Ztymu3MYMfR2bVKwlezKUbfvv4JQ7AbUtDH1JJ9bgSTAJlFMiF5xF80ASS/7Rlm0ZTBKyi+FuuWHftu2xKz/IKk+f4fUcmp+h+2qS3UrchS9xJn+vvow1mIE/dXU4X5RMWHB5//6tq+q3Uw/YrVdtQfJH0HrTcomd0IP1eHfj5g3CWMOx/1S+yCbU0npY9fCLLx5NHH2okkBadAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=edk2.groups.io 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=iY6ZS2Rai0svUmUYq2JKTZoWQ+vi1mM7DOqTbxnX/vI=; b=bCFXjJVodXExxYq+vUOeyKU/zBABOdAEGLp1EHxtPBBeOg3ZtaDgFI+iOH7ZoslqOY4MXXtL6IUx5aVIbvuYxVcTaugNet7IP411SK/SjUeMi2Awi8hfSWF/hJHfw6vvWUOECXVqHLrqklJk/jeHXXBE2bpdlwyaAdbMCbkwJhpMwLkry3Mkvm8brgMncO/Z1x3cFdjn2Wxy1ZB0RvBbCLqLzEVY9T0cVu0iYlNYRbkHDD4qiIhkglyAaJT1fvdkNiqD/h7YLnTivwzoZ4pSy5aKlwD+yfP/QeAgMEXKt48BVIdiZwde0FHs9rU/64kBjVtCwCvUv6rrdgKqVzuWxw== Received: from MW4PR04CA0040.namprd04.prod.outlook.com (2603:10b6:303:6a::15) by CH3PR12MB7667.namprd12.prod.outlook.com (2603:10b6:610:14f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Thu, 15 Sep 2022 13:11:23 +0000 Received: from CO1NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:303:6a:cafe::33) by MW4PR04CA0040.outlook.office365.com (2603:10b6:303:6a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.19 via Frontend Transport; Thu, 15 Sep 2022 13:11:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT038.mail.protection.outlook.com (10.13.174.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.12 via Frontend Transport; Thu, 15 Sep 2022 13:11:22 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Thu, 15 Sep 2022 06:10:56 -0700 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Thu, 15 Sep 2022 06:10:56 -0700 Received: from f153882e4be8.nvidia.com (10.127.8.14) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.986.29 via Frontend Transport; Thu, 15 Sep 2022 06:10:55 -0700 From: "Jeff Brasen" To: CC: , , , , Jeff Brasen Subject: [PATCH v3 2/3] DynamicTablesPkg: AML Code generation to add _CPC entries Date: Thu, 15 Sep 2022 07:10:51 -0600 Message-ID: <2bc2acdd897dae6fab193cc4a92595e41be586ca.1663247185.git.jbrasen@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-NVConfidentiality: public Return-Path: jbrasen@nvidia.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT038:EE_|CH3PR12MB7667:EE_ X-MS-Office365-Filtering-Correlation-Id: 4783b436-04f1-459f-0feb-08da971bc9a3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tABhjCPNVkq8dl3i+wgnXtH+cj4tRQ+SuCyC0zhpFkoK0aMtwwtIjBaZQuHP+Uar2yocp/xGV9ZRMkg/dwkTE/3PHnyOs0slkAWT8ZVLAUWsg9z2Q1PCTc+UpeVqb0PxBvkhNqIPb9lOxbqJKBLvbOOo/94NgyuE39HKMBEh7Rkc4bhUsQQ2QqMKZ2ZYbzafxFKNSJw8jbctEylSiF7rjr/fYhZsPBoD2SH5cBAMoW1a5j2NBy5yyKbrygPKLeFKqoV5K78Jg9m541hdRF0jwPMK/0m9JBJvjCVZqOEV/IqGT+AQIqPc7Bga1PeCF2Stqynkzc0UUuy6SSwt1g5awGNjl5HhVfL/ihsnz0AE+NdUTKzcSghsYX02O9RsKq8aWvLXVjgMkMwrsWWabfJWjTna27XyLlnQTuHzmRwlECLChLUMDKHM5Mssk2I03OVgT39X33HAKOrb9NpTDdv4ptTzcKfzv0pfGh5F5SDXkvEYWfsdOWsSghG6Ejh3+IXkC0zRUDuoMNc3pMpqajAyxebMb2/7n1TCO7f49FhiZ2DtptvjuzBy1yzdfoSTvMUEMdrmwICZVxJYyAkcAI5tuXc0sQimhDfn5iue1xXS3U/1KzaAtKwwss+PdQ3nqC8OHo+v8fyx0+2lZg2beQSuSJqdgw1mC+WB20zdXRxkQoLNAJK7d3S3Qqj4F1hhFTXHcwRkqGwSr4ZBCnESGi+qU908j/eJR+0mVuPlmOVc9Epsvv+gcsW/yyeQI6lURAPhUM7fLeHnrc9Ec55/xP3r9g== X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(396003)(346002)(376002)(39860400002)(136003)(451199015)(36840700001)(46966006)(40470700004)(6916009)(2906002)(5660300002)(86362001)(107886003)(426003)(54906003)(40460700003)(356005)(8676002)(478600001)(6666004)(316002)(4326008)(26005)(19627235002)(40480700001)(186003)(8936002)(82740400003)(70206006)(41300700001)(336012)(47076005)(83380400001)(7636003)(70586007)(82310400005)(7696005)(36756003)(36860700001)(2616005)(30864003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2022 13:11:22.7602 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4783b436-04f1-459f-0feb-08da971bc9a3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7667 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain _CPC entries can describe CPU performance information.=0D The object is described in ACPI 6.4 s8.4.7.1.=0D "_CPC (Continuous Performance Control)".=0D =0D Add AmlCreateCpcNode() helper function to add _CPC entries to an=0D existing CPU object.=0D =0D Signed-off-by: Jeff Brasen =0D ---=0D .../Include/Library/AmlLib/AmlLib.h | 156 +++++=0D .../Common/AmlLib/CodeGen/AmlCodeGen.c | 543 ++++++++++++++++++=0D 2 files changed, 699 insertions(+)=0D =0D diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h b/DynamicTabl= esPkg/Include/Library/AmlLib/AmlLib.h=0D index 39968660f2..3fafa6b0e8 100644=0D --- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h=0D +++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h=0D @@ -1336,6 +1336,162 @@ AmlAddNameIntegerPackage (=0D IN AML_OBJECT_NODE_HANDLE PackageNode=0D );=0D =0D +/** Create a _CPC node.=0D +=0D + Creates and optionally adds the following node=0D + Name(_CPC, Package()=0D + {=0D + NumEntries, // Integer=0D + Revision, // Integer=0D + HighestPerformance, // Integer or Buffer (Resourc= e Descriptor)=0D + NominalPerformance, // Integer or Buffer (Resourc= e Descriptor)=0D + LowestNonlinearPerformance, // Integer or Buffer (Resourc= e Descriptor)=0D + LowestPerformance, // Integer or Buffer (Resourc= e Descriptor)=0D + GuaranteedPerformanceRegister, // Buffer (Resource Descripto= r)=0D + DesiredPerformanceRegister , // Buffer (Resource Descripto= r)=0D + MinimumPerformanceRegister , // Buffer (Resource Descripto= r)=0D + MaximumPerformanceRegister , // Buffer (Resource Descripto= r)=0D + PerformanceReductionToleranceRegister, // Buffer (Resource Descripto= r)=0D + TimeWindowRegister, // Buffer (Resource Descripto= r)=0D + CounterWraparoundTime, // Integer or Buffer (Resourc= e Descriptor)=0D + ReferencePerformanceCounterRegister, // Buffer (Resource Descripto= r)=0D + DeliveredPerformanceCounterRegister, // Buffer (Resource Descripto= r)=0D + PerformanceLimitedRegister, // Buffer (Resource Descripto= r)=0D + CPPCEnableRegister // Buffer (Resource Descripto= r)=0D + AutonomousSelectionEnable, // Integer or Buffer (Resourc= e Descriptor)=0D + AutonomousActivityWindowRegister, // Buffer (Resource Descripto= r)=0D + EnergyPerformancePreferenceRegister, // Buffer (Resource Descripto= r)=0D + ReferencePerformance // Integer or Buffer (Resourc= e Descriptor)=0D + LowestFrequency, // Integer or Buffer (Resourc= e Descriptor)=0D + NominalFrequency // Integer or Buffer (Resourc= e Descriptor)=0D + })=0D +=0D + If resource buffer is NULL then integer will be used.=0D +=0D + Cf. ACPI 6.4, s8.4.7.1 _CPC (Continuous Performance Control)=0D +=0D + @ingroup CodeGenApis=0D +=0D + @param [in] HighestPerformanceBuffer If provided, buffer = that indicates the highest level=0D + of performance the p= rocessor.=0D + @param [in] HighestPerformanceInteger Indicates the highes= t level of performance the processor,=0D + used if buffer is NU= LL.=0D + @param [in] NominalPerformanceBuffer If provided buffer t= hat indicates the highest sustained=0D + performance level of= the processor.=0D + @param [in] NominalPerformanceInteger Indicates the highes= t sustained performance level=0D + of the processor, us= ed if buffer is NULL.=0D + @param [in] LowestNonlinearPerformanceBuffer If provided, buffer = that indicates the lowest performance level=0D + of the processor wit= h non-linear power savings.=0D + @param [in] LowestNonlinearPerformanceInteger Indicates the lowest= performance level of the processor with=0D + non-linear power sav= ings, used if buffer is NULL.=0D + @param [in] LowestPerformanceBuffer If provided, buffer = that indicates the=0D + lowest performance l= evel of the processor.=0D + @param [in] LowestPerformanceInteger Indicates the lowest= performance level of the processor,=0D + used if buffer is NU= LL.=0D + @param [in] GuaranteedPerformanceRegister If provided, Guarant= eed Performance Register Buffer.=0D + @param [in] DesiredPerformanceRegister If provided, Desired= Performance Register Buffer.=0D + @param [in] MinimumPerformanceRegister If provided, Minimum= Performance Register Buffer.=0D + @param [in] MaximumPerformanceRegister If provided, Maximum= Performance Register Buffer.=0D + @param [in] PerformanceReductionToleranceRegister If provided, Perform= ance Reduction Tolerance Register.=0D + @param [in] TimeWindowRegister If provided, Time Wi= ndow Register.=0D + @param [in] CounterWraparoundTimeBuffer If provided, Counter= Wraparound Time buffer.=0D + @param [in] CounterWraparoundTimeInteger Counter Wraparound T= ime, used if buffer is NULL.=0D + @param [in] ReferencePerformanceCounterRegister Reference Performanc= e Counter Register.=0D + @param [in] DeliveredPerformanceCounterRegister Delivered Performanc= e Counter Register.=0D + @param [in] PerformanceLimitedRegister Performance Limited = Register.=0D + @param [in] CPPCEnableRegister If provided, CPPC En= ableRegister.=0D + @param [in] AutonomousSelectionEnableBuffer If provided, Autonom= ous Selection Enable buffer.=0D + @param [in] AutonomousSelectionEnableInteger Autonomous Selection= Enable, used if buffer is NULL.=0D + @param [in] AutonomousActivityWindowRegister If provided, Autonom= ousActivity-WindowRegister.=0D + @param [in] EnergyPerformancePreferenceRegister If provided, EnergyP= erformance-PreferenceRegister.=0D + @param [in] ReferencePerformanceBuffer If provided, Referen= ce Performance buffer.=0D + @param [in] ReferencePerformanceInteger Reference Performanc= e, used if buffer is NULL.=0D + @param [in] LowestFrequencyBuffer If provided, Lowest = Frequency buffer.=0D + @param [in] LowestFrequencyInteger Lowest Frequency, us= ed if buffer is NULL.=0D + @param [in] NominalFrequencyBuffer If provided, Nominal= FrequencyBuffer buffer.=0D + @param [in] NominalFrequencyInteger NominalFrequencyBuff= er, used if buffer is NULL.=0D + @param [in] ParentNode If provided, set Par= entNode as the parent=0D + of the node created.= =0D + @param [out] NewCpcNode If success and provi= ded, contains the created node.=0D +=0D + @retval EFI_SUCCESS The function completed successfully.=0D + @retval EFI_INVALID_PARAMETER Invalid parameter.=0D + @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +AmlCreateCpcNode (=0D + /// The revision number of the _CPC package format.=0D + IN UINT32 Revision,=0D + /// Indicates the highest level of performance the processor=0D + /// is theoretically capable of achieving.=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *HighestPerformanceBuffer OP= TIONAL,=0D + IN UINT32 HighestPerformanceInteger,=0D + /// Indicates the highest sustained performance level of the processor.= =0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *NominalPerformanceBuffer OP= TIONAL,=0D + IN UINT32 NominalPerformanceInteger,=0D + /// Indicates the lowest performance level of the processor with non-lin= ear power savings.=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *LowestNonlinearPerformanceB= uffer OPTIONAL,=0D + IN UINT32 LowestNonlinearPerformanceIn= teger,=0D + /// Indicates the lowest performance level of the processor..=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *LowestPerformanceBuffer OPT= IONAL,=0D + IN UINT32 LowestPerformanceInteger,=0D + /// Guaranteed Performance Register Buffer.=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *GuaranteedPerformanceRegist= er OPTIONAL,=0D + /// Desired Performance Register Buffer.=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *DesiredPerformanceRegister,= =0D + /// Minimum Performance Register Buffer.=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *MinimumPerformanceRegister = OPTIONAL,=0D + /// Maximum Performance Register Buffer.=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *MaximumPerformanceRegister = OPTIONAL,=0D + /// Performance Reduction Tolerance Register.=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *PerformanceReductionToleran= ceRegister OPTIONAL,=0D + /// Time Window Register.=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *TimeWindowRegister OPTIONAL= ,=0D + /// Counter Wraparound Time=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *CounterWraparoundTimeBuffer= OPTIONAL,=0D + IN UINT32 CounterWraparoundTimeInteger= ,=0D + /// Reference Performance Counter Register=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *ReferencePerformanceCounter= Register,=0D + /// Delivered Performance Counter Register=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *DeliveredPerformanceCounter= Register,=0D + /// Performance Limited Register=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *PerformanceLimitedRegister,= =0D + /// CPPC EnableRegister=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *CPPCEnableRegister OPTIONAL= ,=0D + /// Autonomous Selection Enable=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *AutonomousSelectionEnableBu= ffer OPTIONAL,=0D + IN UINT32 AutonomousSelectionEnableInt= eger,=0D + /// AutonomousActivity-WindowRegister=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *AutonomousActivityWindowReg= ister OPTIONAL,=0D + /// EnergyPerformance-PreferenceRegister=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *EnergyPerformancePreference= Register OPTIONAL,=0D + /// Reference Performance=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *ReferencePerformanceBuffer = OPTIONAL,=0D + IN UINT32 ReferencePerformanceInteger,= =0D + /// Lowest Frequency=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *LowestFrequencyBuffer OPTIO= NAL,=0D + IN UINT32 LowestFrequencyInteger,=0D + /// Nominal Frequency=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *NominalFrequencyBuffer OPTI= ONAL,=0D + IN UINT32 NominalFrequencyInteger,=0D + IN AML_NODE_HANDLE ParentNode OPTIONAL,=0D + OUT AML_OBJECT_NODE_HANDLE *NewCpcNode OPTIONAL=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 5fb39d077b..42f0d0002c 100644=0D --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c=0D +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c=0D @@ -2850,3 +2850,546 @@ error_handler:=0D =0D return Status;=0D }=0D +=0D +/** Adds a register to the package=0D +=0D + @ingroup CodeGenApis=0D +=0D + @param [in] Register If provided, register that will be added to pa= ckage.=0D + otherwise NULL register will be added=0D + @param [in] PackageNode Package to add value to=0D +=0D + @retval EFI_SUCCESS The function completed successfully.=0D + @retval EFI_INVALID_PARAMETER Invalid parameter.=0D + @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.=0D +**/=0D +STATIC=0D +EFI_STATUS=0D +EFIAPI=0D +AmlAddRegisterToPackage (=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *Register OPTIONAL,=0D + IN AML_OBJECT_NODE_HANDLE PackageNode=0D + )=0D +{=0D + EFI_STATUS Status;=0D + AML_DATA_NODE_HANDLE RdNode;=0D + AML_OBJECT_NODE_HANDLE ResourceTemplateNode;=0D +=0D + RdNode =3D NULL;=0D +=0D + Status =3D AmlCodeGenResourceTemplate (&ResourceTemplateNode);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + return Status;=0D + }=0D +=0D + if (Register !=3D NULL) {=0D + Status =3D AmlCodeGenRdRegister (=0D + Register->AddressSpaceId,=0D + Register->RegisterBitWidth,=0D + Register->RegisterBitOffset,=0D + Register->Address,=0D + Register->AccessSize,=0D + NULL,=0D + &RdNode=0D + );=0D + } else {=0D + Status =3D AmlCodeGenRdRegister (=0D + EFI_ACPI_6_4_SYSTEM_MEMORY,=0D + 0,=0D + 0,=0D + 0,=0D + 0,=0D + NULL,=0D + &RdNode=0D + );=0D + }=0D +=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAppendRdNode (ResourceTemplateNode, RdNode);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + RdNode =3D NULL;=0D +=0D + Status =3D AmlVarListAddTail (=0D + (AML_NODE_HANDLE)PackageNode,=0D + (AML_NODE_HANDLE)ResourceTemplateNode=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 (RdNode !=3D NULL) {=0D + AmlDeleteTree ((AML_NODE_HANDLE)RdNode);=0D + }=0D +=0D + if (ResourceTemplateNode !=3D NULL) {=0D + AmlDeleteTree ((AML_NODE_HANDLE)ResourceTemplateNode);=0D + }=0D +=0D + return Status;=0D +}=0D +=0D +/** Adds an integer or register to the package=0D +=0D + @ingroup CodeGenApis=0D +=0D + @param [in] Register If provided, register that will be added to pa= ckage=0D + @param [in] Integer If Register is NULL, integer that will be adde= d to the package=0D + @param [in] PackageNode Package to add value to=0D +=0D + @retval EFI_SUCCESS The function completed successfully.=0D + @retval EFI_INVALID_PARAMETER Invalid parameter.=0D + @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.=0D +**/=0D +STATIC=0D +EFI_STATUS=0D +EFIAPI=0D +AmlAddRegisterOrIntegerToPackage (=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *Register OPTIONAL,=0D + IN UINT32 Integer,=0D + IN AML_OBJECT_NODE_HANDLE PackageNode=0D + )=0D +{=0D + EFI_STATUS Status;=0D + AML_OBJECT_NODE_HANDLE IntegerNode;=0D +=0D + IntegerNode =3D NULL;=0D +=0D + if (Register !=3D NULL) {=0D + Status =3D AmlAddRegisterToPackage (Register, PackageNode);=0D + } else {=0D + Status =3D AmlCodeGenInteger (Integer, &IntegerNode);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + return Status;=0D + }=0D +=0D + Status =3D AmlVarListAddTail (=0D + (AML_NODE_HANDLE)PackageNode,=0D + (AML_NODE_HANDLE)IntegerNode=0D + );=0D + }=0D +=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + if (IntegerNode !=3D NULL) {=0D + AmlDeleteTree ((AML_NODE_HANDLE)IntegerNode);=0D + }=0D + }=0D +=0D + return Status;=0D +}=0D +=0D +/** Create a _CPC node.=0D +=0D + Creates and optionally adds the following node=0D + Name(_CPC, Package()=0D + {=0D + NumEntries, // Integer=0D + Revision, // Integer=0D + HighestPerformance, // Integer or Buffer (Resourc= e Descriptor)=0D + NominalPerformance, // Integer or Buffer (Resourc= e Descriptor)=0D + LowestNonlinearPerformance, // Integer or Buffer (Resourc= e Descriptor)=0D + LowestPerformance, // Integer or Buffer (Resourc= e Descriptor)=0D + GuaranteedPerformanceRegister, // Buffer (Resource Descripto= r)=0D + DesiredPerformanceRegister , // Buffer (Resource Descripto= r)=0D + MinimumPerformanceRegister , // Buffer (Resource Descripto= r)=0D + MaximumPerformanceRegister , // Buffer (Resource Descripto= r)=0D + PerformanceReductionToleranceRegister, // Buffer (Resource Descripto= r)=0D + TimeWindowRegister, // Buffer (Resource Descripto= r)=0D + CounterWraparoundTime, // Integer or Buffer (Resourc= e Descriptor)=0D + ReferencePerformanceCounterRegister, // Buffer (Resource Descripto= r)=0D + DeliveredPerformanceCounterRegister, // Buffer (Resource Descripto= r)=0D + PerformanceLimitedRegister, // Buffer (Resource Descripto= r)=0D + CPPCEnableRegister // Buffer (Resource Descripto= r)=0D + AutonomousSelectionEnable, // Integer or Buffer (Resourc= e Descriptor)=0D + AutonomousActivityWindowRegister, // Buffer (Resource Descripto= r)=0D + EnergyPerformancePreferenceRegister, // Buffer (Resource Descripto= r)=0D + ReferencePerformance // Integer or Buffer (Resourc= e Descriptor)=0D + LowestFrequency, // Integer or Buffer (Resourc= e Descriptor)=0D + NominalFrequency // Integer or Buffer (Resourc= e Descriptor)=0D + })=0D +=0D + If resource buffer is NULL then integer will be used.=0D +=0D + Cf. ACPI 6.4, s8.4.7.1 _CPC (Continuous Performance Control)=0D +=0D + @ingroup CodeGenApis=0D +=0D + @param [in] HighestPerformanceBuffer If provided, buffer = that indicates the highest level=0D + of performance the p= rocessor.=0D + @param [in] HighestPerformanceInteger Indicates the highes= t level of performance the processor,=0D + used if buffer is NU= LL.=0D + @param [in] NominalPerformanceBuffer If provided buffer t= hat indicates the highest sustained=0D + performance level of= the processor.=0D + @param [in] NominalPerformanceInteger Indicates the highes= t sustained performance level=0D + of the processor, us= ed if buffer is NULL.=0D + @param [in] LowestNonlinearPerformanceBuffer If provided, buffer = that indicates the lowest performance level=0D + of the processor wit= h non-linear power savings.=0D + @param [in] LowestNonlinearPerformanceInteger Indicates the lowest= performance level of the processor with=0D + non-linear power sav= ings, used if buffer is NULL.=0D + @param [in] LowestPerformanceBuffer If provided, buffer = that indicates the=0D + lowest performance l= evel of the processor.=0D + @param [in] LowestPerformanceInteger Indicates the lowest= performance level of the processor,=0D + used if buffer is NU= LL.=0D + @param [in] GuaranteedPerformanceRegister If provided, Guarant= eed Performance Register Buffer.=0D + @param [in] DesiredPerformanceRegister If provided, Desired= Performance Register Buffer.=0D + @param [in] MinimumPerformanceRegister If provided, Minimum= Performance Register Buffer.=0D + @param [in] MaximumPerformanceRegister If provided, Maximum= Performance Register Buffer.=0D + @param [in] PerformanceReductionToleranceRegister If provided, Perform= ance Reduction Tolerance Register.=0D + @param [in] TimeWindowRegister If provided, Time Wi= ndow Register.=0D + @param [in] CounterWraparoundTimeBuffer If provided, Counter= Wraparound Time buffer.=0D + @param [in] CounterWraparoundTimeInteger Counter Wraparound T= ime, used if buffer is NULL.=0D + @param [in] ReferencePerformanceCounterRegister Reference Performanc= e Counter Register.=0D + @param [in] DeliveredPerformanceCounterRegister Delivered Performanc= e Counter Register.=0D + @param [in] PerformanceLimitedRegister Performance Limited = Register.=0D + @param [in] CPPCEnableRegister If provided, CPPC En= ableRegister.=0D + @param [in] AutonomousSelectionEnableBuffer If provided, Autonom= ous Selection Enable buffer.=0D + @param [in] AutonomousSelectionEnableInteger Autonomous Selection= Enable, used if buffer is NULL.=0D + @param [in] AutonomousActivityWindowRegister If provided, Autonom= ousActivity-WindowRegister.=0D + @param [in] EnergyPerformancePreferenceRegister If provided, EnergyP= erformance-PreferenceRegister.=0D + @param [in] ReferencePerformanceBuffer If provided, Referen= ce Performance buffer.=0D + @param [in] ReferencePerformanceInteger Reference Performanc= e, used if buffer is NULL.=0D + @param [in] LowestFrequencyBuffer If provided, Lowest = Frequency buffer.=0D + @param [in] LowestFrequencyInteger Lowest Frequency, us= ed if buffer is NULL.=0D + @param [in] NominalFrequencyBuffer If provided, Nominal= FrequencyBuffer buffer.=0D + @param [in] NominalFrequencyInteger NominalFrequencyBuff= er, used if buffer is NULL.=0D + @param [in] ParentNode If provided, set Par= entNode as the parent=0D + of the node created.= =0D + @param [out] NewCpcNode If success and provi= ded, contains the created node.=0D +=0D + @retval EFI_SUCCESS The function completed successfully.=0D + @retval EFI_INVALID_PARAMETER Invalid parameter.=0D + @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +AmlCreateCpcNode (=0D + /// The revision number of the _CPC package format.=0D + IN UINT32 Revision,=0D + /// Indicates the highest level of performance the processor=0D + /// is theoretically capable of achieving.=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *HighestPerformanceBuffer OPT= IONAL,=0D + IN UINT32 HighestPerformanceInteger,=0D + /// Indicates the highest sustained performance level of the processor.= =0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *NominalPerformanceBuffer OPT= IONAL,=0D + IN UINT32 NominalPerformanceInteger,=0D + /// Indicates the lowest performance level of the processor with non-lin= ear power savings.=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *LowestNonlinearPerformanceBu= ffer OPTIONAL,=0D + IN UINT32 LowestNonlinearPerformanceInt= eger,=0D + /// Indicates the lowest performance level of the processor..=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *LowestPerformanceBuffer OPTI= ONAL,=0D + IN UINT32 LowestPerformanceInteger,=0D + /// Guaranteed Performance Register Buffer.=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *GuaranteedPerformanceRegiste= r OPTIONAL,=0D + /// Desired Performance Register Buffer.=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *DesiredPerformanceRegister,= =0D + /// Minimum Performance Register Buffer.=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *MinimumPerformanceRegister O= PTIONAL,=0D + /// Maximum Performance Register Buffer.=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *MaximumPerformanceRegister O= PTIONAL,=0D + /// Performance Reduction Tolerance Register.=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *PerformanceReductionToleranc= eRegister OPTIONAL,=0D + /// Time Window Register.=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *TimeWindowRegister OPTIONAL,= =0D + /// Counter Wraparound Time=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *CounterWraparoundTimeBuffer = OPTIONAL,=0D + IN UINT32 CounterWraparoundTimeInteger,= =0D + /// Reference Performance Counter Register=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *ReferencePerformanceCounterR= egister,=0D + /// Delivered Performance Counter Register=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *DeliveredPerformanceCounterR= egister,=0D + /// Performance Limited Register=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *PerformanceLimitedRegister,= =0D + /// CPPC EnableRegister=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *CPPCEnableRegister OPTIONAL,= =0D + /// Autonomous Selection Enable=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *AutonomousSelectionEnableBuf= fer OPTIONAL,=0D + IN UINT32 AutonomousSelectionEnableInte= ger,=0D + /// AutonomousActivity-WindowRegister=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *AutonomousActivityWindowRegi= ster OPTIONAL,=0D + /// EnergyPerformance-PreferenceRegister=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *EnergyPerformancePreferenceR= egister OPTIONAL,=0D + /// Reference Performance=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *ReferencePerformanceBuffer O= PTIONAL,=0D + IN UINT32 ReferencePerformanceInteger,= =0D + /// Lowest Frequency=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *LowestFrequencyBuffer OPTION= AL,=0D + IN UINT32 LowestFrequencyInteger,=0D + /// Nominal Frequency=0D + /// Optional=0D + IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *NominalFrequencyBuffer OPTIO= NAL,=0D + IN UINT32 NominalFrequencyInteger,=0D + IN AML_NODE_HANDLE ParentNode OPTIONAL,=0D + OUT AML_OBJECT_NODE_HANDLE *NewCpcNode OPTIONAL=0D + )=0D +{=0D + EFI_STATUS Status;=0D + AML_OBJECT_NODE_HANDLE CpcNode;=0D + AML_OBJECT_NODE_HANDLE CpcPackage;=0D + UINT32 NumberOfEntries;=0D +=0D + // Revision 3 per ACPI 6.4 specification=0D + if (Revision =3D=3D 3) {=0D + // NumEntries 23 per ACPI 6.4 specification=0D + NumberOfEntries =3D 23;=0D + } else {=0D + ASSERT (0);=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + if (((HighestPerformanceBuffer =3D=3D NULL) && (HighestPerformanceIntege= r =3D=3D 0)) ||=0D + ((NominalPerformanceBuffer =3D=3D NULL) && (NominalPerformanceIntege= r =3D=3D 0)) ||=0D + ((LowestNonlinearPerformanceBuffer =3D=3D NULL) && (LowestNonlinearP= erformanceInteger =3D=3D 0)) ||=0D + ((LowestPerformanceBuffer =3D=3D NULL) && (LowestPerformanceInteger = =3D=3D 0)) ||=0D + (DesiredPerformanceRegister =3D=3D NULL) ||=0D + (ReferencePerformanceCounterRegister =3D=3D NULL) ||=0D + (DeliveredPerformanceCounterRegister =3D=3D NULL) ||=0D + (PerformanceLimitedRegister =3D=3D NULL) ||=0D + ((ParentNode =3D=3D NULL) && (NewCpcNode =3D=3D NULL)))=0D + {=0D + ASSERT (0);=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + CpcPackage =3D NULL;=0D +=0D + Status =3D AmlCodeGenNamePackage ("_CPC", NULL, &CpcNode);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + return Status;=0D + }=0D +=0D + // Get the Package object node of the _CPC node,=0D + // which is the 2nd fixed argument (i.e. index 1).=0D + CpcPackage =3D (AML_OBJECT_NODE_HANDLE)AmlGetFixedArgument (=0D + CpcNode,=0D + EAmlParseIndexTerm1=0D + );=0D + if ((CpcPackage =3D=3D NULL) = ||=0D + (AmlGetNodeType ((AML_NODE_HANDLE)CpcPackage) !=3D EAmlNodeObject) = ||=0D + (!AmlNodeHasOpCode (CpcPackage, AML_PACKAGE_OP, 0)))=0D + {=0D + ASSERT (0);=0D + Status =3D EFI_INVALID_PARAMETER;=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterOrIntegerToPackage (=0D + NULL,=0D + NumberOfEntries,=0D + CpcPackage=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterOrIntegerToPackage (=0D + NULL,=0D + Revision,=0D + CpcPackage=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterOrIntegerToPackage (=0D + HighestPerformanceBuffer,=0D + HighestPerformanceInteger,=0D + CpcPackage=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterOrIntegerToPackage (=0D + NominalPerformanceBuffer,=0D + NominalPerformanceInteger,=0D + CpcPackage=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterOrIntegerToPackage (=0D + LowestNonlinearPerformanceBuffer,=0D + LowestNonlinearPerformanceInteger,=0D + CpcPackage=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterOrIntegerToPackage (=0D + LowestPerformanceBuffer,=0D + LowestPerformanceInteger,=0D + CpcPackage=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (GuaranteedPerformanceRegister, CpcPa= ckage);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (DesiredPerformanceRegister, CpcPacka= ge);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (MinimumPerformanceRegister, CpcPacka= ge);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (MaximumPerformanceRegister, CpcPacka= ge);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (PerformanceReductionToleranceRegiste= r, CpcPackage);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (TimeWindowRegister, CpcPackage);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterOrIntegerToPackage (=0D + CounterWraparoundTimeBuffer,=0D + CounterWraparoundTimeInteger,=0D + CpcPackage=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (ReferencePerformanceCounterRegister,= CpcPackage);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (DeliveredPerformanceCounterRegister,= CpcPackage);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (PerformanceLimitedRegister, CpcPacka= ge);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (CPPCEnableRegister, CpcPackage);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterOrIntegerToPackage (=0D + AutonomousSelectionEnableBuffer,=0D + AutonomousSelectionEnableInteger,=0D + CpcPackage=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (AutonomousActivityWindowRegister, Cp= cPackage);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterToPackage (EnergyPerformancePreferenceRegister,= CpcPackage);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterOrIntegerToPackage (=0D + ReferencePerformanceBuffer,=0D + ReferencePerformanceInteger,=0D + CpcPackage=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterOrIntegerToPackage (=0D + LowestFrequencyBuffer,=0D + LowestFrequencyInteger,=0D + CpcPackage=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D AmlAddRegisterOrIntegerToPackage (=0D + NominalFrequencyBuffer,=0D + NominalFrequencyInteger,=0D + CpcPackage=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + Status =3D LinkNode (CpcNode, ParentNode, NewCpcNode);=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto error_handler;=0D + }=0D +=0D + return Status;=0D +=0D +error_handler:=0D + AmlDeleteTree ((AML_NODE_HANDLE)CpcNode);=0D + return Status;=0D +}=0D -- =0D 2.25.1=0D =0D