Skip to content

Conversation

@hujun260
Copy link
Contributor

Summary

Fix the RPMSG RTC driver's MPU region free operation by correcting the register write order. The hardware requires writing the limit register first as it contains the enable/disable bit for the region.

Changes Made

  • Reorder register writes in mpu_freeregion() to write limit register before base register
  • Add clarifying comments explaining the hardware requirement
  • Ensure proper region disable operation during memory region cleanup

Impact

  • Stability: Fixes potential issues with MPU region management in ARM64
  • Compatibility: No breaking changes, only corrects hardware sequencing
  • Code Quality: Improves code clarity with better documentation

Testing

Tested on ARM64 platform with MPU configuration enabled.

Fixes: None (Bug fix for register sequencing)

Related Issues

None

The limit register contains the enable/disable bit for the MPU region,
so it must be written first before writing the base register to ensure
proper region disable operation.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
@github-actions github-actions bot added Arch: arm64 Issues related to ARM64 (64-bit) architecture Size: XS The size of the change in this PR is very small labels Jan 20, 2026
@jerpelea jerpelea changed the title arm64: fix mpu_freeregion arch/arm64: fix mpu_freeregion Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm64 Issues related to ARM64 (64-bit) architecture Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants