Subversion Repositories HelenOS

Rev

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

Rev 2341 Rev 2355
Line 48... Line 48...
48
#include <arch/regutils.h>
48
#include <arch/regutils.h>
49
#include <arch/machine.h>
49
#include <arch/machine.h>
50
#include <userspace.h>
50
#include <userspace.h>
51
 
51
 
52
bootinfo_t bootinfo;
52
bootinfo_t bootinfo;
53
// // uintptr_t supervisor_sp /*__attribute__ ((section (".text")))*/;
-
 
54
extern uintptr_t supervisor_sp;
53
extern uintptr_t supervisor_sp;
55
 
54
 
56
 
55
 
57
void arch_pre_main(void)
56
void arch_pre_main(void)
58
{
57
{
Line 70... Line 69...
70
 
69
 
71
void arch_pre_mm_init(void)
70
void arch_pre_mm_init(void)
72
{
71
{
73
    /* It is not assumed by default */
72
    /* It is not assumed by default */
74
    interrupts_disable();
73
    interrupts_disable();
75
 
-
 
76
    setup_exception_stacks();
-
 
77
}
74
}
78
 
75
 
79
 
76
 
80
void arch_post_mm_init(void)
77
void arch_post_mm_init(void)
81
{
78
{
Line 155... Line 152...
155
 *
152
 *
156
 *  @param kernel_uarg   Userspace settings (entry point, stack, ...).
153
 *  @param kernel_uarg   Userspace settings (entry point, stack, ...).
157
 */
154
 */
158
void userspace(uspace_arg_t *kernel_uarg)
155
void userspace(uspace_arg_t *kernel_uarg)
159
{
156
{
160
    dprintf("Userspace:  .uspace_uarg(%X), .uspace_entry(%X), .uspace_stack(%X)\n",
157
    // dprintf("Userspace:  .uspace_uarg(%X), .uspace_entry(%X), .uspace_stack(%X)\n",
161
        (unsigned int)(kernel_uarg->uspace_uarg), kernel_uarg->uspace_entry,
158
    //  (unsigned int)(kernel_uarg->uspace_uarg), kernel_uarg->uspace_entry,
162
        kernel_uarg->uspace_stack);
159
    //  kernel_uarg->uspace_stack);
163
 
160
 
164
    volatile ustate_t ustate;
161
    volatile ustate_t ustate;
165
 
162
 
166
    // set first parameter
163
    // set first parameter
167
    ustate.r0 = (uintptr_t) kernel_uarg->uspace_uarg;
164
    ustate.r0 = (uintptr_t) kernel_uarg->uspace_uarg;