Subversion Repositories HelenOS-historic

Rev

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

Rev 1003 Rev 1022
Line 178... Line 178...
178
	sync
178
	sync
179
	isync
179
	isync
180
	blr
180
	blr
181
 
181
 
182
jump_to_kernel:
182
jump_to_kernel:
-
 
183
	
-
 
184
	# r3 = kernel_start (va)
-
 
185
	# r4 = memmap (pa)
-
 
186
	# r5 = real_mode (pa)
-
 
187
	
-
 
188
	mtspr srr0, r5
-
 
189
	
-
 
190
	# jumps to real_mode
-
 
191
	
-
 
192
	mfmsr r5
-
 
193
	lis r6, ~0@h
-
 
194
	ori r6, r6, ~(msr_ir | msr_dr)@l
-
 
195
	and r5, r5, r6
-
 
196
	mtspr srr1, r5
-
 
197
	rfi
-
 
198
 
-
 
199
.section REALMODE
-
 
200
.align 12
-
 
201
.global real_mode
-
 
202
 
-
 
203
real_mode:
-
 
204
 
-
 
205
	# fill segment registers
-
 
206
 
-
 
207
	li r5, 16
-
 
208
	mtctr r5
-
 
209
	li r5, 0
-
 
210
	li r6, 0
-
 
211
	
-
 
212
	seg_fill:
-
 
213
	
-
 
214
		mtsrin r6, r5
-
 
215
		addis r5, r5, 0x1000    # move to next SR
-
 
216
		addis r6, r6, 0x10      # add 256 MB, move to next SR
-
 
217
		
-
 
218
		bdnz seg_fill
-
 
219
	
-
 
220
	# bootstrap kernel
-
 
221
	#
-
 
222
	# r3 = kernel_start (va)
-
 
223
	# r4 = memmap (pa)       -> r10
-
 
224
	
-
 
225
	mtspr srr0, r3
-
 
226
	
-
 
227
	mfmsr r5
-
 
228
	ori r5, r5, (msr_ir | msr_dr)@l
-
 
229
	mtspr srr1, r5
-
 
230
	
183
	mr r10, r4
231
	mr r10, r4
184
	mtlr r3
-
 
185
	blr
232
	rfi