Research V7 development
[unix-history] / usr / man / man2 / phys.2
CommitLineData
6de44978
KT
1.TH PHYS 2 PDP11
2.SH NAME
3phys \- allow a process to access physical addresses
4.SH SYNOPSIS
5.B phys(segreg, size, physadr)
6.SH DESCRIPTION
7The argument
8.I segreg
9specifies a process virtual (data-space) address
10range of 8K bytes starting
11at virtual address
12.IR segreg \(mu8K
13bytes.
14This address range is mapped into
15physical address
16.IR physadr \(mu64
17bytes.
18Only the first
19.IR size \(mu64
20bytes of this mapping is addressable.
21If
22.I size
23is zero,
24any previous mapping of this
25virtual address range is nullified.
26For example,
27the call
28.PP
29 phys(6, 1, 0177775);
30.PP
31will map virtual addresses 0160000-0160077 into
32physical addresses 017777500-017777577.
33In particular,
34virtual address 0160060 is the PDP-11 console
35located at physical address 017777560.
36.PP
37This call may only be executed by the super-user.
38.SH "SEE ALSO"
39PDP-11 segmentation hardware
40.SH DIAGNOSTICS
41The function value zero is returned if
42the physical mapping is in effect.
43The value \-1 is returned
44if not super-user,
45if
46.I segreg
47is not in the range 0-7,
48if
49.I size
50is not in the range 0-127,
51or if
52the specified
53.I segreg
54is already used for other than
55a previous call to
56.IR phys .
57.SH BUGS
58This system call is obviously very machine
59dependent and very dangerous.
60This system call is not considered
61a permanent part of the system.
62.SH ASSEMBLER
63(phys = 52.)
64.br
65.B sys phys; segreg; size; physadr