blob: 724cdb3cfbf8f08fdef70eb5915225580b2321fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 2019 Peter Tribble.
*/
#ifndef _SYS_PCI_REGS_H
#define _SYS_PCI_REGS_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Offsets of registers in the interrupt block:
*/
#define COMMON_IB_UPA0_INTR_MAP_REG_OFFSET 0x6000
#define COMMON_IB_UPA1_INTR_MAP_REG_OFFSET 0x8000
#define COMMON_IB_SLOT_INTR_STATE_DIAG_REG 0xA800
#define COMMON_IB_OBIO_INTR_STATE_DIAG_REG 0xA808
#define COMMON_IB_SLOT_CLEAR_INTR_REG_OFFSET 0x1400
#define COMMON_IB_INTR_RETRY_TIMER_OFFSET 0x1A00
/*
* Offsets of registers in the ECC block:
*/
#define COMMON_ECC_CSR_OFFSET 0x20
#define COMMON_UE_AFSR_OFFSET 0x30
#define COMMON_UE_AFAR_OFFSET 0x38
#define COMMON_CE_AFSR_OFFSET 0x40
#define COMMON_CE_AFAR_OFFSET 0x48
/*
* Offsets of registers in the iommu block:
*/
#define COMMON_IOMMU_CTRL_REG_OFFSET 0x00000200
#define COMMON_IOMMU_TSB_BASE_ADDR_REG_OFFSET 0x00000208
#define COMMON_IOMMU_FLUSH_PAGE_REG_OFFSET 0x00000210
#define COMMON_IOMMU_TLB_TAG_DIAG_ACC_OFFSET 0x0000A580
#define COMMON_IOMMU_TLB_DATA_DIAG_ACC_OFFSET 0x0000A600
/*
* (psycho and schizo) control register bit definitions:
*/
#define COMMON_CB_CONTROL_STATUS_APCKEN 0x0000000000000008ull
#define COMMON_CB_CONTROL_STATUS_APERR 0x0000000000000004ull
#define COMMON_CB_CONTROL_STATUS_IAP 0x0000000000000002ull
/*
* (psycho and schizo) interrupt mapping register bit definitions:
*/
#define COMMON_INTR_MAP_REG_VALID 0x0000000080000000ull
#define COMMON_INTR_MAP_REG_TID 0x000000007C000000ull
#define COMMON_INTR_MAP_REG_IGN 0x00000000000007C0ull
#define COMMON_INTR_MAP_REG_INO 0x000000000000003full
#define COMMON_INTR_MAP_REG_TID_SHIFT 26
#define COMMON_INTR_MAP_REG_IGN_SHIFT 6
/*
* psycho clear interrupt register bit definitions:
*/
#define COMMON_CLEAR_INTR_REG_MASK 0x0000000000000003ull
#define COMMON_CLEAR_INTR_REG_IDLE 0x0000000000000000ull
#define COMMON_CLEAR_INTR_REG_RECEIVED 0x0000000000000001ull
#define COMMON_CLEAR_INTR_REG_RSVD 0x0000000000000002ull
#define COMMON_CLEAR_INTR_REG_PENDING 0x0000000000000003ull
/*
* psycho and schizo ECC control register bit definitions:
*/
#define COMMON_ECC_CTRL_ECC_EN 0x8000000000000000ull
#define COMMON_ECC_CTRL_UE_INTEN 0x4000000000000000ull
#define COMMON_ECC_CTRL_CE_INTEN 0x2000000000000000ull
/*
* sabre ECC UE AFSR bit definitions:
*/
#define SABRE_UE_AFSR_SDTE_SHIFT 57
#define SABRE_UE_AFSR_PDTE_SHIFT 56
#define SABRE_UE_ARSR_DTE_MASK 0x0000000000000003ull
#define SABRE_UE_AFSR_E_SDTE 0x2
#define SABRE_UE_AFSR_E_PDTE 0x1
/*
* psycho and schizo ECC UE AFSR bit definitions:
*/
#define COMMON_ECC_UE_AFSR_PE_SHIFT 61
#define COMMON_ECC_UE_AFSR_SE_SHIFT 58
#define COMMON_ECC_UE_AFSR_E_MASK 0x0000000000000007ull
/*
* psycho and schizo ECC CE AFSR bit definitions:
*/
#define COMMON_ECC_CE_AFSR_PE_SHIFT 61
#define COMMON_ECC_CE_AFSR_SE_SHIFT 58
#define COMMON_ECC_CE_AFSR_E_MASK 0x0000000000000007ull
/*
* psycho and schizo ECC CE/UE AFSR bit definitions for error types:
*/
#define COMMON_ECC_AFSR_E_PIO 0x0000000000000004ull
#define COMMON_ECC_AFSR_E_DRD 0x0000000000000002ull
#define COMMON_ECC_AFSR_E_DWR 0x0000000000000001ull
/*
* psycho and schizo pci control register bits:
*/
#define COMMON_PCI_CTRL_SBH_ERR 0x0000000800000000ull
#define COMMON_PCI_CTRL_SERR 0x0000000400000000ull
#define COMMON_PCI_CTRL_SPEED 0x0000000200000000ull
/*
* psycho and schizo PCI diagnostic register bit definitions:
*/
#define COMMON_PCI_DIAG_DIS_RETRY 0x0000000000000040ull
#define COMMON_PCI_DIAG_DIS_INTSYNC 0x0000000000000020ull
/*
* psycho and schizo IOMMU control register bit definitions:
*/
#define COMMON_IOMMU_CTRL_ENABLE 0x0000000000000001ull
#define COMMON_IOMMU_CTRL_DIAG_ENABLE 0x0000000000000002ull
#define COMMON_IOMMU_CTRL_TSB_SZ_SHIFT 16
#define COMMON_IOMMU_CTRL_TBW_SZ_SHIFT 2
#define COMMON_IOMMU_CTRL_LCK_ENABLE 0x0000000000800000ull
/*
* psycho and schizo streaming cache control register bit definitions:
*/
#define COMMON_SC_CTRL_ENABLE 0x0000000000000001ull
#define COMMON_SC_CTRL_DIAG_ENABLE 0x0000000000000002ull
#define COMMON_SC_CTRL_RR__DISABLE 0x0000000000000004ull
#define COMMON_SC_CTRL_LRU_LE 0x0000000000000008ull
/*
* offsets of PCI address spaces from base address:
*/
#define PCI_CONFIG 0x001000000ull
#define PCI_A_IO 0x002000000ull
#define PCI_B_IO 0x002010000ull
#define PCI_A_MEMORY 0x100000000ull
#define PCI_B_MEMORY 0x180000000ull
#define PCI_IO_SIZE 0x000010000ull
#define PCI_MEM_SIZE 0x080000000ull
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PCI_REGS_H */
|