BVMBug Debug Monitor/Bootstrap ROMs
-----------------------------------

The BVMBug firmware was created by BVM Limited for the express purpose of
supporting Linux on BVM processor boards. 

The current revision of BVMBug is revision G and should be used in
preference to any other.

Supplied in the same directory as this document is a file named
"bvmbug-G.bin" this contains the binary image of the current revision G
firmware. This image should be programmed into a pair of 27C512-120ns or
faster EPROMs or optionally if you have a revision F or later
BVME4000/6000 a pair of AM29F040-120ns or faster flash EPROM devices.
Refer to the "BVME4000/6000 User's Manual" for the correct link setting
for the installed EPROM devices.

If you don't have the facility to program EPROMs please contact BVM
Limited <sales@bvmltd.co.uk> who will be able to supply pre-programmed
EPROMs free of charge.

This document briefly describes the important features of the Revision G
firmware in relation to installing and running Debian/GNU Linux.


BVME4000/6000 Front Panel Switches
----------------------------------

Switch  Left position  Right position  Function
------  -------------  --------------  --------------------------------
 SW1    disable        enable          VMEbus system controller functions
 SW2    0x00000000     0xE900000000    BVMBug workspace address (64Kb)
 SW3    disable        enable          Map VMEbus into low 256Mb
 SW4    enable         disable         Autoboot

New to BVMBug revision G is the ability to choose which area of RAM to
use for its local workspace. Previous revisions always used the onboard
SRAM at address E9000000. With revision G, the front panel DIP switch 2
is used to select between address E9000000 (SRAM) when switched to the
right and address 00000000 (DRAM) when switched to the left.

Initially while configuring and installing the system you should disable
auto booting (SW4). Once installed and the boot method has been
configured auto booting can be enabled again.

Console Port
------------

The lower front panel serial port connection is used as the main console
port. The console port operates at a default baud rate of 9600, this can
be changed using the 'rc' command to a higher rate if desired. The Linux
kernel console driver will not change the baud rate so any of the
available rates can be configured.

If the console baud rate is inadvertently configured to a baud rate that
is not supported by your terminal. Press the reset button 5 or more
times in quick succession, each reset is counted by the firmware and
when the count reaches 5 the console baud rate is temporarily switched
back to 9600 to enable the baud rate to be reconfigured. Note: The
timing of the button presses is critical, if you press the reset button
to quickly the counting routine won't be reached, if you press too
slowly the counter will be cleared and the count won't reach 5.


BVMBug Help Command
-------------------

For a complete listing of available commands and syntax use the '?'
command at the BVMBug prompt.

BVMBug: ? <enter>
Memory:
  c[b|w|l] <addr>          change byte, word or long word values
  c[b|w|l]n <addr>         change byte, word or long word values without read
  d <addr> [<lines>]       dump memory, default lines is 16
  di <addr> [<lines>]      disassemble memory, default lines is 16
  mf[b] <range> "<char>[<char> ...]
                           fill memory with string
  mf[b|w|l] <range> <val> [<val> ...]
                           fill memory with bytes, words or long words
  mm <srce range> <dest>   move memory block
  ms[b|w|l] <range> "<char>[<char> ...]
                           search memory for a string
  ms[b|w|l] <range> <val> [<val> ...]
                           search memory for bytes, words or long words

  where <range> is <start address> <end address>
                or <start address> :<number of bytes>

Execution:
  g [<addr>]               start execution at PC or <addr>
  gs [<addr>]              start execution at PC and stop at <addr>
                            or next instruction
  reset                    restart system
  t [<count>]              trace 1 or <count> instructions

Breakpoints:
  b                        list breakpoints
  b <addr> [:when <expr>] [:count <expr>]
                           set conditional breakpoint at address
  bd [@<addr>|<number>]    disable breakpoints
  be [@<addr>|<number>]    enable breakpoints
  k [@<addr>|<number>]     kill breakpoints

Disk I/O:
  br <scsi_id>             edit boot record of scsi hard or floppy disk
  rd <scsi_id> <startblk> <numblks> <address>
                           read sectors from scsi hard or floppy disk to
                            memory at <address>
  wr <scsi_id> <startblk> <numblks> <address>
                           write sectors to scsi hard or floppy disk from
                            memory at <address>
  inq [<scsi_id>]          scan scsi bus for devices or perform scsi inquiry
                            to specified device
  fp [<format code>]       set or display current floppy disk parameters
                           Code | Capacity Heads SectSize Cyls SectTrk Rate
                           -----+------------------------------------------
                             0  |   720K     2     512     80     9    250
                             1  |   1.4M     2     512     80    18    500

Booting:
  bo[g] <scsi_id>          read [and go] boot image from scsi CD-ROM, hard
                           or floppy disk
  bp[g] [<bootfile name>]  load [and go] bootfile using BOOTP/TFTP using
                           IP addresses given during system configuration
                           or BOOTP if not configured

