TsuReX / ARMv6

This is an educational project where different things are tested.
0 stars 0 forks source link

Exceptions #6

Open TsuReX opened 6 years ago

TsuReX commented 6 years ago

Implement interrupt handlers for all exceptions as sending special code for each exception via UART

TsuReX commented 5 years ago

Examine exception's life cycle and processing approach. Pay special attention on to disabling/enabling exceptions bits and bits for clearing pending exceptions.

TsuReX commented 5 years ago

For ARM side timer. Do in exception handler:

  1. Read IRQ RAW register (0x410);
  2. Send it's value via UART;
  3. Read Masked IRQ register (0x414);
  4. Send it's value via UART;
  5. Write 0x1 to IRQ Claer/Ack register (0x40C) to clear pending interrupt;
  6. Handle exception;
  7. Return from handler.
TsuReX commented 5 years ago
  1. Implement special handler subfunction setting up mechanism for each exception:

    • EXC_handler_fcn .word;
    • setup_EXC_handler()).
  2. Each default exception handler must do:

    • print_EXCNAME
    • print_cpsr;
    • print_spsr;
    • go to special handler (if it was set up);
    • print "CPU halt" (if there isn't special handler);
    • halt/infinite loop.
  3. Check exit address calculation for each handler;

  4. Implement setup_exc function to make default configuring of all exceptions. Func must do:

    • place_exc_vector;
    • setup_EXC_handler (for all exceptions).
  5. Exceptions 1 + 6:

    • reset (no special handler);
    • undef;
    • svc_smc;
    • pabt;
    • dabt;
    • irq;
    • fiq.