Page MenuHomePhabricator

TF-A Bug
Open, Needs TriagePublic

Description

Hi,
Recently, we notice that the member of struct "non_cpu_pwr_domain_node", called lock_index, is assigned to "unsigned char", that means the psci or pwr_domain most support system with 2^8 cores.
when the feature is applies to a complex system, the data might be unexpected.
we just wonder the type of "lock_index" can be expanded to "unsigned int".

Thanks.

Event Timeline

Hi,
The struct "non_cpu_pwr_domain_node" represents a non-leaf power domain in an SoC such as a logical cluster. As you mentioned, the lock_index declaration with "unsigned char" limits such non-cpu power domains to 64. I believe it doesn't restrict the number of CPUs in a system to be <= 64. Do you currently face an issue with PSCI implementation due to the above constraint? Can you advise what is the power domain topology of your system? I think the lock_index can be expanded using "unsigned int" if needed.

Yes, The power domain topology of the system can be described as 8 sockets, each socket with 10 clusters and each cluster with 8 cores. We just consider a system like this might face the constraint mentioned above, and we must modify the declaration of lock_index to solve this problem. Feature, more and more interconnected system, with numerous cpus, might face the same problem.

Thanks.

Hi,
Yeah, looks like such a large system with numerous clusters will run into an issue with the current limitation of "lock_index" being "unsigned char". Please go ahead and submit a patch for review:

https://review.trustedfirmware.org/p/TF-A/trusted-firmware-a/+/dashboard/site:main

Thanks for your reply. It is difficult to submit code to community or Gerrit using company's account and system. So, I wonder whether it's permitted to upload by providing modifications or “git send-email” with patches.

Thanks a lot.

This comment was removed by joannafarley-arm.

Hi,
Please use personal email and git configs/identity to push the patch to trustedfirmware.org. Few developers from the tf-a community have done this. Here is a link to contribution guidelines:

https://trustedfirmware-a.readthedocs.io/en/latest/process/contributing.html

Hi,
A developer submitted a patch which closely relates to this issue. Please give your feedback here: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/7314