Rev 3855 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3855 | Rev 3856 | ||
---|---|---|---|
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 |
32 | .macro SMC_COHERENCY addr |
33 | dcbst 0, \addr |
33 | dcbst 0, \addr |
34 | sync |
34 | sync |
35 | icbi 0, \addr |
35 | icbi 0, \addr |
- | 36 | sync |
|
36 | isync |
37 | isync |
37 | .endm |
38 | .endm |
38 | 39 | ||
- | 40 | .macro FLUSH_DCACHE addr |
|
- | 41 | dcbst 0, \addr |
|
- | 42 | sync |
|
- | 43 | isync |
|
- | 44 | .endm |
|
- | 45 | ||
- | 46 | .macro TLB_FLUSH reg |
|
- | 47 | tlbie \reg |
|
- | 48 | addi \reg, \reg, 0x1000 |
|
- | 49 | .endm |
|
- | 50 | ||
39 | .text |
51 | .text |
40 | 52 | ||
41 | .global halt |
53 | .global halt |
42 | .global memcpy |
54 | .global memcpy |
43 | .global jump_to_kernel |
55 | .global jump_to_kernel |
Line 169... | Line 181... | ||
169 | copy_loop: |
181 | copy_loop: |
170 | 182 | ||
171 | lwz r28, 0(r29) |
183 | lwz r28, 0(r29) |
172 | stw r28, 0(r30) |
184 | stw r28, 0(r30) |
173 | 185 | ||
174 | FLUSH_CACHE r30 |
186 | SMC_COHERENCY r30 |
175 | 187 | ||
176 | addi r29, r29, 4 |
188 | addi r29, r29, 4 |
177 | addi r30, r30, 4 |
189 | addi r30, r30, 4 |
178 | subi r6, r6, 4 |
190 | subi r6, r6, 4 |
179 | 191 | ||
Line 266... | Line 278... | ||
266 | pht_clear: |
278 | pht_clear: |
267 | 279 | ||
268 | # write zeroes |
280 | # write zeroes |
269 | 281 | ||
270 | stw r29, 0(r31) |
282 | stw r29, 0(r31) |
271 | FLUSH_CACHE r31 |
283 | FLUSH_DCACHE r31 |
272 | 284 | ||
273 | addi r31, r31, 4 |
285 | addi r31, r31, 4 |
274 | subi r30, r30, 4 |
286 | subi r30, r30, 4 |
275 | 287 | ||
276 | cmpwi r30, 0 |
288 | cmpwi r30, 0 |
Line 326... | Line 338... | ||
326 | 338 | ||
327 | no_bat: |
339 | no_bat: |
328 | 340 | ||
329 | #endif |
341 | #endif |
330 | 342 | ||
- | 343 | # flush TLB |
|
- | 344 | ||
- | 345 | li r31, 0 |
|
- | 346 | sync |
|
- | 347 | ||
- | 348 | TLB_FLUSH r31 |
|
- | 349 | TLB_FLUSH r31 |
|
- | 350 | TLB_FLUSH r31 |
|
- | 351 | TLB_FLUSH r31 |
|
- | 352 | TLB_FLUSH r31 |
|
- | 353 | TLB_FLUSH r31 |
|
- | 354 | TLB_FLUSH r31 |
|
- | 355 | TLB_FLUSH r31 |
|
- | 356 | ||
- | 357 | TLB_FLUSH r31 |
|
- | 358 | TLB_FLUSH r31 |
|
- | 359 | TLB_FLUSH r31 |
|
- | 360 | TLB_FLUSH r31 |
|
- | 361 | TLB_FLUSH r31 |
|
- | 362 | TLB_FLUSH r31 |
|
- | 363 | TLB_FLUSH r31 |
|
- | 364 | TLB_FLUSH r31 |
|
- | 365 | ||
- | 366 | TLB_FLUSH r31 |
|
- | 367 | TLB_FLUSH r31 |
|
- | 368 | TLB_FLUSH r31 |
|
- | 369 | TLB_FLUSH r31 |
|
- | 370 | TLB_FLUSH r31 |
|
- | 371 | TLB_FLUSH r31 |
|
- | 372 | TLB_FLUSH r31 |
|
- | 373 | TLB_FLUSH r31 |
|
- | 374 | ||
- | 375 | TLB_FLUSH r31 |
|
- | 376 | TLB_FLUSH r31 |
|
- | 377 | TLB_FLUSH r31 |
|
- | 378 | TLB_FLUSH r31 |
|
- | 379 | TLB_FLUSH r31 |
|
- | 380 | TLB_FLUSH r31 |
|
- | 381 | TLB_FLUSH r31 |
|
- | 382 | TLB_FLUSH r31 |
|
- | 383 | ||
- | 384 | TLB_FLUSH r31 |
|
- | 385 | TLB_FLUSH r31 |
|
- | 386 | TLB_FLUSH r31 |
|
- | 387 | TLB_FLUSH r31 |
|
- | 388 | TLB_FLUSH r31 |
|
- | 389 | TLB_FLUSH r31 |
|
- | 390 | TLB_FLUSH r31 |
|
- | 391 | TLB_FLUSH r31 |
|
- | 392 | ||
- | 393 | TLB_FLUSH r31 |
|
- | 394 | TLB_FLUSH r31 |
|
- | 395 | TLB_FLUSH r31 |
|
- | 396 | TLB_FLUSH r31 |
|
- | 397 | TLB_FLUSH r31 |
|
- | 398 | TLB_FLUSH r31 |
|
- | 399 | TLB_FLUSH r31 |
|
- | 400 | TLB_FLUSH r31 |
|
- | 401 | ||
- | 402 | TLB_FLUSH r31 |
|
- | 403 | TLB_FLUSH r31 |
|
- | 404 | TLB_FLUSH r31 |
|
- | 405 | TLB_FLUSH r31 |
|
- | 406 | TLB_FLUSH r31 |
|
- | 407 | TLB_FLUSH r31 |
|
- | 408 | TLB_FLUSH r31 |
|
- | 409 | TLB_FLUSH r31 |
|
- | 410 | ||
- | 411 | TLB_FLUSH r31 |
|
- | 412 | TLB_FLUSH r31 |
|
- | 413 | TLB_FLUSH r31 |
|
- | 414 | TLB_FLUSH r31 |
|
- | 415 | TLB_FLUSH r31 |
|
- | 416 | TLB_FLUSH r31 |
|
- | 417 | TLB_FLUSH r31 |
|
- | 418 | TLB_FLUSH r31 |
|
- | 419 | ||
- | 420 | eieio |
|
331 | tlbsync |
421 | tlbsync |
- | 422 | sync |
|
332 | 423 | ||
333 | # start the kernel |
424 | # start the kernel |
334 | # |
425 | # |
335 | # pc = KERNEL_START_ADDR |
426 | # pc = KERNEL_START_ADDR |
336 | # r3 = bootinfo (pa) |
427 | # r3 = bootinfo (pa) |