Subversion Repositories HelenOS

Rev

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

Rev 2465 Rev 2611
Line 212... Line 212...
212
static void install_handler (unsigned handler_addr, unsigned* vector)
212
static void install_handler (unsigned handler_addr, unsigned* vector)
213
{
213
{
214
    /* relative address (related to exc. vector) of the word
214
    /* relative address (related to exc. vector) of the word
215
     * where handler's address is stored
215
     * where handler's address is stored
216
    */
216
    */
217
    volatile uint32_t handler_address_ptr = EXC_VECTORS_SIZE - PREFETCH_OFFSET;
217
    volatile uint32_t handler_address_ptr = EXC_VECTORS_SIZE -
-
 
218
        PREFETCH_OFFSET;
218
   
219
   
219
    /* make it LDR instruction and store at exception vector */
220
    /* make it LDR instruction and store at exception vector */
220
    *vector = handler_address_ptr | LDR_OPCODE;
221
    *vector = handler_address_ptr | LDR_OPCODE;
221
   
222
   
222
    /* store handler's address */
223
    /* store handler's address */
Line 284... Line 285...
284
 *
285
 *
285
 * Dispatches the syscall.
286
 * Dispatches the syscall.
286
 */
287
 */
287
static void swi_exception(int exc_no, istate_t *istate)
288
static void swi_exception(int exc_no, istate_t *istate)
288
{
289
{
289
    /*
-
 
290
    dprintf("SYSCALL: r0-r4: %x, %x, %x, %x, %x; pc: %x\n", istate->r0,
-
 
291
        istate->r1, istate->r2, istate->r3, istate->r4, istate->pc);
-
 
292
    */
-
 
293
 
-
 
294
    istate->r0 = syscall_handler(istate->r0, istate->r1, istate->r2,
290
    istate->r0 = syscall_handler(istate->r0, istate->r1, istate->r2,
295
        istate->r3, istate->r4);
291
        istate->r3, istate->r4, istate->r5, istate->r6);
296
}
292
}
297
 
293
 
298
/** Interrupt Exception handler.
294
/** Interrupt Exception handler.
299
 *
295
 *
300
 * Determines the sources of interrupt and calls their handlers.
296
 * Determines the sources of interrupt and calls their handlers.