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)
Sun, Oct 19, 3:21 AM
Unknown Object (File)
Fri, Oct 3, 4:27 AM
Unknown Object (File)
Sun, Sep 28, 2:17 AM
Unknown Object (File)
Sat, Sep 27, 11:17 PM
Unknown Object (File)
Sat, Sep 27, 5:26 PM
Unknown Object (File)
Sat, Sep 27, 4:34 PM
Unknown Object (File)
Sat, Sep 27, 3:14 PM
Unknown Object (File)
Sat, Sep 27, 3:13 PM
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.