Alto Ethernet Boot Package




The EtherBoot package (file EtherBoot.br) consists of an  Alto Ethernet
boot loader and a small amount of additional code enabling a program to
terminate  execution of  itself and  boot-load a  new program  from the
Ethernet.

EtherBoot(bfn, returnOnFail [false], host [0])
     Copies a small (256 word) Ethernet boot loader into low memory and
     transfers  control  to it  with  'bfn' (boot  file  number)  as an
     argument.  The loader  begins broadcasting "Mayday"  messages with
     bfn as  data, on  the local  Ethernet.  A  server that  hears this
     message and has a copy of the boot file matching bfn  will connect
     to the Alto and send the file by means of the EFTP protocol.

     If returnOnFail is false or omitted, failure to  establish contact
     with a boot server within about 45 seconds will cause EtherBoot to
     stop trying and to jump  into an infinite loop.  A manual  boot is
     required to recover from this.  However, if returnOnFail  is true,
     EtherBoot will return  in this case.  At  the time of  the return,
     pages 0 through 2 will have been clobbered and interrupts  will be
     disabled, so  the caller  must save and  restore this  state.  The
     following slice of code accomplishes this:

          let saveMem = vec #1400
          let MyMoveBlock = MoveBlock
          MyMoveBlock(saveMem, 0, #1400)

          EtherBoot(bfn, true)

          MyMoveBlock(0, saveMem, #427)
          MyMoveBlock(#431, saveMem+#431, #570-#431)
          MyMoveBlock(#600, saveMem+#600, #1400-#600)
          EnableInterrupts()

     This code  is careful not  to overwrite the  page 1 cells  used to
     maintain the real  time clock (430  and 570-577).  The  reason for
     making a local  copy of the MoveBlock  static is that  statics are
     usually allocated in page 2, which is clobbered by EtherBoot.

     If host is supplied and nonzero, EtherBoot will send its boot file
     request to  the specified host  (which must be  in the range  1 to
     #377) rather than broadcasting it.

The  boot loader  contained in  this package  is identical  to  the one
invoked when the  Alto's boot button is  pressed with the   key and
zero or  more other  keys down.  However,  note that  calling EtherBoot
differs  from actually  booting  the Alto  in  one way:  tasks  are not
reinitialized to run in the Rom, since no hardware reset is performed.

Mayday  servers keep  copies of  a number  of useful  programs  in boot
format  (see BuildBoot.tty  for how  to create  a bootable  file).  For
example, the Executive boots DMT  from the Ethernet when the  Alto disk


                             ------------
                   Copyright Xerox Corporation 1979


Ether Boot                  January 2, 1978                           2




is  turned off.   The association  between boot  file numbers  and boot
files may be determined by  means of the NetExec's 'Keys'  command (see
the NetExec documentation).