hat_getkpfnum(9F)
NAME
hat_getkpfnum − get page frame number for kernel address
SYNOPSIS
#include <sys/vm.h>
#include <sys/types.h>
#include <sys/ddi.h>
u_int hat_getkpfnum(caddr_t addr);
ARGUMENTS
addr The kernel virtual address for which the page frame number is to be returned.
INTERFACE LEVEL
Architecture independent level 2 (DKI only).
DESCRIPTION
Drivers implementing the mmap(9E) entry point must return the page frame number corresponding to the virtual address of the device memory address addr, or −1 for error. This frame number can be obtained by a call to hat_getkpfnum().
RETURN VALUES
The page frame number corresponding to virtual address addr, or −1 for invalid mappings.
CONTEXT
hat_getkpfnum() can be called from user or interrupt context. Although there is no reason why hat_getkpfnum() cannot be called from interrupt context, there is no need, since it only needs to be called from within mmap(9E).
SEE ALSO
SunOS 5.1 — Last change: 30 Mar 1992