1PHYS(2)                       System Calls Manual                      PHYS(2)
2
3
4

NAME

6       phys - allow a process to access physical addresses (2BSD)
7

SYNOPSIS

9       phys(segreg, size, physaddr)
10       unsigned int segreg, size, physaddr;
11

DESCRIPTION

13       The  argument  segreg  specifies a process virtual (data-space) address
14       range of 8K bytes starting at virtual address  segreg×8K  bytes.   This
15       address  range is mapped into physical address physaddr×64 bytes.  Only
16       the first size×64 bytes of this mapping is  addressable.   If  size  is
17       zero,  any previous mapping of this virtual address range is nullified.
18       For example, the call
19
20            phys(7, 1, 0177775);
21
22       will map virtual  addresses  0160000-0160077  into  physical  addresses
23       017777500-017777577.   In  particular,  virtual  address 0160060 is the
24       PDP-11 console located at physical address 017777560.
25
26       This call may only be executed by the super-user.
27

ERRORS

29       [EPERM]        The process's effective user ID is not the super-user.
30
31       [EINVAL]       Segreg is less than 0 or greater than 7.
32
33       [EINVAL]       Size is less than 0 or greater than 128.
34

SEE ALSO

36       PDP-11 segmentation hardware
37

BUGS

39       On systems with ENABLE/34(tm) memory mapping  boards,  phys  cannot  be
40       used to map in the I/O page.
41
42       This  system  call is very dangerous.  It is not considered a permanent
43       part of the system.
44
45       Phys is unique to the PDP-11 and 2BSD; its use is discouraged.
46
47
48
493rd Berkeley Distribution      January 22, 1987                        PHYS(2)
Impressum