Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hat_getkpfnum(9F) — SunOS 5.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mmap(9E)

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

mmap(9E)

Writing Device Drivers

SunOS 5.4  —  Last change: 30 Mar 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026