~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/include/asm/sn/sn0/hubmd.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/mips/include/asm/sn/sn0/hubmd.h (Architecture i386) and /arch/alpha/include/asm-alpha/sn/sn0/hubmd.h (Architecture alpha)


  1 /*                                                  1 
  2  * This file is subject to the terms and condi    
  3  * License.  See the file "COPYING" in the mai    
  4  * for more details.                              
  5  *                                                
  6  * Derived from IRIX <sys/SN/SN0/hubmd.h>, rev    
  7  *                                                
  8  * Copyright (C) 1992 - 1997, 1999 Silicon Gra    
  9  * Copyright (C) 1999 by Ralf Baechle             
 10  */                                               
 11 #ifndef _ASM_SN_SN0_HUBMD_H                       
 12 #define _ASM_SN_SN0_HUBMD_H                       
 13                                                   
 14                                                   
 15 /*                                                
 16  * Hub Memory/Directory interface registers       
 17  */                                               
 18 #define CACHE_SLINE_SIZE        128     /* Sec    
 19                                                   
 20 #define MAX_REGIONS             64                
 21                                                   
 22 /* Hardware page size and shift */                
 23                                                   
 24 #define MD_PAGE_SIZE            4096     /* Pa    
 25 #define MD_PAGE_NUM_SHFT        12       /* Ad    
 26                                                   
 27 /* Register offsets from LOCAL_HUB or REMOTE_H    
 28                                                   
 29 #define MD_BASE                 0x200000          
 30 #define MD_BASE_PERF            0x210000          
 31 #define MD_BASE_JUNK            0x220000          
 32                                                   
 33 #define MD_IO_PROTECT           0x200000 /* MD    
 34 #define MD_IO_PROT_OVRRD        0x200008 /* Cl    
 35 #define MD_HSPEC_PROTECT        0x200010 /* BD    
 36 #define MD_MEMORY_CONFIG        0x200018 /* Me    
 37 #define MD_REFRESH_CONTROL      0x200020 /* Me    
 38 #define MD_FANDOP_CAC_STAT      0x200028 /* Fe    
 39 #define MD_MIG_DIFF_THRESH      0x200030 /* Pa    
 40 #define MD_MIG_VALUE_THRESH     0x200038 /* Pa    
 41 #define MD_MIG_CANDIDATE        0x200040 /* La    
 42 #define MD_MIG_CANDIDATE_CLR    0x200048 /* Cl    
 43 #define MD_DIR_ERROR            0x200050 /* Di    
 44 #define MD_DIR_ERROR_CLR        0x200058 /* Di    
 45 #define MD_PROTOCOL_ERROR       0x200060 /* Di    
 46 #define MD_PROTOCOL_ERROR_CLR   0x200068 /* Di    
 47 #define MD_MEM_ERROR            0x200070 /* Me    
 48 #define MD_MEM_ERROR_CLR        0x200078 /* Me    
 49 #define MD_MISC_ERROR           0x200080 /* Mi    
 50 #define MD_MISC_ERROR_CLR       0x200088 /* Mi    
 51 #define MD_MEM_DIMM_INIT        0x200090 /* Me    
 52 #define MD_DIR_DIMM_INIT        0x200098 /* Di    
 53 #define MD_MOQ_SIZE             0x2000a0 /* MD    
 54 #define MD_MLAN_CTL             0x2000a8 /* NI    
 55                                                   
 56 #define MD_PERF_SEL             0x210000 /* Se    
 57 #define MD_PERF_CNT0            0x210010 /* Pe    
 58 #define MD_PERF_CNT1            0x210018 /* Pe    
 59 #define MD_PERF_CNT2            0x210020 /* Pe    
 60 #define MD_PERF_CNT3            0x210028 /* Pe    
 61 #define MD_PERF_CNT4            0x210030 /* Pe    
 62 #define MD_PERF_CNT5            0x210038 /* Pe    
 63                                                   
 64 #define MD_UREG0_0              0x220000 /* uC    
 65 #define MD_UREG0_1              0x220008 /* uC    
 66 #define MD_UREG0_2              0x220010 /* uC    
 67 #define MD_UREG0_3              0x220018 /* uC    
 68 #define MD_UREG0_4              0x220020 /* uC    
 69 #define MD_UREG0_5              0x220028 /* uC    
 70 #define MD_UREG0_6              0x220030 /* uC    
 71 #define MD_UREG0_7              0x220038 /* uC    
 72                                                   
 73 #define MD_SLOTID_USTAT         0x220048 /* Hu    
 74 #define MD_LED0                 0x220050 /* Ei    
 75 #define MD_LED1                 0x220058 /* Ei    
 76                                                   
 77 #define MD_UREG1_0              0x220080 /* uC    
 78 #define MD_UREG1_1              0x220088 /* uC    
 79 #define MD_UREG1_2              0x220090 /* uC    
 80 #define MD_UREG1_3              0x220098 /* uC    
 81 #define MD_UREG1_4              0x2200a0 /* uC    
 82 #define MD_UREG1_5              0x2200a8 /* uC    
 83 #define MD_UREG1_6              0x2200b0 /* uC    
 84 #define MD_UREG1_7              0x2200b8 /* uC    
 85 #define MD_UREG1_8              0x2200c0 /* uC    
 86 #define MD_UREG1_9              0x2200c8 /* uC    
 87 #define MD_UREG1_10             0x2200d0 /* uC    
 88 #define MD_UREG1_11             0x2200d8 /* uC    
 89 #define MD_UREG1_12             0x2200e0 /* uC    
 90 #define MD_UREG1_13             0x2200e8 /* uC    
 91 #define MD_UREG1_14             0x2200f0 /* uC    
 92 #define MD_UREG1_15             0x2200f8 /* uC    
 93                                                   
 94 #ifdef CONFIG_SGI_SN_N_MODE                       
 95 #define MD_MEM_BANKS            4        /* 4     
 96 #else                                             
 97 #define MD_MEM_BANKS            8        /* 8     
 98 #endif                                            
 99                                                   
100 /*                                                
101  * MD_MEMORY_CONFIG fields                        
102  *                                                
103  *   MD_SIZE_xxx are useful for representing t    
104  *   (SIMM pair).  They correspond to the valu    
105  *   triplets (MMC_BANK_MASK) in the MD_MEMORY    
106  *   Bits not used by the MD are used by softw    
107  */                                               
108                                                   
109 #define MD_SIZE_EMPTY           0       /* Val    
110 #define MD_SIZE_8MB             1                 
111 #define MD_SIZE_16MB            2                 
112 #define MD_SIZE_32MB            3       /* Bro    
113 #define MD_SIZE_64MB            4       /* Val    
114 #define MD_SIZE_128MB           5       /* Val    
115 #define MD_SIZE_256MB           6                 
116 #define MD_SIZE_512MB           7       /* Val    
117 #define MD_SIZE_1GB             8                 
118 #define MD_SIZE_2GB             9                 
119 #define MD_SIZE_4GB             10                
120                                                   
121 #define MD_SIZE_BYTES(size)     ((size) == 0 ?    
122 #define MD_SIZE_MBYTES(size)    ((size) == 0 ?    
123                                                   
124 #define MMC_FPROM_CYC_SHFT      49      /* Hav    
125 #define MMC_FPROM_CYC_MASK      (UINT64_CAST 3    
126 #define MMC_FPROM_WR_SHFT       44                
127 #define MMC_FPROM_WR_MASK       (UINT64_CAST 3    
128 #define MMC_UCTLR_CYC_SHFT      39                
129 #define MMC_UCTLR_CYC_MASK      (UINT64_CAST 3    
130 #define MMC_UCTLR_WR_SHFT       34                
131 #define MMC_UCTLR_WR_MASK       (UINT64_CAST 3    
132 #define MMC_DIMM0_SEL_SHFT      32                
133 #define MMC_DIMM0_SEL_MASK      (UINT64_CAST 3    
134 #define MMC_IO_PROT_EN_SHFT     31                
135 #define MMC_IO_PROT_EN_MASK     (UINT64_CAST 1    
136 #define MMC_IO_PROT             (UINT64_CAST 1    
137 #define MMC_ARB_MLSS_SHFT       30                
138 #define MMC_ARB_MLSS_MASK       (UINT64_CAST 1    
139 #define MMC_ARB_MLSS            (UINT64_CAST 1    
140 #define MMC_IGNORE_ECC_SHFT     29                
141 #define MMC_IGNORE_ECC_MASK     (UINT64_CAST 1    
142 #define MMC_IGNORE_ECC          (UINT64_CAST 1    
143 #define MMC_DIR_PREMIUM_SHFT    28                
144 #define MMC_DIR_PREMIUM_MASK    (UINT64_CAST 1    
145 #define MMC_DIR_PREMIUM         (UINT64_CAST 1    
146 #define MMC_REPLY_GUAR_SHFT     24                
147 #define MMC_REPLY_GUAR_MASK     (UINT64_CAST 1    
148 #define MMC_BANK_SHFT(_b)       ((_b) * 3)        
149 #define MMC_BANK_MASK(_b)       (UINT64_CAST 7    
150 #define MMC_BANK_ALL_MASK       0xffffff          
151 #define MMC_RESET_DEFAULTS      (UINT64_CAST 0    
152                                  UINT64_CAST 0    
153                                  UINT64_CAST 0    
154                                  UINT64_CAST 0    
155                                  MMC_IGNORE_EC    
156                                  UINT64_CAST 0    
157                                  MMC_BANK_ALL_    
158                                                   
159 /* MD_REFRESH_CONTROL fields */                   
160                                                   
161 #define MRC_ENABLE_SHFT         63                
162 #define MRC_ENABLE_MASK         (UINT64_CAST 1    
163 #define MRC_ENABLE              (UINT64_CAST 1    
164 #define MRC_COUNTER_SHFT        12                
165 #define MRC_COUNTER_MASK        (UINT64_CAST 0    
166 #define MRC_CNT_THRESH_MASK     0xfff             
167 #define MRC_RESET_DEFAULTS      (UINT64_CAST 0    
168                                                   
169 /* MD_MEM_DIMM_INIT and MD_DIR_DIMM_INIT field    
170                                                   
171 #define MDI_SELECT_SHFT         32                
172 #define MDI_SELECT_MASK         (UINT64_CAST 0    
173 #define MDI_DIMM_MODE_MASK      (UINT64_CAST 0    
174                                                   
175 /* MD_MOQ_SIZE fields */                          
176                                                   
177 #define MMS_RP_SIZE_SHFT        8                 
178 #define MMS_RP_SIZE_MASK        (UINT64_CAST 0    
179 #define MMS_RQ_SIZE_SHFT        0                 
180 #define MMS_RQ_SIZE_MASK        (UINT64_CAST 0    
181 #define MMS_RESET_DEFAULTS      (0x32 << 8 | 0    
182                                                   
183 /* MD_FANDOP_CAC_STAT fields */                   
184                                                   
185 #define MFC_VALID_SHFT          63                
186 #define MFC_VALID_MASK          (UINT64_CAST 1    
187 #define MFC_VALID               (UINT64_CAST 1    
188 #define MFC_ADDR_SHFT           6                 
189 #define MFC_ADDR_MASK           (UINT64_CAST 0    
190                                                   
191 /* MD_MLAN_CTL fields */                          
192                                                   
193 #define MLAN_PHI1_SHFT          27                
194 #define MLAN_PHI1_MASK          (UINT64_CAST 0    
195 #define MLAN_PHI0_SHFT          20                
196 #define MLAN_PHI0_MASK          (UINT64_CAST 0    
197 #define MLAN_PULSE_SHFT         10                
198 #define MLAN_PULSE_MASK         (UINT64_CAST 0    
199 #define MLAN_SAMPLE_SHFT        2                 
200 #define MLAN_SAMPLE_MASK        (UINT64_CAST 0    
201 #define MLAN_DONE_SHFT          1                 
202 #define MLAN_DONE_MASK          2                 
203 #define MLAN_DONE               (UINT64_CAST 0    
204 #define MLAN_RD_DATA            (UINT64_CAST 0    
205 #define MLAN_RESET_DEFAULTS     (UINT64_CAST 0    
206                                  UINT64_CAST 0    
207                                                   
208 /* MD_SLOTID_USTAT bit definitions */             
209                                                   
210 #define MSU_CORECLK_TST_SHFT    7       /* You    
211 #define MSU_CORECLK_TST_MASK    (UINT64_CAST 1    
212 #define MSU_CORECLK_TST         (UINT64_CAST 1    
213 #define MSU_CORECLK_SHFT        6       /* You    
214 #define MSU_CORECLK_MASK        (UINT64_CAST 1    
215 #define MSU_CORECLK             (UINT64_CAST 1    
216 #define MSU_NETSYNC_SHFT        5       /* You    
217 #define MSU_NETSYNC_MASK        (UINT64_CAST 1    
218 #define MSU_NETSYNC             (UINT64_CAST 1    
219 #define MSU_FPROMRDY_SHFT       4       /* Fla    
220 #define MSU_FPROMRDY_MASK       (UINT64_CAST 1    
221 #define MSU_FPROMRDY            (UINT64_CAST 1    
222 #define MSU_I2CINTR_SHFT                3         
223 #define MSU_I2CINTR_MASK                (UINT6    
224 #define MSU_I2CINTR             (UINT64_CAST 1    
225 #define MSU_SLOTID_MASK         0xff              
226 #define MSU_SN0_SLOTID_SHFT     0       /* Slo    
227 #define MSU_SN0_SLOTID_MASK     (UINT64_CAST 7    
228 #define MSU_SN00_SLOTID_SHFT    7                 
229 #define MSU_SN00_SLOTID_MASK    (UINT64_CAST 0    
230                                                   
231 #define MSU_PIMM_PSC_SHFT       4                 
232 #define MSU_PIMM_PSC_MASK       (0xf << MSU_PI    
233                                                   
234 /* MD_MIG_DIFF_THRESH bit definitions */          
235                                                   
236 #define MD_MIG_DIFF_THRES_VALID_MASK (UINT64_C    
237 #define MD_MIG_DIFF_THRES_VALID_SHFT 63           
238 #define MD_MIG_DIFF_THRES_VALUE_MASK (UINT64_C    
239                                                   
240 /* MD_MIG_VALUE_THRESH bit definitions */         
241                                                   
242 #define MD_MIG_VALUE_THRES_VALID_MASK (UINT64_    
243 #define MD_MIG_VALUE_THRES_VALID_SHFT 63          
244 #define MD_MIG_VALUE_THRES_VALUE_MASK (UINT64_    
245                                                   
246 /* MD_MIG_CANDIDATE bit definitions */            
247                                                   
248 #define MD_MIG_CANDIDATE_VALID_MASK (UINT64_CA    
249 #define MD_MIG_CANDIDATE_VALID_SHFT 63            
250 #define MD_MIG_CANDIDATE_TYPE_MASK (UINT64_CAS    
251 #define MD_MIG_CANDIDATE_TYPE_SHFT 30             
252 #define MD_MIG_CANDIDATE_OVERRUN_MASK (UINT64_    
253 #define MD_MIG_CANDIDATE_OVERRUN_SHFT 29          
254 #define MD_MIG_CANDIDATE_INITIATOR_MASK (UINT6    
255 #define MD_MIG_CANDIDATE_INITIATOR_SHFT 18        
256 #define MD_MIG_CANDIDATE_NODEID_MASK (UINT64_C    
257 #define MD_MIG_CANDIDATE_NODEID_SHFT 20           
258 #define MD_MIG_CANDIDATE_ADDR_MASK (UINT64_CAS    
259 #define MD_MIG_CANDIDATE_ADDR_SHFT 14  /* The     
260                                                   
261 /* Other MD definitions */                        
262                                                   
263 #define MD_BANK_SHFT            29                
264 #define MD_BANK_MASK            (UINT64_CAST 7    
265 #define MD_BANK_SIZE            (UINT64_CAST 1    
266 #define MD_BANK_OFFSET(_b)      (UINT64_CAST (    
267                                                   
268 /*                                                
269  * The following definitions cover the bit fie    
270  * various MD registers.  For multi-bit regist    
271  * a shift amount and a mask value.  By conven    
272  * isolate a field, you should mask the field     
273  * since this makes the masks useful without a    
274  */                                               
275                                                   
276 /* Directory entry states for both premium and    
277                                                   
278 #define MD_DIR_SHARED           (UINT64_CAST 0    
279 #define MD_DIR_POISONED         (UINT64_CAST 0    
280 #define MD_DIR_EXCLUSIVE        (UINT64_CAST 0    
281 #define MD_DIR_BUSY_SHARED      (UINT64_CAST 0    
282 #define MD_DIR_BUSY_EXCL        (UINT64_CAST 0    
283 #define MD_DIR_WAIT             (UINT64_CAST 0    
284 #define MD_DIR_UNOWNED          (UINT64_CAST 0    
285                                                   
286 /*                                                
287  * The MD_DIR_FORCE_ECC bit can be added direc    
288  * to forcing the ECC to be written as-is inst    
289  */                                               
290                                                   
291 #define MD_DIR_FORCE_ECC        (UINT64_CAST 1    
292                                                   
293 /*                                                
294  * Premium SIMM directory entry shifts and mas    
295  * context(s) indicated, where A, B, and C ind    
296  * as shown, and low and/or high indicates whi    
297  *                                                
298  * Format A:  STATE = shared, FINE = 1            
299  * Format B:  STATE = shared, FINE = 0            
300  * Format C:  STATE != shared (FINE must be 0)    
301  */                                               
302                                                   
303 #define MD_PDIR_MASK            0xffffffffffff    
304 #define MD_PDIR_ECC_SHFT        0                 
305 #define MD_PDIR_ECC_MASK        0x7f              
306 #define MD_PDIR_PRIO_SHFT       8                 
307 #define MD_PDIR_PRIO_MASK       (0xf << 8)        
308 #define MD_PDIR_AX_SHFT         7                 
309 #define MD_PDIR_AX_MASK         (1 << 7)          
310 #define MD_PDIR_AX              (1 << 7)          
311 #define MD_PDIR_FINE_SHFT       12                
312 #define MD_PDIR_FINE_MASK       (1 << 12)         
313 #define MD_PDIR_FINE            (1 << 12)         
314 #define MD_PDIR_OCT_SHFT        13                
315 #define MD_PDIR_OCT_MASK        (7 << 13)         
316 #define MD_PDIR_STATE_SHFT      13                
317 #define MD_PDIR_STATE_MASK      (7 << 13)         
318 #define MD_PDIR_ONECNT_SHFT     16                
319 #define MD_PDIR_ONECNT_MASK     (0x3f << 16)      
320 #define MD_PDIR_PTR_SHFT        22                
321 #define MD_PDIR_PTR_MASK        (UINT64_CAST 0    
322 #define MD_PDIR_VECMSB_SHFT     22                
323 #define MD_PDIR_VECMSB_BITMASK  0x3ffffff         
324 #define MD_PDIR_VECMSB_BITSHFT  27                
325 #define MD_PDIR_VECMSB_MASK     (UINT64_CAST M    
326 #define MD_PDIR_CWOFF_SHFT      7                 
327 #define MD_PDIR_CWOFF_MASK      (7 << 7)          
328 #define MD_PDIR_VECLSB_SHFT     10                
329 #define MD_PDIR_VECLSB_BITMASK  (UINT64_CAST 0    
330 #define MD_PDIR_VECLSB_BITSHFT  0                 
331 #define MD_PDIR_VECLSB_MASK     (MD_PDIR_VECLS    
332                                                   
333 /*                                                
334  * Directory initialization values                
335  */                                               
336                                                   
337 #define MD_PDIR_INIT_LO         (MD_DIR_UNOWNE    
338                                  MD_PDIR_AX)      
339 #define MD_PDIR_INIT_HI         0                 
340 #define MD_PDIR_INIT_PROT       (MD_PROT_RW <<    
341                                  MD_PROT_RW <<    
342                                                   
343 /*                                                
344  * Standard SIMM directory entry shifts and ma    
345  * context(s) indicated, where A and C indicat    
346  * as shown, and low and/or high indicates whi    
347  *                                                
348  * Format A:  STATE == shared                     
349  * Format C:  STATE != shared                     
350  */                                               
351                                                   
352 #define MD_SDIR_MASK            0xffff            
353 #define MD_SDIR_ECC_SHFT        0                 
354 #define MD_SDIR_ECC_MASK        0x1f              
355 #define MD_SDIR_PRIO_SHFT       6                 
356 #define MD_SDIR_PRIO_MASK       (1 << 6)          
357 #define MD_SDIR_AX_SHFT         5                 
358 #define MD_SDIR_AX_MASK         (1 << 5)          
359 #define MD_SDIR_AX              (1 << 5)          
360 #define MD_SDIR_STATE_SHFT      7                 
361 #define MD_SDIR_STATE_MASK      (7 << 7)          
362 #define MD_SDIR_PTR_SHFT        10                
363 #define MD_SDIR_PTR_MASK        (0x3f << 10)      
364 #define MD_SDIR_CWOFF_SHFT      5                 
365 #define MD_SDIR_CWOFF_MASK      (7 << 5)          
366 #define MD_SDIR_VECMSB_SHFT     11                
367 #define MD_SDIR_VECMSB_BITMASK  0x1f              
368 #define MD_SDIR_VECMSB_BITSHFT  7                 
369 #define MD_SDIR_VECMSB_MASK     (MD_SDIR_VECMS    
370 #define MD_SDIR_VECLSB_SHFT     5                 
371 #define MD_SDIR_VECLSB_BITMASK  0x7ff             
372 #define MD_SDIR_VECLSB_BITSHFT  0                 
373 #define MD_SDIR_VECLSB_MASK     (MD_SDIR_VECLS    
374                                                   
375 /*                                                
376  * Directory initialization values                
377  */                                               
378                                                   
379 #define MD_SDIR_INIT_LO         (MD_DIR_UNOWNE    
380                                  MD_SDIR_AX)      
381 #define MD_SDIR_INIT_HI         0                 
382 #define MD_SDIR_INIT_PROT       (MD_PROT_RW <<    
383                                                   
384 /* Protection and migration field values */       
385                                                   
386 #define MD_PROT_RW              (UINT64_CAST 0    
387 #define MD_PROT_RO              (UINT64_CAST 0    
388 #define MD_PROT_NO              (UINT64_CAST 0    
389 #define MD_PROT_BAD             (UINT64_CAST 0    
390                                                   
391 /* Premium SIMM protection entry shifts and ma    
392                                                   
393 #define MD_PPROT_SHFT           0                 
394 #define MD_PPROT_MASK           7                 
395 #define MD_PPROT_MIGMD_SHFT     3                 
396 #define MD_PPROT_MIGMD_MASK     (3 << 3)          
397 #define MD_PPROT_REFCNT_SHFT    5                 
398 #define MD_PPROT_REFCNT_WIDTH   0x7ffff           
399 #define MD_PPROT_REFCNT_MASK    (MD_PPROT_REFC    
400                                                   
401 #define MD_PPROT_IO_SHFT        45                
402 #define MD_PPROT_IO_MASK        (UINT64_CAST 7    
403                                                   
404 /* Standard SIMM protection entry shifts and m    
405                                                   
406 #define MD_SPROT_SHFT           0                 
407 #define MD_SPROT_MASK           7                 
408 #define MD_SPROT_MIGMD_SHFT     3                 
409 #define MD_SPROT_MIGMD_MASK     (3 << 3)          
410 #define MD_SPROT_REFCNT_SHFT    5                 
411 #define MD_SPROT_REFCNT_WIDTH   0x7ff             
412 #define MD_SPROT_REFCNT_MASK    (MD_SPROT_REFC    
413                                                   
414 /* Migration modes used in protection entries     
415                                                   
416 #define MD_PROT_MIGMD_IREL      (UINT64_CAST 0    
417 #define MD_PROT_MIGMD_IABS      (UINT64_CAST 0    
418 #define MD_PROT_MIGMD_PREL      (UINT64_CAST 0    
419 #define MD_PROT_MIGMD_OFF       (UINT64_CAST 0    
420                                                   
421                                                   
422 /*                                                
423  * Operations on page migration threshold regi    
424  */                                               
425                                                   
426 #ifndef __ASSEMBLY__                              
427                                                   
428 /*                                                
429  * LED register macros                            
430  */                                               
431                                                   
432 #define CPU_LED_ADDR(_nasid, _slice)              
433         (private.p_sn00 ?                         
434          REMOTE_HUB_ADDR((_nasid), MD_UREG1_0     
435          REMOTE_HUB_ADDR((_nasid), MD_LED0        
436                                                   
437 #define SET_CPU_LEDS(_nasid, _slice,  _val)       
438         (HUB_S(CPU_LED_ADDR(_nasid, _slice), (    
439                                                   
440 #define SET_MY_LEDS(_v)                           
441         SET_CPU_LEDS(get_nasid(), get_slice(),    
442                                                   
443 /*                                                
444  * Operations on Memory/Directory DIMM control    
445  */                                               
446                                                   
447 #define DIRTYPE_PREMIUM 1                         
448 #define DIRTYPE_STANDARD 0                        
449 #define MD_MEMORY_CONFIG_DIR_TYPE_GET(region)     
450         (REMOTE_HUB_L(region, MD_MEMORY_CONFIG    
451         MMC_DIR_PREMIUM_SHFT)                     
452                                                   
453                                                   
454 /*                                                
455  * Operations on page migration count differen    
456  * registers                                      
457  */                                               
458                                                   
459 #define MD_MIG_DIFF_THRESH_GET(region) ( \        
460         REMOTE_HUB_L((region), MD_MIG_DIFF_THR    
461         MD_MIG_DIFF_THRES_VALUE_MASK)             
462                                                   
463 #define MD_MIG_DIFF_THRESH_SET(region, value)     
464         REMOTE_HUB_S((region), MD_MIG_DIFF_THR    
465                 MD_MIG_DIFF_THRES_VALID_MASK |    
466                                                   
467 #define MD_MIG_DIFF_THRESH_DISABLE(region) (      
468         REMOTE_HUB_S((region), MD_MIG_DIFF_THR    
469                 REMOTE_HUB_L((region), MD_MIG_    
470                              & ~MD_MIG_DIFF_TH    
471                                                   
472 #define MD_MIG_DIFF_THRESH_ENABLE(region) (       
473         REMOTE_HUB_S((region), MD_MIG_DIFF_THR    
474                 REMOTE_HUB_L((region), MD_MIG_    
475                              | MD_MIG_DIFF_THR    
476                                                   
477 #define MD_MIG_DIFF_THRESH_IS_ENABLED(region)     
478         REMOTE_HUB_L((region), MD_MIG_DIFF_THR    
479                MD_MIG_DIFF_THRES_VALID_MASK)      
480                                                   
481 #define MD_MIG_VALUE_THRESH_GET(region) (         
482         REMOTE_HUB_L((region), MD_MIG_VALUE_TH    
483         MD_MIG_VALUE_THRES_VALUE_MASK)            
484                                                   
485 #define MD_MIG_VALUE_THRESH_SET(region, value)    
486         REMOTE_HUB_S((region), MD_MIG_VALUE_TH    
487                 MD_MIG_VALUE_THRES_VALID_MASK     
488                                                   
489 #define MD_MIG_VALUE_THRESH_DISABLE(region) (     
490         REMOTE_HUB_S((region), MD_MIG_VALUE_TH    
491                 REMOTE_HUB_L(region, MD_MIG_VA    
492                              & ~MD_MIG_VALUE_T    
493                                                   
494 #define MD_MIG_VALUE_THRESH_ENABLE(region) (      
495         REMOTE_HUB_S((region), MD_MIG_VALUE_TH    
496                 REMOTE_HUB_L((region), MD_MIG_    
497                              | MD_MIG_VALUE_TH    
498                                                   
499 #define MD_MIG_VALUE_THRESH_IS_ENABLED(region)    
500         REMOTE_HUB_L((region), MD_MIG_VALUE_TH    
501                MD_MIG_VALUE_THRES_VALID_MASK)     
502                                                   
503 /*                                                
504  * Operations on page migration candidate regi    
505  */                                               
506                                                   
507 #define MD_MIG_CANDIDATE_GET(my_region_id) ( \    
508         REMOTE_HUB_L((my_region_id), MD_MIG_CA    
509                                                   
510 #define MD_MIG_CANDIDATE_HWPFN(value) ((value)    
511                                                   
512 #define MD_MIG_CANDIDATE_NODEID(value) ( \        
513         ((value) & MD_MIG_CANDIDATE_NODEID_MAS    
514                                                   
515 #define MD_MIG_CANDIDATE_TYPE(value) ( \          
516         ((value) & MD_MIG_CANDIDATE_TYPE_MASK)    
517                                                   
518 #define MD_MIG_CANDIDATE_VALID(value) ( \         
519         ((value) & MD_MIG_CANDIDATE_VALID_MASK    
520                                                   
521 /*                                                
522  * Macros to retrieve fields in the protection    
523  */                                               
524                                                   
525 /* for Premium SIMM */                            
526 #define MD_PPROT_REFCNT_GET(value) ( \            
527         ((value) & MD_PPROT_REFCNT_MASK) >> MD    
528                                                   
529 #define MD_PPROT_MIGMD_GET(value) ( \             
530         ((value) & MD_PPROT_MIGMD_MASK) >> MD_    
531                                                   
532 /* for Standard SIMM */                           
533 #define MD_SPROT_REFCNT_GET(value) ( \            
534         ((value) & MD_SPROT_REFCNT_MASK) >> MD    
535                                                   
536 #define MD_SPROT_MIGMD_GET(value) ( \             
537         ((value) & MD_SPROT_MIGMD_MASK) >> MD_    
538                                                   
539 /*                                                
540  * Format of dir_error, mem_error, protocol_er    
541  */                                               
542                                                   
543 struct dir_error_reg {                            
544         u64     uce_vld:   1,   /*    63: vali    
545                 ae_vld:    1,   /*    62: vali    
546                 ce_vld:    1,   /*    61: vali    
547                 rsvd1:    19,   /* 60-42: rese    
548                 bad_prot:  3,   /* 41-39: enco    
549                 bad_syn:   7,   /* 38-32: bad     
550                 rsvd2:     2,   /* 31-30: rese    
551                 hspec_addr:27,  /* 29-03: bddi    
552                 uce_ovr:   1,   /*     2: mult    
553                 ae_ovr:    1,   /*     1: mult    
554                 ce_ovr:    1;   /*     0: mult    
555 };                                                
556                                                   
557 typedef union md_dir_error {                      
558         u64     derr_reg;       /* the entire     
559         struct dir_error_reg derr_fmt;  /* the    
560 } md_dir_error_t;                                 
561                                                   
562                                                   
563 struct mem_error_reg {                            
564         u64     uce_vld:   1,   /*    63: vali    
565                 ce_vld:    1,   /*    62: vali    
566                 rsvd1:    22,   /* 61-40: rese    
567                 bad_syn:   8,   /* 39-32: bad     
568                 address:  29,   /* 31-03: bad     
569                 rsvd2:     1,   /*     2: rese    
570                 uce_ovr:   1,   /*     1: mult    
571                 ce_ovr:    1;   /*     0: mult    
572 };                                                
573                                                   
574                                                   
575 typedef union md_mem_error {                      
576         u64     merr_reg;       /* the entire     
577         struct mem_error_reg  merr_fmt; /* for    
578 } md_mem_error_t;                                 
579                                                   
580                                                   
581 struct proto_error_reg {                          
582         u64     valid:     1,   /*    63: vali    
583                 rsvd1:     2,   /* 62-61: rese    
584                 initiator:11,   /* 60-50: id o    
585                 backoff:   2,   /* 49-48: back    
586                 msg_type:  8,   /* 47-40: type    
587                 access:    2,   /* 39-38: acce    
588                 priority:  1,   /*    37: prio    
589                 dir_state: 4,   /* 36-33: stat    
590                 pointer_me:1,   /*    32: init    
591                 address:  29,   /* 31-03: requ    
592                 rsvd2:     2,   /* 02-01: rese    
593                 overrun:   1;   /*     0: mult    
594 };                                                
595                                                   
596 typedef union md_proto_error {                    
597         u64     perr_reg;       /* the entire     
598         struct proto_error_reg  perr_fmt; /* f    
599 } md_proto_error_t;                               
600                                                   
601                                                   
602 struct md_sdir_high_fmt {                         
603         unsigned short sd_hi_bvec : 11,           
604                        sd_hi_ecc  : 5;            
605 };                                                
606                                                   
607                                                   
608 typedef union md_sdir_high {                      
609         /* The 16 bits of standard directory,     
610         unsigned short sd_hi_val;                 
611         struct  md_sdir_high_fmt sd_hi_fmt;       
612 }md_sdir_high_t;                                  
613                                                   
614                                                   
615 struct md_sdir_low_shared_fmt {                   
616         /* The meaning of lower directory, sha    
617         unsigned short  sds_lo_bvec  : 5,         
618                         sds_lo_unused: 1,         
619                         sds_lo_state : 3,         
620                         sds_lo_prio  : 1,         
621                         sds_lo_ax    : 1,         
622                         sds_lo_ecc   : 5;         
623 };                                                
624                                                   
625 struct md_sdir_low_exclusive_fmt {                
626         /* The meaning of lower directory, exc    
627         unsigned short  sde_lo_ptr   : 6,         
628                         sde_lo_state : 3,         
629                         sde_lo_prio  : 1,         
630                         sde_lo_ax    : 1,         
631                         sde_lo_ecc   : 5;         
632 };                                                
633                                                   
634                                                   
635 typedef union md_sdir_low {                       
636         /* The 16 bits of standard directory,     
637         unsigned short  sd_lo_val;                
638         struct  md_sdir_low_exclusive_fmt sde_    
639         struct  md_sdir_low_shared_fmt sds_lo_    
640 }md_sdir_low_t;                                   
641                                                   
642                                                   
643                                                   
644 struct md_pdir_high_fmt {                         
645         u64     pd_hi_unused   : 16,              
646                 pd_hi_bvec     : 38,              
647                 pd_hi_unused1  : 3,               
648                 pd_hi_ecc      : 7;               
649 };                                                
650                                                   
651                                                   
652 typedef union md_pdir_high {                      
653         /* The 48 bits of standard directory,     
654         u64     pd_hi_val;                        
655         struct md_pdir_high_fmt pd_hi_fmt;        
656 }md_pdir_high_t;                                  
657                                                   
658                                                   
659 struct md_pdir_low_shared_fmt {                   
660         /* The meaning of lower directory, sha    
661         u64     pds_lo_unused   : 16,             
662                 pds_lo_bvec     : 26,             
663                 pds_lo_cnt      :  6,             
664                 pds_lo_state    :  3,             
665                 pds_lo_ste      :  1,             
666                 pds_lo_prio     :  4,             
667                 pds_lo_ax       :  1,             
668                 pds_lo_ecc      :  7;             
669 };                                                
670                                                   
671 struct md_pdir_low_exclusive_fmt {                
672         /* The meaning of lower directory, exc    
673         u64     pde_lo_unused   : 31,             
674                 pde_lo_ptr      : 11,             
675                 pde_lo_unused1  :  6,             
676                 pde_lo_state    :  3,             
677                 pde_lo_ste      :  1,             
678                 pde_lo_prio     :  4,             
679                 pde_lo_ax       :  1,             
680                 pde_lo_ecc      :  7;             
681 };                                                
682                                                   
683                                                   
684 typedef union md_pdir_loent {                     
685         /* The 48 bits of premium directory, l    
686         u64     pd_lo_val;                        
687         struct md_pdir_low_exclusive_fmt pde_l    
688         struct md_pdir_low_shared_fmt   pds_lo    
689 }md_pdir_low_t;                                   
690                                                   
691                                                   
692 /*                                                
693  *   the following two "union" definitions and    
694  *   "struct" definitions are used in vmdump.c    
695  *   represent directory memory information.      
696  */                                               
697                                                   
698 typedef union   md_dir_high     {                 
699         md_sdir_high_t  md_sdir_high;             
700         md_pdir_high_t  md_pdir_high;             
701 } md_dir_high_t;                                  
702                                                   
703 typedef union   md_dir_low      {                 
704         md_sdir_low_t   md_sdir_low;              
705         md_pdir_low_t   md_pdir_low;              
706 } md_dir_low_t;                                   
707                                                   
708 typedef struct  bddir_entry     {                 
709         md_dir_low_t    md_dir_low;               
710         md_dir_high_t   md_dir_high;              
711 } bddir_entry_t;                                  
712                                                   
713 typedef struct  dir_mem_entry   {                 
714         u64             prcpf[MAX_REGIONS];       
715         bddir_entry_t   directory_words[MD_PAG    
716 } dir_mem_entry_t;                                
717                                                   
718                                                   
719                                                   
720 typedef union md_perf_sel {                       
721         u64     perf_sel_reg;                     
722         struct  {                                 
723                 u64     perf_rsvd : 60,           
724                         perf_en   :  1,           
725                         perf_sel  :  3;           
726         } perf_sel_bits;                          
727 } md_perf_sel_t;                                  
728                                                   
729 typedef union md_perf_cnt {                       
730         u64     perf_cnt;                         
731         struct  {                                 
732                 u64     perf_rsvd : 44,           
733                         perf_cnt  : 20;           
734         } perf_cnt_bits;                          
735 } md_perf_cnt_t;                                  
736                                                   
737                                                   
738 #endif /* !__ASSEMBLY__ */                        
739                                                   
740                                                   
741 #define DIR_ERROR_VALID_MASK    0xe00000000000    
742 #define DIR_ERROR_VALID_SHFT    61                
743 #define DIR_ERROR_VALID_UCE     0x800000000000    
744 #define DIR_ERROR_VALID_AE      0x400000000000    
745 #define DIR_ERROR_VALID_CE      0x200000000000    
746                                                   
747 #define MEM_ERROR_VALID_MASK    0xc00000000000    
748 #define MEM_ERROR_VALID_SHFT    62                
749 #define MEM_ERROR_VALID_UCE     0x800000000000    
750 #define MEM_ERROR_VALID_CE      0x400000000000    
751                                                   
752 #define PROTO_ERROR_VALID_MASK  0x800000000000    
753                                                   
754 #define MISC_ERROR_VALID_MASK   0x3ff             
755                                                   
756 /*                                                
757  * Mask for hspec address that is stored in th    
758  * This represents bits 29 through 3.             
759  */                                               
760 #define DIR_ERR_HSPEC_MASK      0x3ffffff8        
761 #define ERROR_HSPEC_MASK        0x3ffffff8        
762 #define ERROR_HSPEC_SHFT        3                 
763 #define ERROR_ADDR_MASK         0xfffffff8        
764 #define ERROR_ADDR_SHFT         3                 
765                                                   
766 /*                                                
767  * MD_MISC_ERROR register defines.                
768  */                                               
769                                                   
770 #define MMCE_VALID_MASK         0x3ff             
771 #define MMCE_ILL_MSG_SHFT       8                 
772 #define MMCE_ILL_MSG_MASK       (UINT64_CAST 0    
773 #define MMCE_ILL_REV_SHFT       6                 
774 #define MMCE_ILL_REV_MASK       (UINT64_CAST 0    
775 #define MMCE_LONG_PACK_SHFT     4                 
776 #define MMCE_LONG_PACK_MASK     (UINT64_CAST 0    
777 #define MMCE_SHORT_PACK_SHFT    2                 
778 #define MMCE_SHORT_PACK_MASK    (UINT64_CAST 0    
779 #define MMCE_BAD_DATA_SHFT      0                 
780 #define MMCE_BAD_DATA_MASK      (UINT64_CAST 0    
781                                                   
782                                                   
783 #define MD_PERF_COUNTERS        6                 
784 #define MD_PERF_SETS            6                 
785                                                   
786 #define MEM_DIMM_MASK                             
787 #define MEM_DIMM_SHFT                             
788                                                   
789 #endif /* _ASM_SN_SN0_HUBMD_H */                  
790                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php