VMEbus-RAM revision 1.1
11.1Sscw	$NetBSD: VMEbus-RAM,v 1.1 2002/01/12 19:29:49 scw Exp $
21.1Sscw
31.1SscwNetBSD/mvme68k: VMEbus RAM card configuration
41.1Sscw~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51.1Sscw
61.1SscwNetBSD-mvme68k can be configured to support additional RAM boards
71.1Sscwaccessed over the VMEbus.
81.1Sscw
91.1SscwThis file describes where to configure your VMEbus RAM and how to
101.1Sscwpoint the kernel in the direction of it.
111.1Sscw
121.1SscwThe MVME147 board has a fairly primitive VMEbus controller chip. The
131.1Sscwmapping of cpu address to VMEbus address is hardwired and so dictates
141.1Sscwwhat can be seen where by the 68030. From the cpu's perspective, A24
151.1Sscwspace spans 0x00000000 to 0x00ffffff. However, onboard RAM also spans
161.1Sscwthis space. With 8Mb of onboard RAM, only the top 8Mb of VMEbus A24
171.1Sscwspace can be seen. With 16Mb onboard, there is no easy way to get at
181.1SscwA24 space at all!
191.1Sscw
201.1SscwThe other MVME boards have a more sophisticated VMEbus controller
211.1Sscwwhich can remap segments of VMEbus address space anywhere in the CPU's
221.1Sscwaddress space. This document will assume the remap is `transparent',
231.1Sscwie. no translation is taking place. The same restriction as MVME147
241.1Sscwapplies to these boards in that, without translation, a region of
251.1SscwVMEbus address space is masked by onboard RAM. The size of this region
261.1Sscwdepends entirely on the size of onboard RAM.
271.1Sscw
281.1SscwThe best place for VMEbus RAM cards is somewhere in A32D32 VMEbus address
291.1Sscwspace. Obviously, if your VMEbus RAM card doesn't respond to that space
301.1Sscwthen you'll have to locate it elsewhere. Typically, you may find it
311.1Sscwresponds to A24D16 only, in which case the CPU-relative address you need
321.1Sscwto specify below will be in the 16MB region starting at 0xZZZZZZZZ.
331.1Sscw
341.1SscwFor A32D32, choose an address which is resonably close to the end of the
351.1SscwMVME board's RAM. That is, if you have 32MB of onboard RAM, set the
361.1SscwVMEbus RAM board to appear at A32:02000000.
371.1Sscw
381.1SscwThis starting address needs to be written to the MVME board's NVRAM at
391.1Sscwaddress 0xfffe0764 for MVME147, and 0xff, as follows:
401.1Sscw
411.1Sscw	147Bug> mm fffe0764 ;L
421.1Sscw	FFFE0764 00000000? 01000000   <cr>	<--- you type 01000000
431.1Sscw	FFFE0768 00000000? .          <cr>
441.1Sscw	147Bug>
451.1Sscw
461.1SscwNext, you need to configure the end address of VMEbus RAM. Assuming
471.1Sscwyour RAM card is 8Mb in size, this would be 0x017fffff. You need to
481.1Sscwwrite this value to NVRAM address 0xfffe0768, as follows:
491.1Sscw
501.1Sscw	147Bug> mm fffe0768 ;L
511.1Sscw	FFFE0768 00000000? 017fffff   <cr>	<--- you type 017fffff
521.1Sscw	FFFE076c 00000000? .          <cr>
531.1Sscw	147Bug>
541.1Sscw
551.1SscwYou could obviously combine the above two steps.
561.1Sscw
571.1SscwIf you have more than one VMEbus RAM card, you must configure them so
581.1Sscwthat they appear physically contiguous in A32 address space. So, to add
591.1Sscwanother 8Mb card in addition to the card above, it should be jumpered
601.1Sscwto start at 0x01800000. In this case, you would change NVRAM location
611.1Sscw0xfffe0768 to be 0x01ffffff.
621.1Sscw
631.1SscwIf NVRAM location 0xfffe0764 is zero, the kernel assumes you only have
641.1Sscwonboard RAM and will not attempt to use any VMEbus RAM.
651.1Sscw
661.1Sscw
671.1SscwSome extra notes on VMEbus RAM cards
681.1Sscw~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
691.1Sscw
701.1SscwSo... You've got your nice shiny VMEbus RAM card up and running with
711.1SscwNetBSD, and you're wondering why your system runs slower than it did
721.1Sscwwith less RAM!
731.1Sscw
741.1SscwThe simple answer is "Motorola got it wrong". (Or at least that's my
751.1Sscwopinion. If anyone can cure the following, let me know!)
761.1Sscw
771.1SscwIn their infinite wisdom, the designers of the MVME147 decided that
781.1Sscwthey would disable the 68030's cache on *any* access to the VMEbus.
791.1SscwThe upshot is that the cache only works for onboard RAM, not VMEbus
801.1SscwRAM, hence your system runs slower. As far as I can see, the only
811.1Sscwway to cure this is to physically cut a trace on the circuit board
821.1Sscwand use the MMU to control caching on a page-by-page basis...
831.1Sscw
841.1SscwAnyhow, hopefully the above instructions have finally put to rest
851.1Sscwthe most asked question about the mvme68k port.
861.1Sscw
871.1SscwCheers,
881.1SscwSteve Woodford: scw@netbsd.org
89