Subversion Repositories HelenOS

Rev

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

Rev 3672 Rev 3880
Line 109... Line 109...
109
     * Switch to BEV normal level so that exception vectors point to the
109
     * Switch to BEV normal level so that exception vectors point to the
110
     * kernel. Clear the error level.
110
     * kernel. Clear the error level.
111
     */
111
     */
112
    cp0_status_write(cp0_status_read() &
112
    cp0_status_write(cp0_status_read() &
113
        ~(cp0_status_bev_bootstrap_bit | cp0_status_erl_error_bit));
113
        ~(cp0_status_bev_bootstrap_bit | cp0_status_erl_error_bit));
114
 
114
   
115
    /*
115
    /*
116
     * Mask all interrupts
116
     * Mask all interrupts
117
     */
117
     */
118
    cp0_mask_all_int();
118
    cp0_mask_all_int();
119
       
119
   
120
    debugger_init();
120
    debugger_init();
121
}
121
}
122
 
122
 
123
void arch_post_mm_init(void)
123
void arch_post_mm_init(void)
124
{
124
{
Line 130... Line 130...
130
        .addr = 0x12000000,
130
        .addr = 0x12000000,
131
        .offset = 0,
131
        .offset = 0,
132
        .x = 640,
132
        .x = 640,
133
        .y = 480,
133
        .y = 480,
134
        .scan = 1920,
134
        .scan = 1920,
135
        .visual = VISUAL_RGB_8_8_8,
135
        .visual = VISUAL_BGR_8_8_8,
136
    };
136
    };
137
    fb_init(&gxemul_prop);
137
    fb_init(&gxemul_prop);
138
#endif
138
#endif
-
 
139
 
-
 
140
#ifdef msim
-
 
141
    sysinfo_set_item_val("machine.msim", NULL, 1);
-
 
142
#endif
-
 
143
 
-
 
144
#ifdef simics
-
 
145
    sysinfo_set_item_val("machine.simics", NULL, 1);
-
 
146
#endif
-
 
147
 
-
 
148
#ifdef bgxemul
139
    sysinfo_set_item_val("machine." STRING(MACHINE), NULL, 1);
149
    sysinfo_set_item_val("machine.bgxemul", NULL, 1);
-
 
150
#endif
-
 
151
 
-
 
152
#ifdef lgxemul
-
 
153
    sysinfo_set_item_val("machine.lgxemul", NULL, 1);
-
 
154
#endif
140
}
155
}
141
 
156
 
142
void arch_post_cpu_init(void)
157
void arch_post_cpu_init(void)
143
{
158
{
144
}
159
}
Line 159... Line 174...
159
    cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry);
174
    cp0_epc_write((uintptr_t) kernel_uarg->uspace_entry);
160
    userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + PAGE_SIZE),
175
    userspace_asm(((uintptr_t) kernel_uarg->uspace_stack + PAGE_SIZE),
161
        (uintptr_t) kernel_uarg->uspace_uarg,
176
        (uintptr_t) kernel_uarg->uspace_uarg,
162
        (uintptr_t) kernel_uarg->uspace_entry);
177
        (uintptr_t) kernel_uarg->uspace_entry);
163
   
178
   
164
    while (1)
179
    while (1);
165
        ;
-
 
166
}
180
}
167
 
181
 
168
/** Perform mips32 specific tasks needed before the new task is run. */
182
/** Perform mips32 specific tasks needed before the new task is run. */
169
void before_task_runs_arch(void)
183
void before_task_runs_arch(void)
170
{
184
{
Line 193... Line 207...
193
 
207
 
194
void arch_reboot(void)
208
void arch_reboot(void)
195
{
209
{
196
    ___halt();
210
    ___halt();
197
   
211
   
198
    while (1)
212
    while (1);
-
 
213
}
-
 
214
 
-
 
215
/** Construct function pointer
-
 
216
 *
-
 
217
 * @param fptr   function pointer structure
-
 
218
 * @param addr   function address
-
 
219
 * @param caller calling function address
-
 
220
 *
-
 
221
 * @return address of the function pointer
-
 
222
 *
199
        ;
223
 */
-
 
224
void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller)
-
 
225
{
-
 
226
    return addr;
200
}
227
}
201
 
228
 
202
/** @}
229
/** @}
203
 */
230
 */