Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creates C-State, P-State and CPC objects under processor for X64 arch #6484

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

abdattar
Copy link
Contributor

@abdattar abdattar commented Nov 29, 2024

Description

This PR creates below ACPI objects for processor device for X64 arch
C-State: Creates _CST and _CSD objects.
P-State: Create _PCT, _PSS objects plus _PPC method
_PSD object for domain dependency
_CPC continue performance control object
Update AML library to generate _CST, _CSD, _PCT and _PSS node.
Generates _STA method based on configuration data.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

Tested on AMD Platform

Integration Instructions

N/A

DynamicTablesPkg/Include/AcpiObjects.h Outdated Show resolved Hide resolved
DynamicTablesPkg/Include/AcpiObjects.h Outdated Show resolved Hide resolved
DynamicTablesPkg/Include/AcpiObjects.h Outdated Show resolved Hide resolved
DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h Outdated Show resolved Hide resolved
@abdattar abdattar force-pushed the CpuObjects branch 3 times, most recently from a13b8af to 8e23166 Compare December 9, 2024 09:03
@abdattar
Copy link
Contributor Author

abdattar commented Dec 9, 2024

Hi @pierregondois,
I have addressed the review comments. Could you please review it again?
Thanks,
Abdul

DynamicTablesPkg/Include/AcpiObjects.h Outdated Show resolved Hide resolved
DynamicTablesPkg/Include/AcpiObjects.h Outdated Show resolved Hide resolved
MdePkg/Include/IndustryStandard/Acpi65.h Show resolved Hide resolved
Copy link
Contributor Author

@abdattar abdattar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pierregondois,
Thank you for your detailed review.
I've included my comments on the factorization and attached the sample output for your reference.
acpi-SSDT-76AEF000.txt

Thanks
AbduL

@lgao4
Copy link
Contributor

lgao4 commented Dec 17, 2024

The change in MdePkg is good to me.

@abdattar abdattar force-pushed the CpuObjects branch 2 times, most recently from d3cd998 to 4dc2801 Compare January 6, 2025 10:29
@abdattar
Copy link
Contributor Author

abdattar commented Jan 6, 2025

Hi @pierregondois,
Addressed the review comments and leveraged the _LPI code to generate the _CST state.
Thanks
AbduL

Copy link
Contributor

@pierregondois pierregondois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Abdul,
Thanks a lot for the new version and using reference tokens for _CSD generation. I still have a couple of comments.
Also, would it be possible to add a bit more information in the commit messages ?

Regards,
Pierre

Abdul Lateef Attar added 3 commits January 9, 2025 12:14
Add _CSD version and number of entries definition.
These were introduced in the ACPI 3.0 specification.
Reference: ACPI 6.5 specification, section 8.4.1.2,
Table 8.3: C-State Dependency Package Values.

Signed-off-by: Abdul Lateef Attar <[email protected]>
This commit introduces a set of functions designed to facilitate the creation
and management of C-State (_CST, _CSD) and P-State (_PCT, _PSS) ACPI objects.

Detailed Summary:
1) AmlCreateCstNode(): This function is responsible for creating a _CST
   (C-State) node, which is essential for defining processor idle states.
2) AmlAddCstState(): This function adds a C-State package to an existing
   CST node, allowing for the specification of individual C-State entries.
3) AmlCreateCsdNode(): This function creates a _CSD (C-State Dependency) node,
   which is used to describe dependencies between different C-States.
4) AmlCreatePctNode(): This function generates a _PCT (Performance Control) node,
   complete with PCT packages, to manage performance state transitions.
5) AmlCreatePssNode(): This function creates a _PSS (Performance Supported States) node,
   which lists the supported performance states for a processor.

Signed-off-by: Abdul Lateef Attar <[email protected]>
This update adds new configuration manager objects for C-State and P-State.
The C-State objects manage processor idle states,
while the P-State objects handle processor performance states.
This enhancement improves power management and performance
tuning within the DynamicTablesPkg.

Changes include:
- Added C-State and P-State namespace objects in ArchCommonNameSpaceObjects.h.
- Updated ConfigurationManagerObjectParser.c to support the new objects.
- Revised Readme.md to document these changes.

Signed-off-by: Abdul Lateef Attar <[email protected]>
Abdul Lateef Attar added 3 commits January 9, 2025 15:59
This patch adds several ACPI objects to the X64 CPU SSDT table
 to enhance power and performance management.

The new objects include:
- _CST: Defines CPU idle states for power saving.
- _CSD: Specifies dependencies between CPU idle states.
- _PCT: Provides an interface for controlling CPU performance states.
- _PSS: Lists supported CPU performance states.
- _PPC: Indicates current CPU performance capabilities.

These additions help improve power efficiency and thermal management in X64 systems.

Signed-off-by: Abdul Lateef Attar <[email protected]>
Introduce _PSD and _CPC ACPI objects for X64 platforms.

Signed-off-by: Abdul Lateef Attar <[email protected]>
Adds _STA device status bit definitions.
Reference: ACPI 6.5 specification, section 6.3.7

Signed-off-by: Abdul Lateef Attar <[email protected]>
Implement the _STA method for the CPU object based on
the value provided by the configuration manager.

Signed-off-by: Abdul Lateef Attar <[email protected]>
@abdattar
Copy link
Contributor Author

Hi @pierregondois,
Thank you for the detailed review. I have addressed the comments.
Please review it again.

Thanks,
Abdul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants