Subversion Repositories HelenOS-historic

Rev

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

Rev 1705 Rev 1742
Line 65... Line 65...
65
 
65
 
66
#define TLB_EXC ((char *) 0x80000000)
66
#define TLB_EXC ((char *) 0x80000000)
67
#define NORM_EXC ((char *) 0x80000180)
67
#define NORM_EXC ((char *) 0x80000180)
68
#define CACHE_EXC ((char *) 0x80000100)
68
#define CACHE_EXC ((char *) 0x80000100)
69
 
69
 
-
 
70
 
-
 
71
/* Why the linker moves the variable 64K away in assembler
-
 
72
 * when not in .text section ????????
-
 
73
 */
-
 
74
__address supervisor_sp __attribute__ ((section (".text")));
-
 
75
/* Stack pointer saved when entering user mode */
-
 
76
/* TODO: How do we do it on SMP system???? */
70
bootinfo_t bootinfo;
77
bootinfo_t bootinfo __attribute__ ((section (".text")));
71
 
78
 
72
void arch_pre_main(void)
79
void arch_pre_main(void)
73
{
80
{
74
    /* Setup usermode */
81
    /* Setup usermode */
75
    init.cnt = bootinfo.cnt;
82
    init.cnt = bootinfo.cnt;
Line 118... Line 125...
118
}
125
}
119
 
126
 
120
void arch_post_mm_init(void)
127
void arch_post_mm_init(void)
121
{
128
{
122
#ifdef CONFIG_FB
129
#ifdef CONFIG_FB
123
        fb_init(0x12000000, 640, 480, 24, 1920); // gxemul framebuffer
130
    fb_init(0x12000000, 640, 480, 24, 1920); // gxemul framebuffer
124
#endif
131
#endif
125
        sysinfo_set_item_val("machine." STRING(MACHINE),NULL,1);
132
    sysinfo_set_item_val("machine." STRING(MACHINE),NULL,1);
126
}
133
}
127
 
134
 
128
void arch_pre_smp_init(void)
135
void arch_pre_smp_init(void)
129
{
136
{
130
}
137
}
131
 
138
 
132
void arch_post_smp_init(void)
139
void arch_post_smp_init(void)
133
{
140
{
134
}
141
}
135
 
142
 
136
/* Stack pointer saved when entering user mode */
-
 
137
/* TODO: How do we do it on SMP system???? */
-
 
138
 
-
 
139
/* Why the linker moves the variable 64K away in assembler
-
 
140
 * when not in .text section ????????
-
 
141
 */
-
 
142
__address supervisor_sp __attribute__ ((section (".text")));
-
 
143
 
-
 
144
void userspace(uspace_arg_t *kernel_uarg)
143
void userspace(uspace_arg_t *kernel_uarg)
145
{
144
{
146
    /* EXL=1, UM=1, IE=1 */
145
    /* EXL=1, UM=1, IE=1 */
147
    cp0_status_write(cp0_status_read() | (cp0_status_exl_exception_bit |
146
    cp0_status_write(cp0_status_read() | (cp0_status_exl_exception_bit |
148
                          cp0_status_um_bit |
147
                          cp0_status_um_bit |