Page MenuHomeFreeBSD

arm: Make the pmap_kenter signature like arm64
ClosedPublic

Authored by andrew on May 12 2025, 1:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 9, 8:44 PM
Unknown Object (File)
Fri, Oct 3, 4:51 AM
Unknown Object (File)
Wed, Oct 1, 4:34 PM
Unknown Object (File)
Thu, Sep 25, 8:02 PM
Unknown Object (File)
Sat, Sep 20, 4:20 AM
Unknown Object (File)
Thu, Sep 18, 11:19 AM
Unknown Object (File)
Thu, Sep 18, 5:41 AM
Unknown Object (File)
Tue, Sep 16, 5:26 PM
Subscribers

Details

Summary

To support a common pmap_mapdev_attr change pmap_kenter to include the
size any memory type in the signature.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mhorne added a subscriber: mhorne.

LGTM with one tweak.

sys/arm/arm/mem.c
117–118

Now the relevant range is flushed by pmap_kenter(), so this can be dropped.

This revision is now accepted and ready to land.May 12 2025, 4:00 PM

Split out the mapping part of pmap_kenter to:

  • Remove unneeded tlb flush from mem.c
  • Keep the local only flush in pmap_kenter_temporary
This revision now requires review to proceed.May 12 2025, 4:47 PM
mhorne added inline comments.
sys/arm/arm/pmap-v6.c
1311–1312

It probably makes more sense for this function to be inlined than pmap_kenter()?

Other implementations removed the use of PMAP_INLINE altogether (git log --grep PMAP_INLINE). Not sure what you want to do here, but this question is secondary to the change at hand.

This revision is now accepted and ready to land.May 12 2025, 6:38 PM

Very briefly, I think this clashes with devmap_add_entry(), which is used on armv7 to reduce the TLB load. The pmap_mapdev_attr() function does not respect the required attributes for pages previously mapped by devmap_add_entry(). Imho, we don't have a method for changing page attributes on multiple mapped pages in an architecturally correct way. (And I'm afraid this is true for arm64 , for pages mapped by DMAP and also in some other way).

I'm sorry, I wanted to send it to D50309.