Changeset cfa70add in mainline for kernel/arch/sparc64/src/trap/trap_table.S
- Timestamp:
- 2006-09-03T23:37:14Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fd85ae5
- Parents:
- 002e613
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/trap/trap_table.S
r002e613 rcfa70add 219 219 SPILL_TO_USPACE_WINDOW_BUFFER 220 220 221 /* TT = 0xa0, TL = 0, spill_0_other handler */ 222 .org trap_table + TT_SPILL_0_OTHER*ENTRY_SIZE 223 .global spill_0_other 224 spill_0_other: 225 SPILL_TO_USPACE_WINDOW_BUFFER 226 221 227 /* TT = 0xc0, TL = 0, fill_0_normal handler */ 222 228 .org trap_table + TT_FILL_0_NORMAL*ENTRY_SIZE … … 548 554 549 555 /* 550 * Mark the CAN SAVE windows as OTHER windows.556 * Mark the CANRESTORE windows as OTHER windows. 551 557 * Set CLEANWIN to NWINDOW-1 so that clean_window traps do not occur. 552 558 */ 553 rdpr %can save, %l0559 rdpr %canrestore, %l0 554 560 wrpr %l0, %otherwin 555 wrpr %g0, %can save561 wrpr %g0, %canrestore 556 562 wrpr %g0, NWINDOW - 1, %cleanwin 557 563 … … 642 648 /* 643 649 * If OTHERWIN is zero, then all the userspace windows have been 644 * spilled to kernel memory (i.e. register window buffer). If 645 * OTHERWIN is non-zero, then some userspace windows are still 650 * spilled to kernel memory (i.e. register window buffer). Moreover, 651 * if the scheduler was called in the meantime, all valid windows 652 * belonging to other threads were spilled by context_restore(). 653 * If OTHERWIN is non-zero, then some userspace windows are still 646 654 * valid. Others might have been spilled. However, the CWP pointer 647 655 * needs no fixing because the scheduler had not been called. … … 660 668 and %g1, TSTATE_CWP_MASK, %l0 661 669 inc %l0 662 and %l0, TSTATE_CWP_MASK, %l0 ! %l0 mod NWINDOW670 and %l0, NWINDOW - 1, %l0 ! %l0 mod NWINDOW 663 671 rdpr %cwp, %l1 664 672 cmp %l0, %l1 … … 668 676 /* 669 677 * Fix CWP. 670 * Just for reminder, the input registers in the current window671 * are the output registers of the window to which we want to672 * restore. Because the fill trap fills only input and local678 * In order to recapitulate, the input registers in the current 679 * window are the output registers of the window to which we want 680 * to restore. Because the fill trap fills only input and local 673 681 * registers of a window, we need to preserve those output 674 682 * registers manually. 675 683 */ 676 flushw677 684 mov %sp, %g2 678 685 stx %i0, [%sp + PREEMPTIBLE_HANDLER_STACK_FRAME_SIZE + STACK_BIAS + SAVED_I0] … … 739 746 */ 740 747 clr %g4 741 0: andcc %g7, PAGE_WIDTH - 1, %g0 ! PAGE_SIZE alignment check 748 set PAGE_SIZE - 1, %g5 749 0: andcc %g7, %g5, %g0 ! PAGE_SIZE alignment check 742 750 bz 0f ! %g7 is page-aligned, no more windows to refill 743 751 nop
Note:
See TracChangeset
for help on using the changeset viewer.