Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ phys(2) — A/UX 0.7

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     phys(2)                                                   phys(2)



     NAME
          phys - allow a process to access physical addresses

     SYNOPSIS
          phys(physnum, virtaddr, size, physaddrfP)
          int physnum
          char *virtaddr;
          long size;
          char *physaddrfP;

     DESCRIPTION
          The phys(2) call maps arbitrary physical memory into a
          process's virtual address space. The virtual address used by
          must not otherwise be used.  physnum is a number (0-3) that
          specifies which of 4 physical spaces to set up.  Up to 4
          phys(2) calls can be active at any one time.  virtaddr is
          the process's virtual address.  size is the number of bytes
          to map in.  physaddr is the physical address to map in.

          Valid virtaddr and physaddr values are constrained by
          hardware and must be at an address multiple of the
          resolution of the CPU's memory management scheme.  If size
          is non zero, size is rounded up to the next MMU resolution
          boundary.  If size is zero, any previous phys(2) mapping for
          that physnum segment is nullified.

          For example, the call:

               phys(2, 0x100000, 32768, 0)

          will allow a process to access physical locations 0 through
          32767 by referencing virtual address 0x100000 through
          0x100000+32767.

          In actuality, the CPU MMU register is loaded with physaddr
          shifted to account for page resolution.

          phys(2) may only be executed by the super-user.

     DIAGNOSTICS
          The value zero is returned if the call was successful.  The
          value -1 is returned if not super-user, if virtaddr or
          physaddr is not in the proper range, or if the specified
          virtaddr segment register is already in use.

     BUGS
          This system call is very machine dependent.








     Page 1                                        (last mod. 1/14/87)



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