Page MenuHomeFreeBSD

amd64: cleanup pmap_init_pat().
ClosedPublic

Authored by kib on Feb 17 2019, 7:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 20, 9:39 PM
Unknown Object (File)
Thu, Nov 20, 9:24 PM
Unknown Object (File)
Thu, Nov 20, 9:24 PM
Unknown Object (File)
Thu, Nov 20, 9:16 PM
Unknown Object (File)
Sun, Nov 16, 10:51 PM
Unknown Object (File)
Fri, Oct 31, 3:15 PM
Unknown Object (File)
Thu, Oct 30, 2:21 AM
Unknown Object (File)
Mon, Oct 27, 1:38 AM
Subscribers

Details

Summary

The pmap_works variable is always true for amd64. Remove it, the branch in the initialization taken when false, and corresponding sysctl.
Remove pat_table[] local array, work on pat_index[] directly.
Collapse whole initialization to not override already assigned values.
Add comment explaining the choice for PAT4 and PAT7.

MFC note: I might leave the sysctl around.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added inline comments.
sys/amd64/amd64/pmap.c
1244 ↗(On Diff #54021)

"a recursive"

1245 ↗(On Diff #54021)

"a PAT value"

1246 ↗(On Diff #54021)

I'm confused by the comment. What's special about the recursive map?

This revision is now accepted and ready to land.Feb 17 2019, 8:07 PM
kib marked 2 inline comments as done.Feb 17 2019, 8:30 PM
kib added inline comments.
sys/amd64/amd64/pmap.c
1246 ↗(On Diff #54021)

For recursive map, pde becomes pte, so PG_PS is interpreted as the PAT bit 3.

sys/amd64/amd64/pmap.c
1246 ↗(On Diff #54021)

Oops, I see.

This revision was automatically updated to reflect the committed changes.