Site logo 14114

<REFERENCE>PRIME>DRB>ALL_ABOUT_BOOT


This information on the behavior of the boot process was drawn from various sources, including source for BOOT. It was collated by BORIS staff and Dennis Boone, 1987-2020.

BOOT [sense switch setting] [CPBoot_parms]

   Common Sense Switches:
        114    Ask for PDEV and PATHNAME
      14114    Use Head 0 Drive 0 Controller 0 disk, boot to PRIMOS IV (PRIMOS)
      10114    Use H0 D0 C0, boot to PRIMOS II (DOS)
       4114    Ask for PDEV then boot to PRIMOS IV
      11114    Use H0 D0 C0, ask for PATHNAME, boot to PRIMOS IV
     114114    Use H0 D0 C0, skip PRIMOS.COMI, ask for CONFIG, boot to PRIMOS IV

   CPBoot_parms:

          2    Tells VCP you're using a rev 19 MAGSAV tape.
       2000    Tells VCP to display debugging information while verifying
               the CPU and controllers.

   Valid boot devices sense switch settings are:

      114   Drive 0, Controller 0  (Address '26)
      314   Drive 1, Controller 0  (Address '26)
      514   Drive 2, Controller 0  (Address '26)
      714   Drive 3, Controller 0  (Address '26)
      134   Drive 0, Controller 1  (Address '27)
      334   Drive 1, Controller 1  (Address '27)
      534   Drive 2, Controller 1  (Address '27)     *
      734   Drive 3, Controller 1  (Address '27)     *
      154   Drive 0, Controller 2  (Address '22)
      354   Drive 1, Controller 2  (Address '22)
      554   Drive 2, Controller 2  (Address '22)     *
      754   Drive 3, Controller 2  (Address '22)     *
      174   Drive 0, Controller 3  (Address '23)
      374   Drive 1, Controller 3  (Address '23)
      574   Drive 2, Controller 3  (Address '23)     *
      774   Drive 3, Controller 3  (Address '23)     *
      005   Tape unit 0, Controller 0  (Address '14)
      205   Tape unit 1, Controller 0  (Address '14)
      405   Tape unit 2, Controller 0  (Address '14)
      605   Tape unit 3, Controller 0  (Address '14)
      025   Tape unit 4, Controller 1  (Address '13) *
      225   Tape unit 5, Controller 1  (Address '13) *
      425   Tape unit 6, Controller 1  (Address '13) *
      625   Tape unit 7, Controller 1  (Address '13) *

   *  On systems with  a  VCP3, only  disk  controllers  0  &  1  and  tape
      controller 0 are available with disks 2 & 3 or tape > 0, respectively.

   Sense switch bits, decoded individually:

      '100000  Ignores CONFIG file, Does NOT init. communication boards,
               Prompts for PAGDEV, NTUSR.
               Good for recovering from crashes, or changing CONFIG.
      '040000  Not defined. (Enable R0DBG)
      '020000  Not defined. (Break to R0DBG early in boot)
      '010000  Get PRIMOS or DOS from device booted from.  Prompts for
               Physical Device Number and will accept a disk pdev or
               MT<unit> (a tape drive number, 0 thru 7).
      '004000  Do AUTOBOOT using the pathname from tha last successful boot.
      '002000  Halts after  restoring the program to be booted, but before
               executing it.  Good for T&M programs.
      '001000  Prevents halts due to machine checks during boot.
               Good for debugging hardware problems like bad memory.
      '000400  Add 2 to disk unit number. (Units 2 & 3)
      '000200  Add 1 to disk unit number. (Units 1 & 3)
      '000100  Boot from some disk drive.
      '000040  Halts immediatly to allow patching supervisor baud rate when
               booting from magtape.  See 20.0 Software Release manual.
      '000020  Add 1 to controller number.
      '000010  Use disk controller (not tape).

Decode of BOOT switch settings (from BOOT source)

* Switch(s)   Meaning
* ---------   -------
* '100000     Ignore config file and query user for COMDEV, PAGDEV, and
*             NTUSR.  (0 = assume valid config file).  Used by Primos only.
*
* '060000     Allocated for use by the ring 0 debugger in Primos to specify
*             that the ring 0 debugger will be used and whether to come up
*             immediately in the debugger.  Used by Primos only.
*
* '010000     Assume the program to be booted is on the same device that this
*             boot was read from. (0 = query user for physical device number).
*             Used by this boot program only.
*
* '004000     Assume we are booting Primos.  Assume the path of the
*             coldstart image PRIMOS.SAVE is the same as used in the last
*             successful boot of Primos from the boot device.  If
*             MFD>BOOT_RUN_FILE_TREENAME does not exist or does not contain
*             a valid treename, assume PRIRUN>PRIMOS.SAVE.  If this does not
*             exist, query the user for the treename.
*             (0 = query user for treename to boot, which may or may not be
*              Primos).  Used by this boot program only.
*
* '002000     Halt immediately after loading the program to be booted, but
*             before starting program execution to allow the operator to
*             patch various locations in memory.  The user just hits the
*             start switch or enters "RUN" to start the program running.
*             This option is possibly useful for running T&M's or debugging
*             Primos.  Note that after patching, the switches MUST be set
*             back to their values at the start of the boot.  If using a VCP,
*             patch the switches register in the register file before entering
*             the RUN command. (0 = execute the booted program without
*             halting before hand.)  Used by this boot program only.
*
* '001000     Don't run CPBOOT and this boot in machine check mode.  This
*             switch is used by CPBOOT only, only on VCP 4's (Mink) and up or
*             updated VCP 3's (Weasel).  0 = the default on these machines
*             which is to run in machine check mode.  This switch has no
*             effect on older machines and they always run this boot run in
*             machine check mode.
*
* '000777     Boot device as follows: (select one only)
*
*                  '114  Disk drive 0, disk controller 0 (dev addr '26)
*                  '314  Disk drive 1, disk controller 0 (dev addr '26)
*                  '514  Disk drive 2, disk controller 0 (dev addr '26)
*                  '714  Disk drive 3, disk controller 0 (dev addr '26)
*                  '134  Disk drive 0, disk controller 1 (dev addr '27)
*                  '334  Disk drive 1, disk controller 1 (dev addr '27)
*                  '534  Disk drive 2, disk controller 1 (dev addr '27)
*                  '734  Disk drive 3, disk controller 1 (dev addr '27)
*                  '154  Disk drive 0, disk controller 2 (dev addr '22)
*                  '354  Disk drive 1, disk controller 2 (dev addr '22)
*                  '554  Disk drive 2, disk controller 2 (dev addr '22)
*                  '754  Disk drive 3, disk controller 2 (dev addr '22)
*                  '174  Disk drive 0, disk controller 3 (dev addr '23)
*                  '374  Disk drive 1, disk controller 3 (dev addr '23)
*                  '574  Disk drive 2, disk controller 3 (dev addr '23)
*                  '774  Disk drive 3, disk controller 3 (dev addr '23)
*                  '005  Tape drive 0, tape controller 0 (dev addr '14)
*                  '205  Tape drive 1, tape controller 0 (dev addr '14)
*                  '405  Tape drive 2, tape controller 0 (dev addr '14)
*                  '605  Tape drive 3, tape controller 0 (dev addr '14)
*                  '025  Tape drive 4, tape controller 1 (dev addr '13)
*                  '225  Tape drive 5, tape controller 1 (dev addr '13)
*                  '425  Tape drive 6, tape controller 1 (dev addr '13)
*                  '625  Tape drive 7, tape controller 1 (dev addr '13)
*
*             Note: booting from disk controller 2 or 3 or from other than
*             tape drive 0, controller 0 is available only on new machines.
*             Older machines will also allow booting from other devices
*             that have been de-supported as boot devices.  (See the Notes
*             section further on).  These bits are used are used by CPBOOT,
*             this boot, and possibly by booted programs.
*
* '000040     Halt immediately to allow patching the console baud rate.
*             This boot defaults to 300 baud, but other console baud rates
*             may be used by patching locations '1004 - '1006 as follows:
*
*                 Speed          '1004          '1005          '1006
*                 -----          -----          -----          -----
*                 110 baud         110             27          74006
*                 300 baud        1010             76          34006
*                 1200 baud       2010            373          34006
*                 9600 baud       3410           3735          34006
*
*             The user just hits the start switch or enters "RUN" to
*             continue with the boot.  Note that this option may be used
*             ONLY when booting from tape.  Also note that after patching,
*             like the '002000 option above, the switches MUST be set back
*             to their values at the start of the boot.  If using a VCP,
*             patch the switches register in the register file before entering
*             the RUN command.  (0 = execute the boot without halting).
*             This bit is used only by this boot program.

