Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ kvtoppid(D3DK) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

kvtoppid(D3DK)  —  

.IX \f4kvtoppid\fP(D3DK)

NAME

kvtoppid − get physical page ID for kernel virtual address

SYNOPSIS

#include <sys/types.h>
#include <sys/vmparam.h>
ppid_t kvtoppid(caddr_t addr);

ARGUMENTS

addrThe kernel virtual address for which the physical page ID is to be returned. 

DESCRIPTION

This routine can be used to obtain a physical page ID suitable to be used as the return value of the driver’s mmap(D2DK) entry point.  kvtoppid returns the physical page ID corresponding to the virtual address addr. 

A physical page ID is a machine-specific token that uniquely identifies a page of physical memory in the system (either system memory or device memory.)  No assumptions should be made about the format of a physical page ID. 

RETURN VALUE

If addr is valid, the corresponding physical page ID is returned.  Otherwise, NOPAGE is returned. 

LEVEL

Base or interrupt. 

NOTES

Does not sleep.  Driver defined basic locks, read/write locks, and sleep locks may be held across calls to this function.

SEE ALSO

mmap(D2DK), intro(D3DK), phystoppid(D3DK)

DDI/DKI

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