Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vtop(K) — System V/386 Software Development System 3.2.2b

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     VTOP(K)                   UNIX System V                   VTOP(K)



     Name
          vtop - convert a virtual address to a physical address

     Syntax
          #include "sys/types.h"

          paddr_t
          vtop(vaddr, proc-ptr)
          char *vaddr;
          struct proc *proc-ptr;

     Description
          vtop returns a physical address associated with the
          specified virtual address.  Specify proc-ptr as either
          u.u_procp or as bp->b_proc, where bp is a pointer to the buf
          structure.  proc-ptr can be omitted if vtop is called from
          user context.  If vtop is called with one argument, or with
          u.u_procp as the proc-ptr, then vtop can only be called from
          user context and not from an interrupt routine.

     Parameters
               vaddr     virtual address to be translated

               proc-ptr  pointer to a proc structure (described in
                         sys/proc.h)

     Return Value
          Normally, a physical address is returned.  -1 is returned if
          the specified address is incorrect and vtop is called from
          user context.  0 (zero) is returned if the specified address
          is incorrect and vtop is called from an interrupt routine.
          If the specified page of kernel memory is not present, a
          panic results during the vtop call with the following
          message:

            PANIC: svirtophys - not present.


          "svirtophys" is a subroutine called by vtop.

                                                      (printed 7/6/89)



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