Exceptions, Interrupts, & Vector Table

  • Exceptions

    • processor sets PC to specific memory address

      • Address is within a special range called vector table

      • Entries in Vector Table are instructions that branch to specific routines for handling particular interrupts/exceptions

    • 0x00000000 is reserved for vector table

      • some processors allow higher address 0xffff0000

      • Linux and windows use this higher address

  • Each vector table entry contains a form of branch instruction pointing to specific routine

    • reset vector: location of first instruction executed by processor when power is applied.

      • branches to initialized code

    • undefined instruction vector: used when processor cannot decode an instruction

    • software interrupt vector: called when an SWI instruction is executed

      • often used to invoke an OS routine

    • prefetch abort vector: used when processor attempts to fetch instruction from address w/o correct access permissions

      • abort occurs in decode stage

    • data abort vector: when instruction attempts to access data memory w/o correct access permission

    • Interrupt request vector: external hardware causes interrupt

    • Fast interrupt request vector: same as above, but requiring faster response time