Home | History | Annotate | Line # | Download | only in docs
VMEbus-RAM revision 1.1.2.2
      1  1.1.2.2  jdolecek 	$NetBSD: VMEbus-RAM,v 1.1.2.2 2002/02/11 20:08:41 jdolecek Exp $
      2  1.1.2.2  jdolecek 
      3  1.1.2.2  jdolecek NetBSD/mvme68k: VMEbus RAM card configuration
      4  1.1.2.2  jdolecek ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      5  1.1.2.2  jdolecek 
      6  1.1.2.2  jdolecek NetBSD-mvme68k can be configured to support additional RAM boards
      7  1.1.2.2  jdolecek accessed over the VMEbus.
      8  1.1.2.2  jdolecek 
      9  1.1.2.2  jdolecek This file describes where to configure your VMEbus RAM and how to
     10  1.1.2.2  jdolecek point the kernel in the direction of it.
     11  1.1.2.2  jdolecek 
     12  1.1.2.2  jdolecek The MVME147 board has a fairly primitive VMEbus controller chip. The
     13  1.1.2.2  jdolecek mapping of cpu address to VMEbus address is hardwired and so dictates
     14  1.1.2.2  jdolecek what can be seen where by the 68030. From the cpu's perspective, A24
     15  1.1.2.2  jdolecek space spans 0x00000000 to 0x00ffffff. However, onboard RAM also spans
     16  1.1.2.2  jdolecek this space. With 8Mb of onboard RAM, only the top 8Mb of VMEbus A24
     17  1.1.2.2  jdolecek space can be seen. With 16Mb onboard, there is no easy way to get at
     18  1.1.2.2  jdolecek A24 space at all!
     19  1.1.2.2  jdolecek 
     20  1.1.2.2  jdolecek The other MVME boards have a more sophisticated VMEbus controller
     21  1.1.2.2  jdolecek which can remap segments of VMEbus address space anywhere in the CPU's
     22  1.1.2.2  jdolecek address space. This document will assume the remap is `transparent',
     23  1.1.2.2  jdolecek ie. no translation is taking place. The same restriction as MVME147
     24  1.1.2.2  jdolecek applies to these boards in that, without translation, a region of
     25  1.1.2.2  jdolecek VMEbus address space is masked by onboard RAM. The size of this region
     26  1.1.2.2  jdolecek depends entirely on the size of onboard RAM.
     27  1.1.2.2  jdolecek 
     28  1.1.2.2  jdolecek The best place for VMEbus RAM cards is somewhere in A32D32 VMEbus address
     29  1.1.2.2  jdolecek space. Obviously, if your VMEbus RAM card doesn't respond to that space
     30  1.1.2.2  jdolecek then you'll have to locate it elsewhere. Typically, you may find it
     31  1.1.2.2  jdolecek responds to A24D16 only, in which case the CPU-relative address you need
     32  1.1.2.2  jdolecek to specify below will be in the 16MB region starting at 0xZZZZZZZZ.
     33  1.1.2.2  jdolecek 
     34  1.1.2.2  jdolecek For A32D32, choose an address which is resonably close to the end of the
     35  1.1.2.2  jdolecek MVME board's RAM. That is, if you have 32MB of onboard RAM, set the
     36  1.1.2.2  jdolecek VMEbus RAM board to appear at A32:02000000.
     37  1.1.2.2  jdolecek 
     38  1.1.2.2  jdolecek This starting address needs to be written to the MVME board's NVRAM at
     39  1.1.2.2  jdolecek address 0xfffe0764 for MVME147, and 0xff, as follows:
     40  1.1.2.2  jdolecek 
     41  1.1.2.2  jdolecek 	147Bug> mm fffe0764 ;L
     42  1.1.2.2  jdolecek 	FFFE0764 00000000? 01000000   <cr>	<--- you type 01000000
     43  1.1.2.2  jdolecek 	FFFE0768 00000000? .          <cr>
     44  1.1.2.2  jdolecek 	147Bug>
     45  1.1.2.2  jdolecek 
     46  1.1.2.2  jdolecek Next, you need to configure the end address of VMEbus RAM. Assuming
     47  1.1.2.2  jdolecek your RAM card is 8Mb in size, this would be 0x017fffff. You need to
     48  1.1.2.2  jdolecek write this value to NVRAM address 0xfffe0768, as follows:
     49  1.1.2.2  jdolecek 
     50  1.1.2.2  jdolecek 	147Bug> mm fffe0768 ;L
     51  1.1.2.2  jdolecek 	FFFE0768 00000000? 017fffff   <cr>	<--- you type 017fffff
     52  1.1.2.2  jdolecek 	FFFE076c 00000000? .          <cr>
     53  1.1.2.2  jdolecek 	147Bug>
     54  1.1.2.2  jdolecek 
     55  1.1.2.2  jdolecek You could obviously combine the above two steps.
     56  1.1.2.2  jdolecek 
     57  1.1.2.2  jdolecek If you have more than one VMEbus RAM card, you must configure them so
     58  1.1.2.2  jdolecek that they appear physically contiguous in A32 address space. So, to add
     59  1.1.2.2  jdolecek another 8Mb card in addition to the card above, it should be jumpered
     60  1.1.2.2  jdolecek to start at 0x01800000. In this case, you would change NVRAM location
     61  1.1.2.2  jdolecek 0xfffe0768 to be 0x01ffffff.
     62  1.1.2.2  jdolecek 
     63  1.1.2.2  jdolecek If NVRAM location 0xfffe0764 is zero, the kernel assumes you only have
     64  1.1.2.2  jdolecek onboard RAM and will not attempt to use any VMEbus RAM.
     65  1.1.2.2  jdolecek 
     66  1.1.2.2  jdolecek 
     67  1.1.2.2  jdolecek Some extra notes on VMEbus RAM cards
     68  1.1.2.2  jdolecek ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     69  1.1.2.2  jdolecek 
     70  1.1.2.2  jdolecek So... You've got your nice shiny VMEbus RAM card up and running with
     71  1.1.2.2  jdolecek NetBSD, and you're wondering why your system runs slower than it did
     72  1.1.2.2  jdolecek with less RAM!
     73  1.1.2.2  jdolecek 
     74  1.1.2.2  jdolecek The simple answer is "Motorola got it wrong". (Or at least that's my
     75  1.1.2.2  jdolecek opinion. If anyone can cure the following, let me know!)
     76  1.1.2.2  jdolecek 
     77  1.1.2.2  jdolecek In their infinite wisdom, the designers of the MVME147 decided that
     78  1.1.2.2  jdolecek they would disable the 68030's cache on *any* access to the VMEbus.
     79  1.1.2.2  jdolecek The upshot is that the cache only works for onboard RAM, not VMEbus
     80  1.1.2.2  jdolecek RAM, hence your system runs slower. As far as I can see, the only
     81  1.1.2.2  jdolecek way to cure this is to physically cut a trace on the circuit board
     82  1.1.2.2  jdolecek and use the MMU to control caching on a page-by-page basis...
     83  1.1.2.2  jdolecek 
     84  1.1.2.2  jdolecek Anyhow, hopefully the above instructions have finally put to rest
     85  1.1.2.2  jdolecek the most asked question about the mvme68k port.
     86  1.1.2.2  jdolecek 
     87  1.1.2.2  jdolecek Cheers,
     88  1.1.2.2  jdolecek Steve Woodford: scw (a] netbsd.org
     89