Page MenuHomeFreeBSD

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

Authored by rwatson on Mar 12 2016, 8:35 PM.
Tags
Referenced Files
Unknown Object (File)
Mon, Dec 2, 9:35 PM
Unknown Object (File)
Fri, Nov 29, 8:59 AM
Unknown Object (File)
Wed, Nov 27, 3:49 PM
Unknown Object (File)
Nov 2 2024, 2:12 PM
Unknown Object (File)
Oct 25 2024, 7:28 PM
Unknown Object (File)
Oct 6 2024, 4:37 AM
Unknown Object (File)
Oct 5 2024, 6:08 PM
Unknown Object (File)
Oct 3 2024, 1:10 AM

Details

Reviewers
adrian
sson
Group Reviewers
MIPS
Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
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 https://reviews.freebsd.org/D2535 ) 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

MIPS has been removed from the tree