Skip to content

feat(pal): Enable MMU and caches on secondary PEs#208

Merged
chetan-rathore merged 3 commits intoARM-software:mainfrom
ashishsingha:secondary_pe_mmu
Feb 5, 2026
Merged

feat(pal): Enable MMU and caches on secondary PEs#208
chetan-rathore merged 3 commits intoARM-software:mainfrom
ashishsingha:secondary_pe_mmu

Conversation

@ashishsingha
Copy link
Contributor

  • Capture primary PE's MMU configuration during PE info table creation
  • Secondary PEs now enable MMU and caches using primary PE's configuration
  • Disable MMU and caches before PSCI CPU_OFF on secondary PEs
  • This ensures consistent memory behavior across all PEs during test execution

@ashishsingha
Copy link
Contributor Author

@chetan-rathore Please let me know what you think about it.

@chetan-rathore
Copy link
Contributor

Hi @ashishsingha,

Thanks for your contribution— we’ll review the changes. Could you also share more details about the issue you observed that led to this update?

@ashishsingha
Copy link
Contributor Author

ashishsingha commented Jan 12, 2026

Hi @ashishsingha,

Thanks for your contribution— we’ll review the changes. Could you also share more details about the issue you observed that led to this update?

Hi @chetan-rathore This is an enhancement where secondary CPUs won’t see timing delta while accessing any memory compared to primary CPU as now caches and MMUs will be enabled across the board. For example, if we change timer test to detect skew and drift in timer across CPUs, we need the execution environment to be same and optimal. It’ll help with performance related measurements too.

@SrikarJosyula
Copy link
Contributor

Hi @ashishsingha,
Thanks for submitting the change. We're validating it on our side.

In the meanwhile, a minor comment on the implementation - ACS doesn’t need to disable the MMU and caches before powering off the secondary PEs, the cleanup should be handled by the EL3 firmware.
Also, when secondary PEs are powered on, SCTLR_ELx.{M, C, I} is expected to already be cleared, so consistent memory behavior should still be guaranteed. (Ref: Sections 5.5 & 6.4.3.4 of PSCI Spec)

The rest of the code looks good. We’ll share any findings from our validation.

 - Capture primary PE's MMU configuration during PE info table creation
 - Secondary PEs now enable MMU and caches using primary PE's configuration
 - Disable MMU and caches before PSCI CPU_OFF on secondary PEs
 - This ensures consistent memory behavior across all PEs during test execution

Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
@ashishsingha
Copy link
Contributor Author

Hi @ashishsingha, Thanks for submitting the change. We're validating it on our side.

In the meanwhile, a minor comment on the implementation - ACS doesn’t need to disable the MMU and caches before powering off the secondary PEs, the cleanup should be handled by the EL3 firmware. Also, when secondary PEs are powered on, SCTLR_ELx.{M, C, I} is expected to already be cleared, so consistent memory behavior should still be guaranteed. (Ref: Sections 5.5 & 6.4.3.4 of PSCI Spec)

The rest of the code looks good. We’ll share any findings from our validation.

@SrikarJosyula I have addressed the feedback and have updated the PR. Can you please review again?

@ashishsingha
Copy link
Contributor Author

Hi @ashishsingha, Thanks for submitting the change. We're validating it on our side.
In the meanwhile, a minor comment on the implementation - ACS doesn’t need to disable the MMU and caches before powering off the secondary PEs, the cleanup should be handled by the EL3 firmware. Also, when secondary PEs are powered on, SCTLR_ELx.{M, C, I} is expected to already be cleared, so consistent memory behavior should still be guaranteed. (Ref: Sections 5.5 & 6.4.3.4 of PSCI Spec)
The rest of the code looks good. We’ll share any findings from our validation.

@SrikarJosyula I have addressed the feedback and have updated the PR. Can you please review again?

@chetan-rathore @SrikarJosyula Any update on this?

@chetan-rathore
Copy link
Contributor

Hi @ashishsingha,
This is in internal review stage and will try to close this asap.

@SrikarJosyula
Copy link
Contributor

Hi @ashishsingha, some files require copyright updates. I've submitted a PR to your fork, please review.

 - updated copyright year to 2026 for the modified files.

Signed-off-by: Srikar Josyula <srikar.josyula@arm.com>
@ashishsingha
Copy link
Contributor Author

Hi @ashishsingha, some files require copyright updates. I've submitted a PR to your fork, please review.

I have merged it.

@chetan-rathore chetan-rathore merged commit 917ba9e into ARM-software:main Feb 5, 2026
27 checks passed
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