Commit Graph

4 Commits

Author SHA1 Message Date
Jeff Johnston 31cf34f849 or1k: Allow exception nesting
Allow exceptions to be nested, which is especially useful with urgent
    interrupts while processing an exception.

    The implementation counts up the nesting level with each call to an
    exception. In the outer exception (level 1), the exception stack is
    started. All nested exceptions just reserve the redzone (scratch
    memory that may be used by compiler) and exception context on the
    stack, but then process on the same scratch.

    Restriction: Impure pointers are shared among all exceptions. This may
    be solved by creating an impure data structure in the stack frame with
    each nested exception.

       * or1k/crt0.S: Add exception nesting
       * or1k/exceptions-asm.S: ditto
       * or1k/util.c: ditto
2015-08-07 15:02:03 -04:00
Jeff Johnston b46d3b5536 Store entire context for or1k
- Store the exception program counter (from EPCR) and exception status
  register (from ESR) also during the exception. A runtime system may
  replace them thereby to implement a thread switch.

    * or1k/exception-asm.S: Store missing state
2015-05-27 13:30:20 +02:00
Jeff Johnston a6342974b0 Fix exception stack frame for or1k
- We do not need a red zone here, as we do not operate on the current
  stack, but always use the clear exception stack. Also reserve two
  extra words for the context to store EPCR and ESR.

    * or1k/crt0.S: Fix exception stack frame
    * or1k/exception-asm.S: ditto
2015-05-27 13:30:19 +02:00
Jeff Johnston 68a9101237 2014-12-15 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
* or1k/Makefile.in: Add libor1k
        * or1k/README: New file
        * or1k/caches-asm.S: New file
        * or1k/exceptions-asm.S: New file
        * or1k/exceptions.c: New file
        * or1k/impure.c: New file
        * or1k/include/or1k-nop.h: New file
        * or1k/include/or1k-support.h: New file
        * or1k/interrupts-asm.S: New file
        * or1k/interrupts.c: New file
        * or1k/mmu-asm.S: New file
        * or1k/or1k-internals.h: New file
        * or1k/or1k_uart.c: New file
        * or1k/or1k_uart.h: New file
        * or1k/outbyte.S: New file
        * or1k/sbrk.c: New file
        * or1k/sync-asm.S: New file
        * or1k/syscalls.c: New file
        * or1k/timer.c: New file
        * or1k/util.c: New file
2014-12-15 20:17:39 +00:00