2 * (C) Copyright 2007-2010 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
4 * This file is released under the GPLv2. See the COPYING file for more
10 #include <interrupt.h>
17 .type IO_INT, @function
20 STMG
%r0,%r15,0x200(%r0)
23 LARL
%r15, int_stack_ptr
27 LARL
%r14, __io_int_handler
28 BALR
%r14, %r14 # call the real handler
31 LMG
%r0,%r15,0x200(%r0)
33 LPSWE
0x170 # go back to what we interrupted
41 .type EXT_INT, @function
44 STMG
%r0,%r15,0x200(%r0)
47 LARL
%r15, int_stack_ptr
51 LARL
%r14, __ext_int_handler
52 BALR
%r14, %r14 # call the real handler
55 # NOTE: we may never return from the C-interrupt handler if the
56 # interrupt was caused by the timer clock, in which case the
57 # scheduler kicks in, and gives control to someone else
61 LMG
%r0,%r15,0x200(%r0)
63 LPSWE
0x130 # go back to what we interrupted
67 # Supervisor-Call Interrupt
71 .type SVC_INT, @function
74 STMG
%r0,%r15,0x200(%r0)
77 LARL
%r15, int_stack_ptr
81 # find the right handler
82 LARL
%r14, svc_table
# table address
83 LGH
%r2, 0x8a # interruption code
85 # byte offset into table
86 LG
%r14, 0(%r2,%r14) # load value from table
88 BALR
%r14, %r14 # call the real handler
91 LMG
%r0,%r15,0x200(%r0)
93 LPSWE
0x140 # go back to what we interrupted
101 .type PGM_INT, @function
104 STMG
%r0,%r15,0x200(%r0)
107 LARL
%r15, int_stack_ptr
111 LARL
%r14, __pgm_int_handler
112 BALR
%r14, %r14 # call the real handler
115 # NOTE: we may never return from the C-interrupt handler
119 LMG
%r0,%r15,0x200(%r0)
121 LPSWE
0x150 # go back to what we interrupted
125 # Machine Check Interrupt
129 .type MCH_INT, @function
132 STMG
%r0,%r15,0x200(%r0)
135 LARL
%r15, int_stack_ptr
139 LARL
%r14, __mch_int_handler
140 BALR
%r14, %r14 # call the real handler
143 # NOTE: we may never return from the C-interrupt handler
147 LMG
%r0,%r15,0x200(%r0)
149 LPSWE
0x160 # go back to what we interrupted