hat_getkpfnum is referenced but not documented
This is an obsolete function, that largely exists for SVID compatibility.
It isn't documented, although some references to it exist in other pages.
We should probably remove it entirely. Nobody should be using it any more. (We should verify that none of the closed drivers have references to it -- historically this was found in some really old drivers.)
Updated by Joshua M. Clulow 2 months ago
I think you already removed the function in #536 ? Seems like it's just vestigial mentions in comments and manuals at this point:
$ rg hat_getkpfnum uts/common/sys/ddi.h 163: * SVR4MP replacement for hat_getkpfnum() uts/common/os/ddi.c 1202: * hat_getkpfnum. The only major difference is man/man9e/Intro.9e 128:class, \fBsegmap\fR(9E) and \fBhat_getkpfnum\fR(9F) man/man9e/mmap.9e 127:\fBhat_getkpfnum\fR(9F) for the physical page in device memory containing the 131:\fBhat_getkpfnum\fR(9F) accepts a kernel virtual address as an argument. A 159:the value returned by \fBhat_getkpfnum\fR(9F), for the page at offset \fIoff\fR 167:\fIoff\fR is valid, \fBhat_getkpfnum\fR(9F) is called to obtain the page frame 212: return (hat_getkpfnum (xsp->regp->csr + off)); 251:.BR hat_getkpfnum (9F) 266:number may be obtained by calling \fBhat_getkpfnum\fR(9F) with the kernel 274:the call to \fBhat_getkpfnum\fR(9F). man/man9f/Intro.9f 574:\fBhat_getkpfnum\fR DKI only
Updated by Garrett D'Amore 2 months ago
The API for mmap(9e) refers to this, and it looks kind of impossible to define it without referring to PFNs and hence to this function we no longer have.
No drivers except /dev/mem support mmap(9e).
Maybe we should just eliminate the details for how to implement this function, since we can't actually say today how to correctly implement it.