[net.unix-wizards] MTPR, VAX, and System III inquiry

Douglas@sri-unix (06/27/82)

Date: 11 Jun 1982 at 1313-CDT
Does anyone know why a VAX-11/780 booting UNIX System III would have
the following strange behavior?
$$ unix		! boot using standalone shell
	HALTED AT 1
The in-core image of UNIX looks fine, and debugging shows that one of
the first few instructions executed,
	MTPR	address,SBB
fails to load SBB with the address (0x200)!  Patching in a halt here
and manually entering the desired value into SBB lets UNIX continue
to boot successfully.

Have we uncovered a microcode bug?  I believe we are using VMS 3.0
console floppies (god knows why).

P.S. VMS runs fine, and $$ lets us run all the standalone utilities
with no problem.
-------

Armando@sri-unix (07/30/82)

Date: 28 Jun 1982 2002-EDT
I think the problems you are having with your VAX-11/780 and System III
are with System III (not the best UNIX for VAX!).  The problem
is that a new ECO came for the 780 came out which enforced the rule
that you could not address the upper quarter of the 780's physical
address space (S1 space).  This new ECO (as well as newer VAXen at
Rev 7 with WCS124 or better), the system will halt at location 1 or
halt as a result of an illegal interupt/exception vector to (halted at)
location 18 (which is an illegal operand vector).  System III attempts
to load the SCBB (System Control Block Base) with an address in the S1
region (bit 31 equal to 1).  With earlier versions of the microcode, this
did not matter; it was simply ignored.  With the version 124 of the WCS
patches, the firmware will hiccup when this bit is on.  I think this
is what you are seeing.

The way to get around this is to fix it "on the fly".  Boot the system
and let it crash.  You will find the memory looking like this:

      AF8/ 02008FDA   <-- Start of failing instruction
      AFA/ DA118000
               ^
               +--incorrect bit 

By depositing the DA110000 (incorrect bit, corrected) one can restart the
machine at AF8 and the system will come up.  (Aren't VAXen and UNIX wonderful?)

To fix this problem for good, edit the file start.s (someplace deep in the
System III filesystem).  Where you find
	mtpr  $Scbbase, $SCBB   # set scbb
 change the first operand to be something like
        mtpr  $Scbbase-0x80000000, $SCBB  # set scbb

Berkeley VM/UNIX does not have this problem.  They did it correctly.
I would like to know who said that the "hottest thing is a VAX 750
running System III UNIX" was!

	Armando Stettner
	DEC UNIX Engineering Group
   --------