Page MenuHomeFreeBSD

Fix MIPS pmap_align_superpage() function to use superpage rather than segment alignment

Authored by rwatson on Mar 12 2016, 8:35 PM.


Group Reviewers

When attempting to satisfy mmap() requests for superpage alignment on 64-bit MIPS, use superpage rather than physical-segment constants, or we may improperly fail to apply suitable alignment -- yet still allow mmap() to appear to succeed.

Test Plan

Tested on 64-bit MIPS BERI, but not on 32-bit MIPS. This patch includes the change required for the new 64-bit MIPS pmap, but if committed now would be applied only to the current pmap.

Diff Detail

rS FreeBSD src repository - subversion
Lint Skipped
Unit Tests Skipped

Event Timeline

rwatson retitled this revision from to Fix MIPS pmap_align_superpage() function to use superpage rather than segment alignment.
rwatson updated this object.
rwatson edited the test plan for this revision. (Show Details)
rwatson added reviewers: MIPS, sson.
rwatson set the repository for this revision to rS FreeBSD src repository - subversion.
rwatson added a project: MIPS.

Yes, the superpage size should be 2M (PDRSIZE) for mips64. This looks correct. I am not sure it matters for mips32 given there is no superpage support for it yet. The way it is done for mips64 (see ) may not work for mips32 given the limited number of available PTE bits. Of course, the mips64 superpage implementation was designed to support multiple superpage sizes (more than just 2M) although only one superpage size is currently implemented. I imagine with mips32 only one superpage size would be supported.

adrian added a reviewer: adrian.
adrian added a subscriber: adrian.

looks good then!

This revision is now accepted and ready to land.Sep 20 2016, 4:12 PM