Subversion Repositories HelenOS

Rev

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

Rev 1857 Rev 1860
Line 89... Line 89...
89
       
89
       
90
        /*
90
        /*
91
         * Write kernel stack address to %g6 and a pointer to the last item
91
         * Write kernel stack address to %g6 and a pointer to the last item
92
         * in the userspace window buffer to %g7 in the alternate and interrupt sets.
92
         * in the userspace window buffer to %g7 in the alternate and interrupt sets.
93
         */
93
         */
94
        write_to_ig_g6((uintptr_t) THREAD->kstack + STACK_SIZE - STACK_BIAS);
94
        uint64_t sp = (uintptr_t) THREAD->kstack + STACK_SIZE
95
        write_to_ag_g6((uintptr_t) THREAD->kstack + STACK_SIZE - STACK_BIAS);
95
            - (STACK_BIAS + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT));
-
 
96
        write_to_ig_g6(sp);
-
 
97
        write_to_ag_g6(sp);
96
        write_to_ag_g7((uintptr_t) THREAD->arch.uspace_window_buffer);
98
        write_to_ag_g7((uintptr_t) THREAD->arch.uspace_window_buffer);
97
    }
99
    }
98
}
100
}
99
 
101
 
100
/** Perform sparc64 specific steps before a thread stops running.
102
/** Perform sparc64 specific steps before a thread stops running.