Subversion Repositories HelenOS

Rev

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

Rev 3827 Rev 3855
Line 27... Line 27...
27
#
27
#
28
 
28
 
29
#include "asm.h"
29
#include "asm.h"
30
#include "regname.h"
30
#include "regname.h"
31
 
31
 
-
 
32
.macro FLUSH_CACHE addr
-
 
33
	dcbst 0, \addr
-
 
34
	sync
-
 
35
	icbi 0, \addr
-
 
36
	isync
-
 
37
.endm
-
 
38
 
32
.text
39
.text
33
 
40
 
34
.global halt
41
.global halt
35
.global memcpy
42
.global memcpy
36
.global jump_to_kernel
43
.global jump_to_kernel
Line 162... Line 169...
162
		copy_loop:
169
		copy_loop:
163
			
170
			
164
			lwz r28, 0(r29)
171
			lwz r28, 0(r29)
165
			stw r28, 0(r30)
172
			stw r28, 0(r30)
166
			
173
			
-
 
174
			FLUSH_CACHE r30
-
 
175
			
167
			addi r29, r29, 4
176
			addi r29, r29, 4
168
			addi r30, r30, 4
177
			addi r30, r30, 4
169
			subi r6, r6, 4
178
			subi r6, r6, 4
170
			
179
			
171
			cmpwi r6, 0
180
			cmpwi r6, 0
Line 183... Line 192...
183
	li r31, 0
192
	li r31, 0
184
	
193
	
185
	li r29, 8
194
	li r29, 8
186
	mtctr r29
195
	mtctr r29
187
	li r30, 0                     # ASID 0 (VSIDs 0 .. 7)
196
	li r30, 0                     # ASID 0 (VSIDs 0 .. 7)
188
 
197
	
189
	seg_fill_uspace:
198
	seg_fill_uspace:
190
	
199
	
191
		mtsrin r30, r31
200
		mtsrin r30, r31
192
		addi r30, r30, 1
201
		addi r30, r30, 1
193
		addis r31, r31, 0x1000    # move to next SR
202
		addis r31, r31, 0x1000    # move to next SR
Line 257... Line 266...
257
	pht_clear:
266
	pht_clear:
258
		
267
		
259
		# write zeroes
268
		# write zeroes
260
		
269
		
261
		stw r29, 0(r31)
270
		stw r29, 0(r31)
-
 
271
		FLUSH_CACHE r31
262
		
272
		
263
		addi r31, r31, 4
273
		addi r31, r31, 4
264
		subi r30, r30, 4
274
		subi r30, r30, 4
265
		
275
		
266
		cmpwi r30, 0
276
		cmpwi r30, 0