Page MenuHomeFreeBSD

uio.9: Document uiomove_fromphys()
ClosedPublic

Authored by 0mp on Dec 4 2025, 3:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 11, 12:10 AM
Unknown Object (File)
Wed, Jun 10, 2:46 PM
Unknown Object (File)
Wed, Jun 10, 2:48 AM
Unknown Object (File)
Wed, Jun 10, 2:33 AM
Unknown Object (File)
Tue, Jun 9, 9:03 AM
Unknown Object (File)
Sun, Jun 7, 11:48 PM
Unknown Object (File)
Sun, Jun 7, 1:04 PM
Unknown Object (File)
Thu, Jun 4, 7:52 PM
Subscribers

Diff Detail

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

Event Timeline

0mp requested review of this revision.Dec 4 2025, 3:12 PM
share/man/man9/uio.9
165

I don't think this is fully accurate. uiomove_fromphys() is implemented on i386 that lacks a directmap using sf_bufs. I think whether the underlying implementation uses the direct map or transient mappings is not relevant in the context of the man page.

share/man/man9/uio.9
165

Exactly, the point of uiomove_fromphys() is to provide machine-independent helper to copy to/from memory in the physical address space.

169

Described how? You should explain somehow that array provides the locations that form the place to target the copying. I do not know how to formulate it concise but understandable.

share/man/man9/uio.9
169

Maybe use: "The source physical address are provided in the ma[] parameter."? I'm not a native speaker, so others might have better suggestions.

share/man/man9/uio.9
169

'adresses' then, each page in the ma[] array provides the page-sized chunk of the phys space. It is not necessary contiguous.

share/man/man9/uio.9
169

Ops, yes, sorry, that was a typo on my end.

0mp marked 2 inline comments as done.
  • Improve the wording around the ma[] argument
0mp marked 4 inline comments as done.Mar 20 2026, 8:33 AM
0mp added inline comments.
share/man/man9/uio.9
165

It should be clearer now.

169

I added a note that ma[] contains physical page addresses and that those pages are not necessarily contiguous.

share/man/man9/uio.9
164
165
169

Remove this line.

0mp marked 4 inline comments as done.
  • Address kib's feedback
share/man/man9/uio.9
172

It's the offset into the array, I believe it does not have to lie within the first page.

178

I'm not sure why this is worth noting...?

0mp marked 2 inline comments as done.May 7 2026, 12:09 PM
0mp added inline comments.
share/man/man9/uio.9
172

Good catch!

178

I'll remove that.

0mp marked 2 inline comments as done.
  • Remove implementation notes where I unnecessarily documented that uiomove_fromphys is MD.
  • Fix the description of the offset arg. The offset does not have to be within the first page of tha array.
This revision is now accepted and ready to land.May 7 2026, 12:23 PM

I'm going to wait a while before pushing this upstream to let other reviewers chime in.

Thanks kib!

This revision was automatically updated to reflect the committed changes.