Subversion Repositories HelenOS

Rev

Rev 3403 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3403 Rev 3674
Line 103... Line 103...
103
	/*
103
	/*
104
	 * We have copied code and now we need to guarantee cache coherence.
104
	 * We have copied code and now we need to guarantee cache coherence.
105
	 * 1. Make sure that the code we have moved has drained to main memory.
105
	 * 1. Make sure that the code we have moved has drained to main memory.
106
	 * 2. Invalidate I-cache.
106
	 * 2. Invalidate I-cache.
107
	 * 3. Flush instruction pipeline.
107
	 * 3. Flush instruction pipeline.
108
	 */ 
108
	 */
-
 
109
 
-
 
110
	/*
-
 
111
	 * US3 processors have a write-invalidate cache, so explicitly
-
 
112
	 * invalidating it is not required. Whether to invalidate I-cache
-
 
113
	 * or not is decided according to the value of the global
-
 
114
	 * "subarchitecture" variable (set in the bootstrap).
-
 
115
	 */
-
 
116
	set subarchitecture, %g2
-
 
117
	ldub [%g2], %g2
-
 
118
	cmp %g2, 3
-
 
119
	be 1f
-
 
120
	nop
-
 
121
0:
109
	call	icache_flush
122
	call icache_flush
-
 
123
	nop
-
 
124
1:
110
	membar	#StoreStore
125
	membar #StoreStore
-
 
126
	
-
 
127
	/*
-
 
128
	 * Flush the instruction pipeline.
-
 
129
	 */
111
	flush	%i7
130
	flush	%i7
112
 
131
 
113
	mov %o0, %l1
132
	mov %o0, %l1
114
	mov %o1, %o0
133
	mov %o1, %o0
115
	mov %o2, %o1
134
	mov %o2, %o1
Line 132... Line 151...
132
	stxa	%g0, [%g1] ASI_ICACHE_TAG
151
	stxa	%g0, [%g1] ASI_ICACHE_TAG
133
	membar	#Sync
152
	membar	#Sync
134
	retl
153
	retl
135
	! SF Erratum #51
154
	! SF Erratum #51
136
	nop
155
	nop
137
 
-
 
138
.global ofw
156
.global ofw
139
ofw:
157
ofw:
140
	save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
158
	save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
141
	set ofw_cif, %l0
159
	set ofw_cif, %l0
142
	ldx [%l0], %l0
160
	ldx [%l0], %l0