Subversion Repositories HelenOS

Rev

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

Rev 1878 Rev 1879
Line 90... Line 90...
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
        uint64_t sp = (uintptr_t) THREAD->kstack + STACK_SIZE
94
        uint64_t sp = (uintptr_t) THREAD->kstack + STACK_SIZE
95
            - (STACK_BIAS + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT) + STACK_WINDOW_SAVE_AREA_SIZE);
95
            - (STACK_BIAS + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT));
96
        write_to_ig_g6(sp);
96
        write_to_ig_g6(sp);
97
        write_to_ag_g6(sp);
97
        write_to_ag_g6(sp);
98
        write_to_ag_g7((uintptr_t) THREAD->arch.uspace_window_buffer);
98
        write_to_ag_g7((uintptr_t) THREAD->arch.uspace_window_buffer);
99
    }
99
    }
100
}
100
}