Skip to content

Conversation

@miguelafsilva5
Copy link
Member

PR Description

The mpu_find_region_base and mpu_find_region_exact on arm-r MPU driver were failing to find some regions that had the same base. These function only checked the first region that matched the base. Furthermore, they didn't validate that the region belong to the address space using the mpu update or unmap.

This PR fixes this problem by merging both function in one and adding a check to the asid owner of each region. This solves the problem because the vmpu driver ensures that there is only a single region with the same base per AS.

Another function was removed because is was a single if statement and it was being used only once throughout the code.

There were some corner cases that the find region functions were not
finding the correct regions and where mapping/unmapping wrongly.
To solve this, we added an extra check, that validates if the region
belongs to the intended as

Signed-off-by: Miguel Silva <[email protected]>
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