RCS file: /home/cvspserver/SMP_Repository/rtems-smp/cpukit/score/cpu/sparc/cpu_asm.S,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 cpu_asm.S
|
|
|
336 | 336 | * |
337 | 337 | * This routine is only used to switch to the first task on a |
338 | 338 | * secondary core in an SMP configuration. We do not need to |
339 | | * flush all the windows and, in fact, this can be dangerous |
| 339 | * flush any windows and, in fact, this can be dangerous |
340 | 340 | * as they may or may not be initialized properly. So we just |
341 | 341 | * reinitialize the PSR and WIM. |
342 | 342 | */ |
343 | 343 | PUBLIC(_CPU_Context_switch_to_first_task_smp) |
344 | 344 | SYM(_CPU_Context_switch_to_first_task_smp): |
345 | | save %sp, -CPU_MINIMUM_STACK_FRAME_SIZE, %sp |
346 | | |
347 | | mov %psr, %g1 ! Initialize WIM |
348 | | add %g1, 1, %g2 |
349 | | and %g2, 0x7, %g2 |
350 | | set 1, %g3 |
351 | | sll %g3, %g2, %g3 |
352 | | mov %g3, %wim |
353 | | ba done_flushing |
354 | | mov %i0, %o1 ! in the delay slot |
| 345 | mov %psr, %g1 ! Turn of traps when modifying WIM |
| 346 | andn %g1, SPARC_PSR_ET_MASK, %g1 |
| 347 | mov %g1, %psr |
| 348 | /* WIM and PSR will be set in done_flushing, it need args: |
| 349 | * g1=PSR, g3=CWP, o1=Context |
| 350 | */ |
| 351 | and %g1, SPARC_NUMBER_OF_REGISTER_WINDOWS - 1, %g3 |
| 352 | nop |
| 353 | mov %o0, %o1 ! in the delay slot |
| 354 | ba,a done_flushing |
355 | 355 | #endif |
356 | 356 | |
357 | 357 | /* end of file */ |