]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - 6/sys/alpha/mcbus/mcbusreg.h
merge fix for boot-time hang on centos' xen
[FreeBSD/FreeBSD.git] / 6 / sys / alpha / mcbus / mcbusreg.h
1 /* $FreeBSD$ */
2
3 /*-
4  * Copyright (c) 1998, 2000 by Matthew Jacob
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice immediately at the beginning of the file, without modification,
12  *    this list of conditions, and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
21  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  */
29
30 /*
31  * 'Register' definitions for the MCBUS main
32  * system bus found on AlphaServer 4100 systems.
33  */
34
35 /*
36  * Information gathered from:"
37  *
38  * "Rawhide System Programmer's Manual, revision 1.4".
39  */
40
41 /*
42  * There are 7 possible MC bus modules (architecture says 10, but
43  * the address map details say otherwise), 1 though 7.
44  * Their uses are defined as follows:
45  *
46  *      MID     Module
47  *      ----    ------
48  *      1       Memory
49  *      2       CPU
50  *      3       CPU
51  *      4       CPU, PCI
52  *      5       CPU, PCI
53  *      6       CPU, PCI
54  *      7       CPU, PCI
55  *
56  */
57 #define MCBUS_MID_MAX           7
58
59 /*
60  * For this architecture, bit 39 of a 40 bit address controls whether
61  * you access I/O or Memory space. Further, there *could* be multiple
62  * MC busses (but only one specified for now).
63  */
64
65 #define MCBUS_IOSPACE           0x0000008000000000L
66 #define MCBUS_GID_MASK          0x0000007000000000L
67 #define MCBUS_GID_SHIFT         36
68 #define MCBUS_MID_MASK          0x0000000E00000000L
69 #define MCBUS_MID_SHIFT         33
70
71 #define MAX_MC_BUS              8
72
73 #define MCPCIA_PER_MCBUS                4
74 #define MCPCIA_PCI_MIDMIN               4
75 /*
76  * This is something of a layering violation, but it makes probing cleaner.
77  */
78 /* the MCPCIA bridge CSR addresses, offset zero, is a good thing to probe for */
79 #define MCPCIA_BRIDGE_ADDR(gid, mid)    \
80         (MCBUS_IOSPACE | 0x1E0000000LL  |               \
81         (((unsigned long) gid) << MCBUS_GID_SHIFT) |    \
82         (((unsigned long) mid) << MCBUS_MID_SHIFT))