hat_getkpfnum() returns the page frame number corresponding to the kernel virtual address, addr.
addr must be a kernel virtual address which maps to device memory. ddi_map_regs(9F) can be used to obtain this address. For example, ddi_map_regs(9F)
can be called in the driver's attach(9E) routine. The resulting
kernel virtual address can be saved by the driver (see ddi_soft_state(9F)) and
used in mmap(9E). The corresponding ddi_unmap_regs(9F) call can be made in the driver's detach(9E) routine. Refer to mmap(9E) for more information.
|