5 # Set up, trigger, and verify an IRQ interrupt.
7 .include "armutils.inc"
13 # Prepare to handle interrupts.
18 orr r4,r4,#SYSTEM_MODE
21 # Build an instruction to branch to the interrupt handler.
24 .word irq_interrupt_handler
33 # Write to memory location 0x80000001. A tcl device at that address will wake
34 # up and then trigger an IRQ interrupt.
36 mov r7,#1 @ set to zero by irq handler
42 # Wait for an IRQ, but don't wait forever.
43 # The IRQ handler will set r7 to zero.
55 # Returned from interrupt. Verify register contents.
59 # All done, print "pass".
64 # IRQ interrupt handler
66 irq_interrupt_handler:
68 # Make sure we're in IRQ mode.
72 test_h_gr r4, IRQ_MODE
74 # Return from interrupt.
79 # We should have returned from the interrupt, fail if not.