V7/usr/man/man2/phys.2
.TH PHYS 2 PDP11
.SH NAME
phys \- allow a process to access physical addresses
.SH SYNOPSIS
.B phys(segreg, size, physadr)
.SH DESCRIPTION
The argument
.I segreg
specifies a process virtual (data-space) address
range of 8K bytes starting
at virtual address
.IR segreg \(mu8K
bytes.
This address range is mapped into
physical address
.IR physadr \(mu64
bytes.
Only the first
.IR size \(mu64
bytes of this mapping is addressable.
If
.I size
is zero,
any previous mapping of this
virtual address range is nullified.
For example,
the call
.PP
phys(6, 1, 0177775);
.PP
will map virtual addresses 0160000-0160077 into
physical addresses 017777500-017777577.
In particular,
virtual address 0160060 is the PDP-11 console
located at physical address 017777560.
.PP
This call may only be executed by the super-user.
.SH "SEE ALSO"
PDP-11 segmentation hardware
.SH DIAGNOSTICS
The function value zero is returned if
the physical mapping is in effect.
The value \-1 is returned
if not super-user,
if
.I segreg
is not in the range 0-7,
if
.I size
is not in the range 0-127,
or if
the specified
.I segreg
is already used for other than
a previous call to
.IR phys .
.SH BUGS
This system call is obviously very machine
dependent and very dangerous.
This system call is not considered
a permanent part of the system.
.SH ASSEMBLER
(phys = 52.)
.br
.B sys phys; segreg; size; physadr