Subversion Repositories HelenOS

Rev

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

Rev 2049 Rev 2054
Line 92... Line 92...
92
            dtlb_insert_mapping(uw_buf, KA2PA(uw_buf), PAGESIZE_8K,
92
            dtlb_insert_mapping(uw_buf, KA2PA(uw_buf), PAGESIZE_8K,
93
                true, true);
93
                true, true);
94
        }
94
        }
95
       
95
       
96
        /*
96
        /*
97
         * Write kernel stack address to %g6 and a pointer to the last
97
         * Write kernel stack address to %g6 of the alternate and
-
 
98
         * interrupt global sets.
-
 
99
         *
-
 
100
         * Write pointer to the last item in the userspace window buffer
98
         * item in the userspace window buffer to %g7 in the alternate
101
         * to %g7 in the alternate set. Write to the interrupt %g7 is
99
         * and interrupt sets.
102
         * not necessary because:
-
 
103
         * - spill traps operate only in the alternate global set,
-
 
104
         * - preemptible trap handler switches to alternate globals
-
 
105
         *   before it explicitly uses %g7.
100
         */
106
         */
101
        uint64_t sp = (uintptr_t) THREAD->kstack + STACK_SIZE
107
        uint64_t sp = (uintptr_t) THREAD->kstack + STACK_SIZE
102
            - (STACK_BIAS + ALIGN_UP(STACK_ITEM_SIZE,
108
            - (STACK_BIAS + ALIGN_UP(STACK_ITEM_SIZE,
103
            STACK_ALIGNMENT));
109
            STACK_ALIGNMENT));
104
        write_to_ig_g6(sp);
110
        write_to_ig_g6(sp);
Line 107... Line 113...
107
    }
113
    }
108
}
114
}
109
 
115
 
110
/** Perform sparc64 specific steps before a thread stops running.
116
/** Perform sparc64 specific steps before a thread stops running.
111
 *
117
 *
112
 * Demap any locked DTLB entries isntalled by the thread (i.e. kernel stack
118
 * Demap any locked DTLB entries installed by the thread (i.e. kernel stack
113
 * and userspace window buffer).
119
 * and userspace window buffer).
114
 */
120
 */
115
void after_thread_ran_arch(void)
121
void after_thread_ran_arch(void)
116
{
122
{
117
    uintptr_t base;
123
    uintptr_t base;