Indirect system call

Amos Shapir amos at taux01.UUCP
Thu Nov 9 17:07:17 AEST 1989


That's an elegant way to bypass the separate instruction/data address space
mechanism on high-end models of PDP11.  Early version of UNIX passed
arguments to system calls by putting them in the words following the
"sys" instruction (a.k.a. as "trap"):
	sys 3; fd; addr; size

(This was a standard way of passing arguments to subroutines and system
calls in DEC's systems).  When PDP11/45 and /70 came along, that posed
a problem, since they used a double address space to increase the limit
of 16 bit virtual addresses - data address 524 is in a different place
than instruction address 524, and there is no way to access the latter
except branch there.

The "indirect" system call was invented to solve this problem: a "sys"
instruction is prepared with all its arguments in data space, then
an indirect call is performed to execute it.  Execution is carried out
by the kernel, which can access all of the user's space.

-- 
	Amos Shapir		amos at taux01.nsc.com, amos at nsc.nsc.com
National Semiconductor (Israel) P.O.B. 3007, Herzlia 46104, Israel
Tel. +972 52 522261  TWX: 33691, fax: +972-52-558322 GEO: 34 48 E / 32 10 N



More information about the Comp.unix.wizards mailing list