*      SWITCH SETTINGS: (from comments in BOOT source)
*      1-7   - FILE NUMBER, PROMPTS FOR TREENAME IF 0
*      8-9   - RELOCATION IN 16K'S IN 64K MACHINE
*      10    - 1 => SUPPRESS AUTOSTART OF LOADED PROGRAM
*      11    - 1 => WAIT FOR SOC/OPTION A CONTROL WORDS TO BE PATCHED
*      12    - 0 => 9-TRACK, 1 => 7-TRACK
*      13    - 1 => BOOTING A DOS IMAGE, 0 => BOOTING ANYTHING ELSE
*      14-16 - 101 (MAGTAPE BOOT)

HALT during BOOT addresses and LIGHTS

  Halt at:    Lights   Description
        1     XXXXXX   UNACCEPTABLE STATUS FROM TAPE DRIVE
                          See tape error table for lights
      503     000002   NO DATA RECORD AFTER TREENAME (also LIGHTS = '72642)
      635     000001   LOAD COMPLETE, NO AUTOSTART (also halt at '175175)
      440     000005   END LOGICAL TAPE ENCOUNTERED
      641     000003   PROGRAM WON'T FIT IN MEMORY WITH BOOT
      260     000021   WAITING FOR CONTROL WORDS TO BE PATCHED

  Halt at:    Lights   Description
      635     000001   LOAD COMPLETE, NO AUTOSTART (also halt at '175175)
      503     000002   NO DATA RECORD AFTER TREENAME (also LIGHTS = '72642)
      641     000003   PROGRAM WON'T FIT IN MEMORY WITH BOOT
      440     000005   END LOGICAL TAPE ENCOUNTERED
      260     000021   WAITING FOR CONTROL WORDS TO BE PATCHED
        1     XXXXXX   UNACCEPTABLE STATUS FROM TAPE DRIVE
                          See tape error table for lights

Disk Boot Errors

   Octal Number
   In Lights              Error
   100                    Parity
   101                    Machine Check
   102                    PDEV number is not octal
   103                    Bad device type
   104                    Bad status (SMD, diskette)
   105                    Bad record ID, bad CRA
   106                    Incompatible boot records

   Parity:
      Check DSWSTAT

   Bad device type:
      If device type of 7 is entered.

   Bad status:
      Status word from SMD or diskette is stored in location '40.

   Bad record ID:
      Requested CRA is checked against the Record ID field of the
      disk record header.  Requested address is at location
      '723-'724, actual address is at '760-'761.

   Incompatible boot records:
      First and second records of BOOT must come from same version.

Rev. 20 COMDEV replace:

      CP> SYSCLR
      CP> BOOT 5
      Run File Treename= PRIRUN>PRIMOS.SAVE
      OK, MTRESUME MT0 MAKE -DSK -DT -PART -BAUD [-FMT -NEWDSK -NO_INIT]
          <make dialog>
      OK, ADDISK 1060
      OK, ATTACH MFD XXXXXX 0
      OK, MTRESUME MT0 CMDNC0>{MAGRST.SAVE X.BEEPRST.SAVE}
          <magrst dialog>
      OK,

Rev. 19 COMDEV replace:

      CP> SYSCLR
      CP> BOOT 15
      TREENAME= DOS>*DOS64
      OK: <esc><esc>
      CP> STOP
      CP> SYSCLR
      CP> BOOT 505
      TREENAME= CMDNC0>MAKE
         HALTED AT 072427: 000001
      CP> {RUN BOOT} 170000
      OK: S 1000 -DSK -DT -PART -BAUD [-FMT -NEWDSK -NO_INIT]
         <make dialog>
      OK: <esc><esc>
      CP> STOP
      CP> SYSCLR
      CP> BOOT 505
      TREENAME= CMDNC0>{MAGRST BEEPRST}
      HALTED AT 154012: 003776
      CP> {RUN BOOT} 177776
      OK: STARTUP 1060
      OK: ATTACH MFD XXXXXX 0
      OK: S 1000
         <magrst dialog>
      OK:

Typical magtape boot sequence:

   CP> {{BOOT 15}}
   TREENAME={{*DOS64}}

   PRIMOS II REV 19.1 11/22/82 (AT 170000)

   OK: {{<ESC><ESC>}
   CP> {{STOP}

   HALTED AT 154012: 003776

   CP> {{BOOT 505}}
   TREENAME={{MAKE}}

   HALTED AT 072427: 000001

   CP> {{RUN 170000}}

   OK: {{S 1000 -DISK <pdev> -PART <packname>}} ...

Other Notes

   * When booted from disk, this boot is read in with the disk header at '760,
   * the RVEC at '1000.  When booted from tape, the boot is read in starting
   * at location '200.  The tape copy of this boot is therefore slightly re-
   * arranged so the RVEC and starting code will be at '1000.
   *
   * In both cases, CPBOOT starts execution of the program at '1000 in 16S
   * mode.  Location '1000, which is the SA (starting address) of the RVEC,
   * contains at JMP instruction to the start of the boot which immediately
   * enters 64V mode and proceeds apace.  Newer versions of CPBOOT start
   * execution at the location contained in '1002, which is P (initial PC)
   * of the RVEC, which also points to the start of the boot.
   *
   * Note:  This boot is advertised as loading 256K images.  In reality, the
   * boot has to go somewhere, so while it will load starting at location 0/0
   * if desired, it will not allow you to load in the last 5.5K of memory.

   * 7.  Load the run file from disk to memory location:
   *     The starting, ending locations and the register values can be
   *     found in the R-VEC.  The R-VEC is supplied by LOAD for the T&Ms,
   *     and by MAPGEN for the coldstart image.  These are 16-bit values,
   *     so the starting location and the PC register must be less than 64K.
   *     The R-VEC ending address is ignored by BOOT.SAVE and the run file
   *     is loaded until the end of file is reached.
   *
   *     If the R-VEC is incorrect then the message:
   *     "INVALID R-VEC: SA: xxxxxx EA: xxxxxx PC: xxxxxx" will by printed
   *     and the system will then HALT.  The R-VEC is considered invalid
   *     if the SA is greater than the EA or the initial PC is not between
   *     the SA and EA.
   *
   *     If the program to be loaded will not overlay the boot, the program
   *     is read in "normally".  If the program will overlay the boot, the
   *     portion that will overlay the boot is read into a buffer at the end
   *     of physical segment 3 (3/176000).  After the load is completed or
   *     when loading has run into this buffer, a small program to copy the
   *     buffer to the proper place and start execution is also put up at the
   *     end of seg 3 and is executed to relocate the booted program back and
   *     start it.  Note that this means that the last 5.5K of the possible
   *     256K loaded by this booted actually cannot be written into.  Execution
   *     of the loaded program is started via a LPSW using parameters from the
   *     booted program's RVEC.  Note that at rev 20, DOS has been fixed so that
   *     it does not need to be special cased.

   * 1. You can't reference a sector 0 location ('0 - '777) in a one word
   *    instruction in V-mode.  This is because a single word reference to '0
   *    thru '377 implies a stack base meaning this is SB%+'0 thru SB%+'377.
   *    Similarly, a single word reference to '400 - '777 implies a link base
   *    meaning this is LB%+'400 thru LB%+'777.  However since we zero out
   *    SB% and LB% to start, we make all our sector zero references relative
   *    to them and then everything works out peachy.
   *
   * 2. Historically, the switch settings understood by CPBOOT on boot are as
   *    follows:
   *
   *        The switches comprise 16 bits labeled:  -------UUSLCBXYZ,
   *            where: UU = unit number - 1
   *                    S = storage module,
   *                    L = lower platter (or head 2) of MHD,
   *                    C = alternate controller,
   *                    B = B prime (B') controller (4002 OR 4003),
   *                  XYZ = 011 FHD, = 100 MHD, = 110 floppy disk.
   *
   *        The only meaningful combinations and the derived physical disk
   *        numbers are:
   *             ------------0011 = B FHD  -- OBSOLETE
   *             -----------C1011 = B' FHD -- OBSOLETE
   *             ----------L-0100 = B MHD  -- OBSOLETE
   *             -------UU0LC1100 = B' MHD -- OBSOLETE
   *             -------UU1CC1100 = STORAGE MODULE ********** VALID
   *             -------------110 = FLOPPY -- OBSOLETE
   *
   *        Those options labeled OBSOLETE were de-supported as boot
   *        devices at rev 20.0.

   * 3. Physical device numbers (PDEV's) are encoded as follows:
   *
   *        Given a 16-bit PDEV encoded as: D DDD NNN NCC TTT UUN
   *
   *        The PDEV is interpreted as:
   *            D DDD = (Bits 1-4)   Head displacement of partition / 2
   *                                 (for cartridge, must be zero)
   *            NNN N = (Bits 5-8)   Number of heads in partition / 2
   *                                (for cartridge, must be zero)
   *            CC    = (Bit 9-10)      Disk controller #.
   *            TTT   = (Bits 11-13) Device type - see below.
   *            UU    = (Bits 14-15) Physical drive number
   *            N     = (Bit 16)     = 1 if last partition has odd # heads
   *
   *        The device type above (TTT) was decoded as:
   *            0 = Option B MHD             -- OBSOLETE
   *            1 = Option B FHD             -- OBSOLETE
   *            2 = Floppy disk              -- OBSOLETE
   *            3 = Option B' MHD, 8 sector  -- OBSOLETE
   *            4 = Option B' FHD            -- OBSOLETE
   *            5 = Option B' MHD, 32 sector -- OBSOLETE
   *            6 = Storage module ************************* VALID
   *           >6 = ERROR
   *

   *
   * 4. Historically, before this boot was rewritten at rev 20.0, the
   *    meaning of the control panel switches to DKBOOT was as follows:
   *
   *                         RRRAP--UUSLCBXYZ,
   *
   *    DKBOOT was pretty much limited to booting up DOS and Primos.
   *
   *    RRR = Relocation amount and therefore which version of DOS
   *          to use: *DOS16, *DOS24, *DOS32, or *DOS64.
   *
   *    A   = Assume device and partition DKBOOT was booted from will
   *          contain the version of DOS to be booted.  0 = query for
   *          physical device.  The meaning of this bit has been
   *          retained.
   *
   *    P   = Automatically boot up Primos.  The meaning of this bit
   *          has been retained after a fashion.  Under the old DKBOOT,
   *          if this bit were zero, we would only boot DOS and not go
   *          on to boot Primos.  Now we ask for the treename of the
   *          file to boot.
   *
   *    UUSLCBXTZ = See the definition under item 2 above.
   *

   *
   * 5. Historically, before this boot was rewritten at rev 20.0, the
   *    meaning of the control panel switches to MTBOOT was as follows:
   *
   *      Bits     Meaning
   *      ----     -------
   *      1-7      File number, prompts for treename if 0.
   *      8-9      Relocation in 16K's in 64K machine.
   *      10       1 => Suppress autostart of loaded program.
   *      11       1 => Halt for SOC/Option A control words to be patched.
   *      12       0 => 9-track tape, 1 => 7-track tape.
   *      13       1 => Booting a DOS image, 0 => booting anything else.
   *      14-16    101 (Magtape boot).

   * /BTDATA/ - The following comprises a common area to be referenced by
   *      anything that gets booted, assuming that the program booted does
   *      not overlay this area.  In particular, Primos (SEG14.PMA) and DOS
   *      make use of this information.  Do not get this out of order.
   *
   BTDATA EQU   *

   DVNO   BSS   1               LOGICAL DEVICE NUMBER (PDEV) *** MUST BE @ '100 ***
   MTDEV  BSS   1               TAPE DRIVE #                 *** MUST BE @ '101 ***
   SWTCHS BSS   1               FRONT PANEL SWITCHES ON BOOT *** MUST BE @ '102 ***
   TRNMPT BSS   2               PTR TO BOOT FILE TREENAME    *** MUST BE @ '103 ***
   ASRSPD BSS   1               ASR SOC CONTROL WORD         *** MUST BE @ '105 ***
   SERPTR BSS   2               PTR TO SERIALIZATION DATA    *** MUST BE @ '105 ***

   *   DISK record 0 (DKBOOT) is loaded by CPBOOT with the 16 word disk header
   *   @ '760 and the actual record starting at '1000.  Since MFD>BOOT is a .SAVE
   *   file, the first 9 words ('1000 - '1010) are actually an RVEC.
   *
   *   TAPE record 0 (MTBOOT) is loaded by CPBOOT @ '200.  The boot is
   *   re-arranged so that the RVEC and following code that is supposed to be
   *   at '1000 is at '1000.  The tape boot specific code will immediately
   *   relocate the code back where it belongs.

   *   Older versions of CPBOOT JST to location '777 (SA in R-VEC) in
   *   16S mode which contains an S-mode jump to BOOT.  (Note that if we
   *   execute this JMP in other than 16S mode, it is a JMP to BOOT+1,
   *   hence we have two E64V instructions in a row @ BOOT).
   *
   *   Newer versions of CPBOOT jump to the location pointed to by '1002
   *   (the P-reg in the R-VEC).
   *
   *   Note:  A SYSCLR followed by a RUN will will always set us back to
   *          running at '1000 in S-mode.

   *   If RAT header length is greater than eight, set NPERTK (# sectors per
   *   track) from RAT, else set to default of 9.

   *   Some of the following errors just halt at first as the code to print
   *   messages isn't in the first record of the disk boot, but when it is
   *   read in, these pointers will change to routines that will print a user
   *   friendly message.
   *
   *   If the system does halt, the number following the halt is displayed
   *   in the lights on a front panel or printed following the halt address
   *   in the following halts.  Note that they are distiguished from any
   *   other halt (which would be a bug) by the number in the lights being
   *   in the 100's.
   *
   ER106  HLT                   PAGES OF BOOT NOT CONSISTENT, ONE FROM ONE REV.
          OCT   106             ONE FROM ANOTHER (CHECK UNIT SWITCHES 8,9)
   *
   ER104  DAC   *+1             (THIS LATER GETS CHANGED TO A PTR. TO ERR104)
          STA   SB%+'40         SAVE STATUS CODE IN '40
          HLT
          OCT   104             DISK STATUS ERROR, CODE IN '40
   *
   ER105  DAC   *+1             (THIS LATER GETS CHANGED TO A PTR. TO ERR105)
          HLT
          OCT   105             BAD ID, REQUESTED AND FOUND DON'T MATCH

   *      The first record is read into a BUFF in seg 0.  We then
   *      examine the RVEC to determine if the run file would overlay
   *      the boot at all.  If not, the contents of BUFF are moved to
   *      place and we continue to read to the proper place in memory.
   *
   *      If the run file will overlay the boot, we move the contents
   *      of BUFF to another buffer at 3/167000 and continue reading
   *      up there.  Once the effective load point has passed the end
   *      of the boot, we stop reading into the buffer and read directly
   *      to the correct address in memory.  We continue reading until EOF
   *      is reached or we load within 1024 words of our buffer
   *      at 3/167000.
   *
   *      At this point, the buffer is moved down to 3/166000,
   *      and the treename of the file read is copied to
   *      3/177600 - 3/177777 as a char fixed (128).
   *      We then jump to a program we've copied to 3/177000
   *      which will move the contents of the buffer at 3/166000
   *      to place on top of this boot program and then starts
   *      the program read using values from the R-vec.

   CPBOOT loads MTBOOT at '200.

Addendum to the above info on bits 14-16 of the sense switches,
from MAN1671 (July 1975).  Additional info, including early
source code for blinkenlights control panel automatic program
load bootstraps, appears in LDS2886.

These sense switch patterns originate in automatic program loader
options which could be installed into the control panels on early
CPUs (100/200/300).

0 0 0       Start at '1000
0 0 1       Boot from ASR (i.e. low speed tape reader on ASR33)
0 1 0       Boot from high speed tape reader