DynamicTablesPkg: Add AmlCreatePsdNode() to generate _PSD

Add AmlCreatePsdNode() to the AmlLib to generate _PSD objects.
_PSD objects allow to describe 'performance control, P-state
or CPPC, logical processor dependency', Cf. ACPI 6.5,
s8.4.5.5 _PSD (P-State Dependency).

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Pierre Gondois
2024-01-25 16:18:46 +01:00
committed by mergify[bot]
parent 0a9060b259
commit 3344495489
2 changed files with 221 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
/** @file
AML Lib.
Copyright (c) 2019 - 2021, Arm Limited. All rights reserved.<BR>
Copyright (c) 2019 - 2023, Arm Limited. All rights reserved.<BR>
Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -1805,4 +1805,37 @@ AmlCodeGenInvokeMethod (
IN AML_NODE_HANDLE ParentNode
);
/** Create a _PSD node.
Creates and optionally adds the following node
Name(_PSD, Package()
{
NumEntries, // Integer
Revision, // Integer
Domain, // Integer
CoordType, // Integer
NumProc, // Integer
})
Cf. ACPI 6.5, s8.4.5.5 _PSD (P-State Dependency)
@ingroup CodeGenApis
@param [in] PsdInfo PsdInfo object
@param [in] ParentNode If provided, set ParentNode as the parent
of the node created.
@param [out] NewPsdNode If success and provided, contains the created node.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
**/
EFI_STATUS
EFIAPI
AmlCreatePsdNode (
IN AML_PSD_INFO *PsdInfo,
IN AML_NODE_HANDLE ParentNode OPTIONAL,
OUT AML_OBJECT_NODE_HANDLE *NewPsdNode OPTIONAL
);
#endif // AML_LIB_H_