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