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)
Dec 20 2023, 5:29 AM
Unknown Object (File)
Nov 15 2023, 10:40 AM
Unknown Object (File)
Nov 15 2023, 4:56 AM
Unknown Object (File)
Nov 11 2023, 8:33 AM
Unknown Object (File)
Nov 9 2023, 8:35 AM
Unknown Object (File)
Nov 8 2023, 12:49 PM
Unknown Object (File)
Oct 14 2023, 9:37 AM
Unknown Object (File)
Oct 8 2023, 7:31 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.