Subversion Repositories HelenOS

Rev

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

Rev 2298 Rev 2304
Line 242... Line 242...
242
 
242
 
243
/** Software Interrupt handler.
243
/** Software Interrupt handler.
244
 *
244
 *
245
 * Dispatches the syscall.
245
 * Dispatches the syscall.
246
 */
246
 */
247
static void swi_exception(int exc_no, istate_t* istate)
247
static void swi_exception(int exc_no, istate_t *istate)
248
{
248
{
249
    dprintf("SYSCALL: r0-r4: %x, %x, %x, %x, %x; pc: %x", istate->r0,
249
    dprintf("SYSCALL: r0-r4: %x, %x, %x, %x, %x; pc: %x\n", istate->r0,
250
        istate->r1, istate->r2, istate->r3, istate->r4, istate->pc);
250
        istate->r1, istate->r2, istate->r3, istate->r4, istate->pc);
251
 
251
 
252
    istate->r0 = syscall_handler(
252
    istate->r0 = syscall_handler(
253
        istate->r0,
253
        istate->r0,
254
        istate->r1,
254
        istate->r1,
Line 259... Line 259...
259
 
259
 
260
/** Interrupt Exception handler.
260
/** Interrupt Exception handler.
261
 *
261
 *
262
 * Determines the sources of interrupt, and calls their handlers.
262
 * Determines the sources of interrupt, and calls their handlers.
263
 */
263
 */
264
static void irq_exception(int exc_no, istate_t* istate)
264
static void irq_exception(int exc_no, istate_t *istate)
265
{
265
{
266
// TODO: move somewhere to gxemul.c and use machine_irq_exception (or some similar
266
// TODO: move somewhere to gxemul.c and use machine_irq_exception (or some similar
267
// name) to avoid using MACHINE == MACHINE_GXEMUL_TESTARM
267
// name) to avoid using MACHINE == MACHINE_GXEMUL_TESTARM
268
#if MACHINE == MACHINE_GXEMUL_TESTARM
268
#if MACHINE == MACHINE_GXEMUL_TESTARM
269
    uint32_t sources = gxemul_irqc_get_sources();
269
    uint32_t sources = gxemul_irqc_get_sources();
Line 394... Line 394...
394
 
394
 
395
        current_status_reg_control_write(cspr);
395
        current_status_reg_control_write(cspr);
396
 
396
 
397
}
397
}
398
 
398
 
-
 
399
 
-
 
400
void print_istate(istate_t *istate)
-
 
401
{
-
 
402
    dprintf("istate dump:\n");
-
 
403
 
-
 
404
    dprintf(" r0: %x    r1: %x    r2: %x    r3: %x\n",
-
 
405
        istate->r0, istate->r1, istate->r2, istate->r3);
-
 
406
    dprintf(" r4: %x    r5: %x    r6: %x    r7: %x\n",
-
 
407
        istate->r4, istate->r5, istate->r6, istate->r7);
-
 
408
    dprintf(" r8: %x    r8: %x   r10: %x   r11: %x\n",
-
 
409
        istate->r8, istate->r9, istate->r10, istate->r11);
-
 
410
    dprintf(" r12: %x    sp: %x    lr: %x  spsr: %x\n",
-
 
411
        istate->r12, istate->sp, istate->lr, istate->spsr);
-
 
412
 
-
 
413
    dprintf(" pc: %x\n", istate->pc);
-
 
414
}
-
 
415
 
-
 
416
 
399
/** @}
417
/** @}
400
 */
418
 */