Symbol:
  dcs <name> <expression>  define code symbol
  dds <name> <expression>  define data symbol
  r [<name>]               remove all or specified symbol
  rlc <offset>             apply relocation offset to code symbols
  rld <offset>             apply relocation offset to data symbols
  s [<pattern>]            display all or symbols matching wildcard pattern

Miscellaneous:
  ?                        display this help screen
  .                        display current register values
  .<reg> <val>             set register to value
  dt [dd mm yy hh mm ss]   display or set RTC
  echo ["]<text>["]        output <text> on debugger screen, the optional
                            quotes are not printed, <text> may also contain
                            the following escape sequences:
                             \E  escape character 0x1b
                             \n  newline
                             \t  tab character
                             \b  backspace
                             \\  backslash character
  pause [on|off]           display or change page pause mode
  rc                       reconfigure non-volatile system parameters
  v <expression>           evaluate expression

Expressions:
  Any numeric value may be specified with an expression, all values
  default to base 16 (hexadecimal)

  An expression contain any of the following operators and operands:

  &&  logical AND            ||  logical OR
  &   bitwise AND            |   bitwise OR          ^   bitwise XOR
  <   less than              >   greater than        ==  equal to
  <=  less than or equal     >=  greater or equal    !=  not equal to
  <<  shift left             >>  shift right
  +   addition               -   subtraction
  *   multiplication         /   division            %   modulus
  ~   1s complement          -   unary minus         ()  parenthesis
  []b indirect byte          []w indirect word       []l indirect long word
  '<char> the ascii value of <char>

  The following constant prefixes override the default number base:
     # decimal    % binary    0x hexadecimal    $ hexadecimal

  CPU register values may be used by prefixing the register name with a period
  e.g. .a0   the value of address register 0
       .vbr  the value if the vector base register

  Symbol names as defined with the 'dcs' and 'dds' commands.

BVMBug:



Real Time Clock
---------------

The BVME4000/6000 real time clock must be set using the 'dt' command,
before the Debian/GNU Linux installation is begun.

 e.g. To set the RTC to the 3:33 pm on the 1st of August 1998 enter:
 
     BVMBug: dt 1 8 98 15 33 0 <enter>


System Configuration
--------------------

The 'rc' command is used to set the non-volatile system configuration
parameters the following things need to be configured.

 o Console baud rate.
 o Auto boot device (SCSI or NET).
 o IP addresses.
 o Net bootfile name (rev F BVME4000/6000)
 o Boot argument string (rev F BVME4000/6000)

After entering the 'rc' command you will be prompted in turn as to
whether you would like to change a particular aspect of the
configuration. Enter:
 y  to select.
 n  to skip.
 b  to go back one step.
 f  to finish and save configuration.
 q  to quit without saving and return to the BVMBug: prompt.


SCSI Hard/Floppy/CD-ROM Booting
-------------------------------

The 'bo' and 'bog' commands can be used to boot from any common command
set SCSI hard disk, SCSI CD-ROM drive or a TEAC FC-1 SCSI floppy drive.
In the case of hard and floppy drives the first disk sector contains
information to tell BVMBug where the bootfile is located on the disk and
how to execute it. For CD-ROMs the disk must conform to the El Torito
booting standard, whereby the bootfile is treated as a floppy disk
image. Under Linux a disk can be made bootable using the 'vmelilo'
utility, refer to the vmelilo(8) and vmelilo.conf(5) man pages.

To install the Debian/GNU Linux system from floppy disk the
bvme6000/resc1440.bin disk image must be written to a floppy disk using
either the Unix 'dd' command or the DOS 'rawrite.exe' utility. The
installation procedure can then begin by booting from the floppy using:

  BVMBug: bog <floppy drive SCSI id>

Alternatively the first Debian m68k binary CD-ROM can be booted by
using:

  BVMBug: bog <CD-ROM drive SCSI id>

During the installation procedure 'vmelilo' is executed to make your
hard disk bootable by BVMBug, after which you can reconfigure using the
'rc' command and the front panel SW4 to auto boot Linux directly.

A useful tool for determining the SCSI id of an attached SCSI device is
the 'inq' command. Enter 'inq <enter>' at the BVMBug: prompt and you
will be presented with a listing of all attached SCSI devices.

Network Booting
---------------

Loading the bootfile from a TFTP server can be accomplished using the
'bp' and 'bpg' commands. Use the 'rc' command to reconfigure the network
booting parameters. Here the client and server IP addresses can be
specified, or if set to zero the BOOTP protocol will be used to
determine the correct IP addresses and bootfile name. A Debian/GNU Linux
system can be installed to a local hard disk using this method if no
CD-ROM or floppy drive is available. Alternatively a diskless system
could be setup with an NFS root filesystem. Refer to the accompanying
'tftplilo.txt' file for further information.


---
Nick Holgate <holgate@debian.org>