Subversion Repositories HelenOS-historic

Rev

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

Rev 1037 Rev 1066
Line 118... Line 118...
118
/* Why the linker moves the variable 64K away in assembler
118
/* Why the linker moves the variable 64K away in assembler
119
 * when not in .text section ????????
119
 * when not in .text section ????????
120
 */
120
 */
121
__address supervisor_sp __attribute__ ((section (".text")));
121
__address supervisor_sp __attribute__ ((section (".text")));
122
 
122
 
123
void userspace(__address entry)
123
void userspace(uspace_arg_t *uarg)
124
{
124
{
125
    /* EXL=1, UM=1, IE=1 */
125
    /* EXL=1, UM=1, IE=1 */
126
    cp0_status_write(cp0_status_read() | (cp0_status_exl_exception_bit |
126
    cp0_status_write(cp0_status_read() | (cp0_status_exl_exception_bit |
127
                          cp0_status_um_bit |
127
                          cp0_status_um_bit |
128
                          cp0_status_ie_enabled_bit));
128
                          cp0_status_ie_enabled_bit));
129
    cp0_epc_write(entry);
129
    cp0_epc_write(uarg->uspace_entry);
130
    userspace_asm(USTACK_ADDRESS+PAGE_SIZE);
130
    userspace_asm(uarg->uspace_stack+PAGE_SIZE);
131
    while (1)
131
    while (1)
132
        ;
132
        ;
133
}
133
}
134
 
134
 
135
void before_thread_runs_arch(void)
135
void before_thread_runs_arch(void)