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

Merged
merged 7 commits into from
Feb 25, 2025

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

@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

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

@abdattar
Copy link
Contributor Author

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

Thanks,
Abdul

@abdattar
Copy link
Contributor Author

abdattar commented Feb 5, 2025

Rebase the branch and addressed the merge conflicts.

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 for the modifications and sorry for the delay. I just have some minor comments

@abdattar abdattar force-pushed the CpuObjects branch 2 times, most recently from 6ad6499 to 873aeae Compare February 18, 2025 15:14
@abdattar
Copy link
Contributor Author

Hi @pierregondois,
I have addressed the review comment. could you please take a look.
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.

Thanks for all the modifications !

@abdattar
Copy link
Contributor Author

Marked the conversations as resolved and rebase the branch from PR GUI.

@pierregondois pierregondois added push Auto push patch series in PR if all checks pass and removed push Auto push patch series in PR if all checks pass labels Feb 24, 2025
Abdul Lateef Attar added 7 commits February 25, 2025 09:18
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]>
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]>
@pierregondois pierregondois merged commit 0f13660 into tianocore:master Feb 25, 2025
124 checks passed
@abdattar
Copy link
Contributor Author

Thanks @pierregondois for reviewing and merging the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants