Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: schizo_stc.h | |
5 | * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. | |
6 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES. | |
7 | * | |
8 | * The above named program is free software; you can redistribute it and/or | |
9 | * modify it under the terms of the GNU General Public | |
10 | * License version 2 as published by the Free Software Foundation. | |
11 | * | |
12 | * The above named program is distributed in the hope that it will be | |
13 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | * General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU General Public | |
18 | * License along with this work; if not, write to the Free Software | |
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | |
20 | * | |
21 | * ========== Copyright Header End ============================================ | |
22 | */ | |
23 | // | |
24 | // Copyright (C) 1991, Sun Microsystems, Inc. | |
25 | // | |
26 | #ifndef _SCHIZO_STC_H | |
27 | #define _SCHIZO_STC_H | |
28 | ||
29 | #pragma ident "@(#)1.1 01/08/23 schizo_stc.h" | |
30 | ||
31 | #define NUM_STC_ENTRIES 16 | |
32 | #define LWORDS_PER_ENTRY 8 | |
33 | ||
34 | typedef struct s_stc_cntrl { | |
35 | uint32_t rsvd1:32; // [63:32] reserved, read as zero | |
36 | uint32_t rsvd2:24; // [31:08] reserved, read as zero | |
37 | uint32_t lru_lptr:4; // [07:04] lru lock pointer | |
38 | uint32_t lru_le:1; // [03] lru lock enable | |
39 | uint32_t rr_dis:1; // [02] rerun disable | |
40 | uint32_t stcdiag:1; // [01] diag mode enable | |
41 | uint32_t stcen:1; // [00] streaming cache enable | |
42 | } s_stc_cntrl; | |
43 | ||
44 | typedef union u_stc_cntrl { | |
45 | s_stc_cntrl s; | |
46 | uint64_t l; | |
47 | } u_stc_cntrl; | |
48 | ||
49 | typedef struct s_stc_flush { | |
50 | uint32_t rsvd1:32; // not used | |
51 | uint32_t stcpgfsh:19; // [31:13] 8K virtual pg to be inv/flh | |
52 | uint32_t rsvd2:13; // [12:00] ignored | |
53 | } s_stc_flush; | |
54 | ||
55 | typedef union u_stc_flush { | |
56 | s_stc_flush s; | |
57 | uint64_t l; | |
58 | } u_stc_flush; | |
59 | ||
60 | typedef struct s_stc_flsync { | |
61 | uint32_t rsvd1:21; // [63:43] not used | |
62 | uint32_t stcsynch1:11; // [42:32] Word aligned upper_PA for syn | |
63 | uint32_t stcsynch2:26; // [31:06] Word aligned lower_PA for syn | |
64 | uint32_t rsvd2:6; // [05:00] ignored | |
65 | } s_stc_flsync; | |
66 | ||
67 | typedef union u_stc_flsync { | |
68 | s_stc_flsync s; | |
69 | uint64_t l; | |
70 | } u_stc_flsync; | |
71 | ||
72 | typedef struct s_stc_data_diag { | |
73 | uint32_t stcdrda_hi:32; | |
74 | uint32_t stcdrda_lo:32; | |
75 | } s_stc_data_diag; | |
76 | ||
77 | typedef union u_stc_data_diag { | |
78 | s_stc_data_diag s; | |
79 | uint64_t l; | |
80 | } u_stc_data_diag; | |
81 | ||
82 | typedef struct s_stc_ptag_diag { | |
83 | uint32_t rsvd2:16; // not used | |
84 | uint32_t stcptpa_hi:16; // PPN as an 8kpage | |
85 | uint32_t stcptpa_lo:11; // PPN as an 8kpage | |
86 | uint32_t stcptva:19; // VPN as an 8kpage | |
87 | uint32_t rsvd1:11; // not used | |
88 | uint32_t stcptvd:1; // VAlid bit for page | |
89 | uint32_t stcptrd:1; // Read/write bit for page | |
90 | } s_stc_ptag_diag; | |
91 | ||
92 | typedef union u_stc_ptag_diag { | |
93 | s_stc_ptag_diag s; | |
94 | uint64_t l; | |
95 | } u_stc_ptag_diag; | |
96 | ||
97 | typedef struct s_stc_ltag_diag { | |
98 | uint32_t rsvd1:32; //not used | |
99 | uint32_t rsvd2:8; //not used | |
100 | uint32_t lru:4; // entries lru value | |
101 | uint32_t stcltsp:6; //start pointer for dirty data | |
102 | uint32_t stcltla:7; //line addr for this entry | |
103 | uint32_t stcltep:6; //end pointer for dirty data | |
104 | uint32_t stcltvd:1; //valid bit for line | |
105 | uint32_t stcltfh:1; //fetch outstanding/flush necessary | |
106 | } s_stc_ltag_diag; | |
107 | ||
108 | typedef union u_stc_ltag_diag { | |
109 | s_stc_ltag_diag s; | |
110 | uint64_t l; | |
111 | } u_stc_ltag_diag; | |
112 | ||
113 | typedef struct s_stc_cntx_mtch_diag { | |
114 | uint32_t hit:1; | |
115 | uint32_t rsvd1:31; | |
116 | uint32_t rsvd2:16; | |
117 | uint32_t match:16; | |
118 | } s_stc_cntx_mtch_diag; | |
119 | ||
120 | typedef union u_stc_cntx_mtch_diag { | |
121 | s_stc_cntx_mtch_diag s; | |
122 | uint64_t l; | |
123 | } u_stc_cntx_mtch_diag; | |
124 | ||
125 | typedef struct s_stc_error_diag { | |
126 | uint32_t rsvd1:32; // not used | |
127 | uint32_t rsvd2:31; // not used | |
128 | uint32_t stcdrer:1; // upa_read reply error bit | |
129 | } s_stc_error_diag; | |
130 | ||
131 | typedef union u_stc_error_diag { | |
132 | s_stc_error_diag s; | |
133 | uint64_t l; | |
134 | } u_stc_error_diag; | |
135 | ||
136 | #endif //_PSYCHO_STC_H |