[comp.sys.nsc.32k] Mod Table

agnew@trwrc.UUCP (Robert A. Agnew) (06/06/89)

The National programmer's manual for the 32k says that the module table
must exist in the first 64k of physical memory. The Texas Instrument
(second source) programmer's manual for the 32032 states that there can
be 64k of module table per user.  These statements appear to be
inconsistent. What happens in supervisor mode? Does the super have his
own module table?  Anyone know the truth on this matter?

amos@taux01.UUCP (Amos Shapir) (06/06/89)

The mod table is anywhere the mod register points to; that means that
each user can have as many tables as s/he likes; only one of them is
active at any given time.

The table has to be located in the lower 64Kb of memory, but that
address is virtual; if a MMU is used, the address would be translated it
to its proper physical location.  The statement in the Grey Book (about
the table being located in the first 64Kb of physical memory, and mapped
to virtual address 0 in user space) is misleading - that's the way this
is currently done in most implementations of UNIX, but this scheme is
not dictated by hardware.

Finally, on a 32532 in Direct Exception mode, the mod table can be
completely ignored.


-- 
	Amos Shapir				amos@nsc.com
National Semiconductor (Israel) P.O.B. 3007, Herzlia 46104, Israel
Tel. +972 52 522261  TWX: 33691, fax: +972-52-558322
34 48 E / 32 10 N			(My other cpu is a NS32532)

chris@spock.ame.arizona.edu (Chris Ott) (06/07/89)

agnew@trwrc.UUCP (Robert A. Agnew) writes:
> The National programmer's manual for the 32k says that the module table
> must exist in the first 64k of physical memory. The Texas Instrument
> (second source) programmer's manual for the 32032 states that there can
> be 64k of module table per user.  These statements appear to be
> inconsistent.

     Well, I'm no expert on the 32k (by far), but these don't have to
be inconsistent at all. When the National book says the table must be
in the first 64k of memory, they probably mean the first 64k of _virtual_
memory. Since each user (process?) has his/her own _virtual_ address
space, each user can also have his/her own module table which must be
in the first 64k of that address space.

>               What happens in supervisor mode? Does the super have his
> own module table?  Anyone know the truth on this matter?

     Extrapolating from the above, the supervisor module table probably
has to be in the first 64k of the supervisor address space, whatever
that happens to be.

     (Someone please correct me if I'm wrong.)

Chris

herder@myab.se (Jan Herder) (06/07/89)

In article <507@trwrc.UUCP> agnew@trwrc.UUCP (Robert A. Agnew) writes:
>The National programmer's manual for the 32k says that the module table
>must exist in the first 64k of physical memory. The Texas Instrument
>(second source) programmer's manual for the 32032 states that there can
>be 64k of module table per user.  These statements appear to be
>inconsistent. What happens in supervisor mode? Does the super have his
>own module table?  Anyone know the truth on this matter?

    The problem is that pointer to the module table is a 16 bit register.
This means that the module table must be in the first 64K of memory. 
There must be a module table in first 64K of physical memory, since the
virtual memory is not enabled after reset. Once the virtual memory is enabled
it's possible to have it anywhere in the physical memory, even for the super-
visor state, which has it's own module table. 

    Note that the module table is a leftover from the days when Pascal
was the model. It's not used in UNIX V.3 on ns32000, except for the
interrupts. And that's because you must use it there. 

-- 
Jan Herder, MYAB Sweden                    |  Phone: +46 31 18 75 12
Internet: herder@myab.se                   |  Fax:   +46 31 18 28 42
UUCP: 	  uunet!enea!chalmers!myab!herder  |  Address: Dr. Forseliusg 21
ARPA:	  herder%myab.se@uunet.uu.net      |           413 26 Gothenburg