Subversion Repositories HelenOS-historic

Rev

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

Rev 919 Rev 938
Line 64... Line 64...
64
void arch_post_smp_init(void)
64
void arch_post_smp_init(void)
65
{
65
{
66
}
66
}
67
 
67
 
68
/** Enter userspace and never return. */
68
/** Enter userspace and never return. */
69
void userspace(void)
69
void userspace(__address entry)
70
{
70
{
71
    psr_t psr;
71
    psr_t psr;
72
    rsc_t rsc;
72
    rsc_t rsc;
73
 
73
 
74
    psr.value = psr_read();
74
    psr.value = psr_read();
Line 81... Line 81...
81
    rsc.loadrs = 0;
81
    rsc.loadrs = 0;
82
    rsc.be = false;
82
    rsc.be = false;
83
    rsc.pl = PL_USER;
83
    rsc.pl = PL_USER;
84
    rsc.mode = 3;               /* eager mode */
84
    rsc.mode = 3;               /* eager mode */
85
 
85
 
86
    switch_to_userspace(UTEXT_ADDRESS, USTACK_ADDRESS+PAGE_SIZE-1, USTACK_ADDRESS, psr.value, rsc.value);
86
    switch_to_userspace(entry, USTACK_ADDRESS+PAGE_SIZE-1, USTACK_ADDRESS, psr.value, rsc.value);
87
 
87
 
88
    while (1) {
88
    while (1) {
89
        ;
89
        ;
90
    }
90
    }
91
}
91
}