Page MenuHomeFreeBSD

amd64: cleanup pmap_init_pat().
ClosedPublic

Authored by kib on Feb 17 2019, 7:41 PM.
Tags
None
Referenced Files
F105973562: D19225.id54041.diff
Mon, Dec 23, 7:36 AM
Unknown Object (File)
Sep 29 2024, 1:48 PM
Unknown Object (File)
Sep 21 2024, 6:30 PM
Unknown Object (File)
Sep 18 2024, 12:42 AM
Unknown Object (File)
Sep 9 2024, 2:22 AM
Unknown Object (File)
Sep 7 2024, 8:24 PM
Unknown Object (File)
Sep 7 2024, 11:34 AM
Unknown Object (File)
Sep 1 2024, 1:59 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.