KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
irq.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 arch/dreamcast/include/irq.h
4 Copyright (C) 2000-2001 Megan Potter
5 Copyright (C) 2024 Paul Cercueil
6 Copyright (C) 2024 Falco Girgis
7
8*/
9
10/** \file
11 \brief Interrupt and exception handling.
12 \ingroup irqs
13
14 This file contains various definitions and declarations related to handling
15 interrupts and exceptions on the Dreamcast. This level deals with IRQs and
16 exceptions generated on the SH4, versus the asic layer which deals with
17 actually differentiating "external" interrupts.
18
19 \author Megan Potter
20 \author Paul Cercueil
21 \author Falco Girgis
22
23 \see dc/asic.h, arch/trap.h
24*/
25
26#ifndef __ARCH_IRQ_H
27#define __ARCH_IRQ_H
28
29#include <stdbool.h>
30#include <stdint.h>
31#include <sys/cdefs.h>
32__BEGIN_DECLS
33
34#include <arch/types.h>
35
36/* Included for legacy compatibility with these two APIs being one. */
37#include <arch/trap.h>
38
39/** \defgroup irqs Interrupts
40 \brief IRQs and ISRs for the SH4's CPU
41 \ingroup system
42
43 This is an API for managing interrupts, their masks, and their
44 handler routines along with thread context information.
45
46 \warning
47 This is a low-level, internal kernel API. Many of these
48 interrupts are utilized by various KOS drivers and have higher-level APIs
49 for hooking into them. Care must be taken to not interfere with the IRQ
50 handling which is being done by in-use KOS drivers.
51
52 @{
53*/
54
55/** \defgroup Context
56 \brief Thread execution state and accessors
57
58 This API includes the structure and accessors for a
59 thread's context state, which contains the registers that are stored
60 and loaded upon thread context switches, which are passed back to
61 interrupt handlers.
62
63 @{
64*/
65
66/** The number of bytes required to save thread context.
67
68 This should include all general CPU registers, FP registers, and status regs
69 (even if not all of these are actually used).
70
71 \note
72 On the Dreamcast, we need `228` bytes for all of that, but we round it up to a
73 nicer number for sanity.
74*/
75#define REG_BYTE_CNT 256
76
77/** Architecture-specific structure for holding the processor state.
78
79 This structure should hold register values and other important parts of the
80 processor state.
81
82 \note
83 The size of this structure should be less than or equal to the
84 \ref REG_BYTE_CNT value.
85*/
86typedef __attribute__((aligned(32))) struct irq_context {
87 uint32_t pc; /**< Program counter */
88 uint32_t pr; /**< Procedure register (aka return address) */
89 uint32_t gbr; /**< Global base register (TLS segment ptr) */
90 uint32_t vbr; /**< Vector base register */
91 uint32_t mach; /**< Multiply-and-accumulate register (high) */
92 uint32_t macl; /**< Multiply-and-accumulate register (low) */
93 uint32_t sr; /**< Status register */
94 uint32_t fpul; /**< Floating-point communication register */
95 uint32_t fr[16]; /**< Primary floating point registers */
96 uint32_t frbank[16]; /**< Secondary floating point registers */
97 uint32_t r[16]; /**< 16 general purpose (integer) registers */
98 uint32_t fpscr; /**< Floating-point status/control register */
100
101/** \name Register Accessors
102 \brief Convenience macros for accessing context registers
103 @{
104*/
105/** Fetch the program counter from an irq_context_t.
106 \param c The context to read from.
107 \return The program counter value.
108*/
109#define CONTEXT_PC(c) ((c).pc)
110
111/** Fetch the frame pointer from an irq_context_t.
112 \param c The context to read from.
113 \return The frame pointer value.
114*/
115#define CONTEXT_FP(c) ((c).r[14])
116
117/** Fetch the stack pointer from an irq_context_t.
118 \param c The context to read from.
119 \return The stack pointer value.
120*/
121#define CONTEXT_SP(c) ((c).r[15])
122
123/** Fetch the return value from an irq_context_t.
124 \param c The context to read from.
125 \return The return value.
126*/
127#define CONTEXT_RET(c) ((c).r[0])
128/** @} */
129
130/** Switch out contexts (for interrupt return).
131
132 This function will set the processor state that will be restored when the
133 exception returns.
134
135 \param regbank The values of all registers to be restored.
136
137 \sa irq_get_context()
138*/
140
141/** Get the current IRQ context.
142
143 This will fetch the processor context prior to the exception handling during
144 an IRQ service routine.
145
146 \return The current IRQ context.
147
148 \sa irq_set_context()
149*/
151
152/** Fill a newly allocated context block.
153
154 The given parameters will be passed to the called routine (up to the
155 architecture maximum). For the Dreamcast, this maximum is 4.
156
157 \param context The IRQ context to fill in.
158 \param stack_pointer The value to set in the stack pointer.
159 \param routine The address of the program counter for the context.
160 \param args Any arguments to set in the registers. This cannot
161 be NULL, and must have enough values to fill in up
162 to the architecture maximum.
163 \param usermode true to run the routine in user mode, false for
164 supervisor.
165*/
166void irq_create_context(irq_context_t *context, uint32_t stack_pointer,
167 uint32_t routine, const uint32_t *args, bool usermode);
168
169/** @} */
170
171/** Interrupt exception codes
172
173 Dreamcast-specific exception codes. Used to identify the source or type of
174 an interrupt. Each exception code is of a certain "type" which dictates how the interrupt
175 is generated and handled.
176
177 List of exception types:
178
179 |Type | Description
180 |--------|------------
181 |`RESET` | Caused by system reset. Uncatchable and fatal. Automatically branch to address `0xA0000000`.
182 |`REEXEC`| Restarts current instruction after interrupt processing. Context PC is the triggering instruction.
183 |`POST` | Continues with next instruciton after interrupt processing. Context PC is the next instruction.
184 |`SOFT` | Software-driven exceptions for triggering interrupts upon special events.
185 |`UNUSED`| Known to not be present and usable with the DC's SH4 configuration.
186
187 List of exception codes:
188*/
189typedef enum irq_exception {
190 EXC_RESET_POWERON = 0x0000, /**< `[RESET ]` Power-on reset */
191 EXC_RESET_MANUAL = 0x0020, /**< `[RESET ]` Manual reset */
192 EXC_RESET_UDI = 0x0000, /**< `[RESET ]` Hitachi UDI reset */
193 EXC_ITLB_MULTIPLE = 0x0140, /**< `[RESET ]` Instruction TLB multiple hit */
194 EXC_DTLB_MULTIPLE = 0x0140, /**< `[RESET ]` Data TLB multiple hit */
195 EXC_USER_BREAK_PRE = 0x01e0, /**< `[REEXEC]` User break before instruction */
196 EXC_INSTR_ADDRESS = 0x00e0, /**< `[REEXEC]` Instruction address */
197 EXC_ITLB_MISS = 0x0040, /**< `[REEXEC]` Instruction TLB miss */
198 EXC_ITLB_PV = 0x00a0, /**< `[REEXEC]` Instruction TLB protection violation */
199 EXC_ILLEGAL_INSTR = 0x0180, /**< `[REEXEC]` Illegal instruction */
200 EXC_SLOT_ILLEGAL_INSTR = 0x01a0, /**< `[REEXEC]` Slot illegal instruction */
201 EXC_GENERAL_FPU = 0x0800, /**< `[REEXEC]` General FPU exception */
202 EXC_SLOT_FPU = 0x0820, /**< `[REEXEC]` Slot FPU exception */
203 EXC_DATA_ADDRESS_READ = 0x00e0, /**< `[REEXEC]` Data address (read) */
204 EXC_DATA_ADDRESS_WRITE = 0x0100, /**< `[REEXEC]` Data address (write) */
205 EXC_DTLB_MISS_READ = 0x0040, /**< `[REEXEC]` Data TLB miss (read) */
206 EXC_DTLB_MISS_WRITE = 0x0060, /**< `[REEXEC]` Data TLB miss (write) */
207 EXC_DTLB_PV_READ = 0x00a0, /**< `[REEXEC]` Data TLB protection violation (read) */
208 EXC_DTLB_PV_WRITE = 0x00c0, /**< `[REEXEC]` Data TLB protection violation (write) */
209 EXC_FPU = 0x0120, /**< `[REEXEC]` FPU exception */
210 EXC_INITIAL_PAGE_WRITE = 0x0080, /**< `[REEXEC]` Initial page write exception */
211 EXC_TRAPA = 0x0160, /**< `[POST ]` Unconditional trap (`TRAPA`) */
212 EXC_USER_BREAK_POST = 0x01e0, /**< `[POST ]` User break after instruction */
213 EXC_NMI = 0x01c0, /**< `[POST ]` Nonmaskable interrupt */
214 EXC_IRQ0 = 0x0200, /**< `[POST ]` External IRQ request (level 0) */
215 EXC_IRQ1 = 0x0220, /**< `[POST ]` External IRQ request (level 1) */
216 EXC_IRQ2 = 0x0240, /**< `[POST ]` External IRQ request (level 2) */
217 EXC_IRQ3 = 0x0260, /**< `[POST ]` External IRQ request (level 3) */
218 EXC_IRQ4 = 0x0280, /**< `[POST ]` External IRQ request (level 4) */
219 EXC_IRQ5 = 0x02a0, /**< `[POST ]` External IRQ request (level 5) */
220 EXC_IRQ6 = 0x02c0, /**< `[POST ]` External IRQ request (level 6) */
221 EXC_IRQ7 = 0x02e0, /**< `[POST ]` External IRQ request (level 7) */
222 EXC_IRQ8 = 0x0300, /**< `[POST ]` External IRQ request (level 8) */
223 EXC_IRQ9 = 0x0320, /**< `[POST ]` External IRQ request (level 9) */
224 EXC_IRQA = 0x0340, /**< `[POST ]` External IRQ request (level 10) */
225 EXC_IRQB = 0x0360, /**< `[POST ]` External IRQ request (level 11) */
226 EXC_IRQC = 0x0380, /**< `[POST ]` External IRQ request (level 12) */
227 EXC_IRQD = 0x03a0, /**< `[POST ]` External IRQ request (level 13) */
228 EXC_IRQE = 0x03c0, /**< `[POST ]` External IRQ request (level 14) */
229 EXC_TMU0_TUNI0 = 0x0400, /**< `[POST ]` TMU0 underflow */
230 EXC_TMU1_TUNI1 = 0x0420, /**< `[POST ]` TMU1 underflow */
231 EXC_TMU2_TUNI2 = 0x0440, /**< `[POST ]` TMU2 underflow */
232 EXC_TMU2_TICPI2 = 0x0460, /**< `[UNUSED]` TMU2 input capture */
233 EXC_RTC_ATI = 0x0480, /**< `[UNUSED]` RTC alarm interrupt */
234 EXC_RTC_PRI = 0x04a0, /**< `[UNUSED]` RTC periodic interrupt */
235 EXC_RTC_CUI = 0x04c0, /**< `[UNUSED]` RTC carry interrupt */
236 EXC_SCI_ERI = 0x04e0, /**< `[UNUSED]` SCI Error receive */
237 EXC_SCI_RXI = 0x0500, /**< `[UNUSED]` SCI Receive ready */
238 EXC_SCI_TXI = 0x0520, /**< `[UNUSED]` SCI Transmit ready */
239 EXC_SCI_TEI = 0x0540, /**< `[UNUSED]` SCI Transmit error */
240 EXC_WDT_ITI = 0x0560, /**< `[POST ]` Watchdog timer */
241 EXC_REF_RCMI = 0x0580, /**< `[POST ]` Memory refresh compare-match interrupt */
242 EXC_REF_ROVI = 0x05a0, /**< `[POST ]` Memory refresh counter overflow interrupt */
243 EXC_UDI = 0x0600, /**< `[POST ]` Hitachi UDI */
244 EXC_GPIO_GPIOI = 0x0620, /**< `[POST ]` I/O port interrupt */
245 EXC_DMAC_DMTE0 = 0x0640, /**< `[POST ]` DMAC transfer end (channel 0) */
246 EXC_DMAC_DMTE1 = 0x0660, /**< `[POST ]` DMAC transfer end (channel 1) */
247 EXC_DMAC_DMTE2 = 0x0680, /**< `[POST ]` DMAC transfer end (channel 2) */
248 EXC_DMAC_DMTE3 = 0x06a0, /**< `[POST ]` DMAC transfer end (channel 3) */
249 EXC_DMA_DMAE = 0x06c0, /**< `[POST ]` DMAC address error */
250 EXC_SCIF_ERI = 0x0700, /**< `[POST ]` SCIF Error receive */
251 EXC_SCIF_RXI = 0x0720, /**< `[POST ]` SCIF Receive ready */
252 EXC_SCIF_BRI = 0x0740, /**< `[POST ]` SCIF break */
253 EXC_SCIF_TXI = 0x0760, /**< `[POST ]` SCIF Transmit ready */
254 EXC_DOUBLE_FAULT = 0x0ff0, /**< `[SOFT ]` Exception happened in an ISR */
255 EXC_UNHANDLED_EXC = 0x0fe0 /**< `[SOFT ]` Exception went unhandled */
257
258
259/** \defgroup irq_type_offsets Exception type offsets
260 \brief Offsets within exception types
261 \ingroup irqs
262
263 The following are a table of "type offsets" (see the Hitachi PDF). These are
264 the 0x000, 0x100, 0x400, and 0x600 offsets.
265
266 @{
267*/
268#define EXC_OFFSET_000 0 /**< \brief Offset 0x000 */
269#define EXC_OFFSET_100 1 /**< \brief Offset 0x100 */
270#define EXC_OFFSET_400 2 /**< \brief Offset 0x400 */
271#define EXC_OFFSET_600 3 /**< \brief Offset 0x600 */
272/** @} */
273
274/** \brief The value of the timer IRQ
275 \ingroup irqs
276*/
277#define TIMER_IRQ EXC_TMU0_TUNI0
278
279/** \defgroup irq_state State
280 \brief Methods for querying active IRQ information.
281
282 Provides an API for accessing the state of the current IRQ context such
283 as the active interrupt or whether it has been handled.
284
285 @{
286*/
287
288
289/** Returns whether inside of an interrupt context.
290
291 \retval non-zero If interrupt handling is in progress.
292 ((code&0xf)<<16) | (evt&0xffff)
293 \retval 0 If normal processing is in progress.
294
295*/
297
298/** @} */
299
300/** \defgroup irq_mask Mask
301 \brief Accessors and modifiers of the IMASK state.
302
303 This API is provided for managing and querying information regarding the
304 interrupt mask, a series of bitflags representing whether each type of
305 interrupt has been enabled or not.
306
307 @{
308*/
309
310/** Type representing an interrupt mask state. */
311typedef uint32_t irq_mask_t;
312/** Disable interrupts.
313
314 This function will disable interrupts, but will leave exceptions enabled.
315
316 \return The state of IRQs before calling the function. This
317 can be used to restore this state later on with
318 irq_restore().
319
320 \sa irq_restore(), irq_enable()
321*/
323
324/** Enable all interrupts.
325
326 This function will enable ALL interrupts, including external ones.
327
328 \sa irq_disable()
329*/
330void irq_enable(void);
331
332/** Restore IRQ state.
333
334 This function will restore the interrupt state to the value specified. This
335 should correspond to a value returned by irq_disable().
336
337 \param v The IRQ state to restore. This should be a value
338 returned by irq_disable().
339
340 \sa irq_disable()
341*/
343
344/** @} */
345
346/** \defgroup irq_ctrl Control Flow
347 \brief Methods for managing control flow within an irq_handler.
348
349 This API provides methods for controlling program flow from within an
350 active interrupt handler.
351
352 @{
353*/
354
355/** Resume normal execution from IRQ context.
356
357 Pretend like we just came in from an interrupt and force a context switch
358 back to the "current" context.
359
360 \warning
361 Make sure you've called irq_set_context() before doing this!
362
363 \sa irq_set_context()
364*/
366
367/** @} */
368
369/** \defgroup irq_handlers Handlers
370 \brief API for managing IRQ handlers
371
372 This API provides a series of methods for registering and retrieving
373 different types of exception handlers.
374
375 @{
376*/
377
378/** The type of an IRQ handler.
379
380 \param code The IRQ that caused the handler to be called.
381 \param context The CPU's context.
382 \param data Arbitrary userdata associated with the handler.
383*/
384typedef void (*irq_handler)(irq_t code, irq_context_t *context, void *data);
385
386/** \defgroup irq_handlers_ind Individual
387 \brief API for managing individual IRQ handlers.
388
389 This API is for managing handlers installed to handle individual IRQ codes.
390
391 @{
392*/
393
394/** Set or remove an IRQ handler.
395
396 Passing a NULL value for hnd will remove the current handler, if any.
397
398 \param code The IRQ type to set the handler for
399 (see \ref irq_exception_codes).
400 \param hnd A pointer to a procedure to handle the exception.
401 \param data A pointer that will be passed along to the callback.
402
403 \retval 0 On success.
404 \retval -1 If the code is invalid.
405
406 \sa irq_get_handler()
407*/
408int irq_set_handler(irq_t code, irq_handler hnd, void *data);
409
410/** Get the address of the current handler for the IRQ type.
411
412 \param code The IRQ type to look up.
413
414 \return A pointer to the procedure to handle the exception.
415
416 \sa irq_set_handler()
417*/
419
420/** @} */
421
422/** \defgroup irq_handlers_global Global
423 \brief API for managing global IRQ handler.
424
425 @{
426*/
427/** Set a global exception handler.
428
429 This function sets a global catch-all filter for all exception types.
430
431 \note The specific handler will still be called for the
432 exception if one is set. If not, setting one of
433 these will stop the unhandled exception error.
434
435 \param hnd A pointer to the procedure to handle the exception.
436 \param data A pointer that will be passed along to the callback.
437
438 \retval 0 On success (no error conditions defined).
439
440*/
441int irq_set_global_handler(irq_handler handler, void *data);
442
443/** Get the global exception handler.
444
445 \return The global exception handler set with
446 irq_set_global_handler(), or NULL if none is set.
447*/
449/** @} */
450
451/** @} */
452
453/** \cond INTERNAL */
454
455/** Initialize interrupts.
456
457 \retval 0 On success (no error conditions defined).
458
459 \sa irq_shutdown()
460*/
461int irq_init(void);
462
463/** Shutdown interrupts.
464
465 Restores the state to how it was before irq_init() was called.
466
467 \sa irq_init()
468*/
469void irq_shutdown(void);
470
471static inline void __irq_scoped_cleanup(int *state) {
472 irq_restore(*state);
473}
474
475#define ___irq_disable_scoped(l) \
476 int __scoped_irq_##l __attribute__((cleanup(__irq_scoped_cleanup))) = irq_disable()
477
478#define __irq_disable_scoped(l) ___irq_disable_scoped(l)
479/** \endcond */
480
481/** \brief Disable interrupts with scope management.
482
483 This macro will disable interrupts, similarly to irq_disable(), with the
484 difference that the interrupt state will automatically be restored once the
485 execution exits the functional block in which the macro was called.
486*/
487#define irq_disable_scoped() __irq_disable_scoped(__LINE__)
488
489/** @} */
490
491__END_DECLS
492
493#endif /* __ARCH_IRQ_H */
irq_context_t * irq_get_context(void)
Get the current IRQ context.
void irq_create_context(irq_context_t *context, uint32_t stack_pointer, uint32_t routine, const uint32_t *args, bool usermode)
Fill a newly allocated context block.
void irq_set_context(irq_context_t *regbank)
Switch out contexts (for interrupt return).
void irq_force_return(void)
Resume normal execution from IRQ context.
irq_handler irq_get_global_handler(void)
Get the global exception handler.
int irq_set_global_handler(irq_handler handler, void *data)
Set a global exception handler.
irq_handler irq_get_handler(irq_t code)
Get the address of the current handler for the IRQ type.
int irq_set_handler(irq_t code, irq_handler hnd, void *data)
Set or remove an IRQ handler.
void(* irq_handler)(irq_t code, irq_context_t *context, void *data)
The type of an IRQ handler.
Definition irq.h:384
void irq_enable(void)
Enable all interrupts.
void irq_restore(irq_mask_t v)
Restore IRQ state.
irq_mask_t irq_disable(void)
Disable interrupts.
uint32_t irq_mask_t
Type representing an interrupt mask state.
Definition irq.h:311
int irq_inside_int(void)
Returns whether inside of an interrupt context.
irq_t
Interrupt exception codes.
Definition irq.h:189
@ EXC_SCIF_TXI
[POST ] SCIF Transmit ready
Definition irq.h:253
@ EXC_TMU1_TUNI1
[POST ] TMU1 underflow
Definition irq.h:230
@ EXC_UNHANDLED_EXC
[SOFT ] Exception went unhandled
Definition irq.h:255
@ EXC_DTLB_MISS_READ
[REEXEC] Data TLB miss (read)
Definition irq.h:205
@ EXC_TMU2_TUNI2
[POST ] TMU2 underflow
Definition irq.h:231
@ EXC_DATA_ADDRESS_READ
[REEXEC] Data address (read)
Definition irq.h:203
@ EXC_DMAC_DMTE2
[POST ] DMAC transfer end (channel 2)
Definition irq.h:247
@ EXC_DTLB_MULTIPLE
[RESET ] Data TLB multiple hit
Definition irq.h:194
@ EXC_DTLB_PV_READ
[REEXEC] Data TLB protection violation (read)
Definition irq.h:207
@ EXC_ITLB_MISS
[REEXEC] Instruction TLB miss
Definition irq.h:197
@ EXC_SCI_ERI
[UNUSED] SCI Error receive
Definition irq.h:236
@ EXC_DMAC_DMTE1
[POST ] DMAC transfer end (channel 1)
Definition irq.h:246
@ EXC_IRQ9
[POST ] External IRQ request (level 9)
Definition irq.h:223
@ EXC_IRQ0
[POST ] External IRQ request (level 0)
Definition irq.h:214
@ EXC_INSTR_ADDRESS
[REEXEC] Instruction address
Definition irq.h:196
@ EXC_REF_RCMI
[POST ] Memory refresh compare-match interrupt
Definition irq.h:241
@ EXC_DMAC_DMTE0
[POST ] DMAC transfer end (channel 0)
Definition irq.h:245
@ EXC_ITLB_MULTIPLE
[RESET ] Instruction TLB multiple hit
Definition irq.h:193
@ EXC_IRQ7
[POST ] External IRQ request (level 7)
Definition irq.h:221
@ EXC_INITIAL_PAGE_WRITE
[REEXEC] Initial page write exception
Definition irq.h:210
@ EXC_DTLB_MISS_WRITE
[REEXEC] Data TLB miss (write)
Definition irq.h:206
@ EXC_SLOT_FPU
[REEXEC] Slot FPU exception
Definition irq.h:202
@ EXC_IRQA
[POST ] External IRQ request (level 10)
Definition irq.h:224
@ EXC_RESET_POWERON
[RESET ] Power-on reset
Definition irq.h:190
@ EXC_IRQ4
[POST ] External IRQ request (level 4)
Definition irq.h:218
@ EXC_IRQD
[POST ] External IRQ request (level 13)
Definition irq.h:227
@ EXC_RTC_ATI
[UNUSED] RTC alarm interrupt
Definition irq.h:233
@ EXC_RESET_MANUAL
[RESET ] Manual reset
Definition irq.h:191
@ EXC_DOUBLE_FAULT
[SOFT ] Exception happened in an ISR
Definition irq.h:254
@ EXC_DMAC_DMTE3
[POST ] DMAC transfer end (channel 3)
Definition irq.h:248
@ EXC_ILLEGAL_INSTR
[REEXEC] Illegal instruction
Definition irq.h:199
@ EXC_FPU
[REEXEC] FPU exception
Definition irq.h:209
@ EXC_IRQ8
[POST ] External IRQ request (level 8)
Definition irq.h:222
@ EXC_IRQC
[POST ] External IRQ request (level 12)
Definition irq.h:226
@ EXC_TMU0_TUNI0
[POST ] TMU0 underflow
Definition irq.h:229
@ EXC_IRQ1
[POST ] External IRQ request (level 1)
Definition irq.h:215
@ EXC_RTC_PRI
[UNUSED] RTC periodic interrupt
Definition irq.h:234
@ EXC_GPIO_GPIOI
[POST ] I/O port interrupt
Definition irq.h:244
@ EXC_DATA_ADDRESS_WRITE
[REEXEC] Data address (write)
Definition irq.h:204
@ EXC_IRQ6
[POST ] External IRQ request (level 6)
Definition irq.h:220
@ EXC_DMA_DMAE
[POST ] DMAC address error
Definition irq.h:249
@ EXC_REF_ROVI
[POST ] Memory refresh counter overflow interrupt
Definition irq.h:242
@ EXC_IRQ5
[POST ] External IRQ request (level 5)
Definition irq.h:219
@ EXC_SLOT_ILLEGAL_INSTR
[REEXEC] Slot illegal instruction
Definition irq.h:200
@ EXC_WDT_ITI
[POST ] Watchdog timer
Definition irq.h:240
@ EXC_IRQ2
[POST ] External IRQ request (level 2)
Definition irq.h:216
@ EXC_SCI_TXI
[UNUSED] SCI Transmit ready
Definition irq.h:238
@ EXC_ITLB_PV
[REEXEC] Instruction TLB protection violation
Definition irq.h:198
@ EXC_SCIF_BRI
[POST ] SCIF break
Definition irq.h:252
@ EXC_IRQB
[POST ] External IRQ request (level 11)
Definition irq.h:225
@ EXC_USER_BREAK_PRE
[REEXEC] User break before instruction
Definition irq.h:195
@ EXC_NMI
[POST ] Nonmaskable interrupt
Definition irq.h:213
@ EXC_RESET_UDI
[RESET ] Hitachi UDI reset
Definition irq.h:192
@ EXC_USER_BREAK_POST
[POST ] User break after instruction
Definition irq.h:212
@ EXC_SCIF_RXI
[POST ] SCIF Receive ready
Definition irq.h:251
@ EXC_DTLB_PV_WRITE
[REEXEC] Data TLB protection violation (write)
Definition irq.h:208
@ EXC_IRQ3
[POST ] External IRQ request (level 3)
Definition irq.h:217
@ EXC_TMU2_TICPI2
[UNUSED] TMU2 input capture
Definition irq.h:232
@ EXC_GENERAL_FPU
[REEXEC] General FPU exception
Definition irq.h:201
@ EXC_TRAPA
[POST ] Unconditional trap (TRAPA)
Definition irq.h:211
@ EXC_SCIF_ERI
[POST ] SCIF Error receive
Definition irq.h:250
@ EXC_SCI_RXI
[UNUSED] SCI Receive ready
Definition irq.h:237
@ EXC_UDI
[POST ] Hitachi UDI
Definition irq.h:243
@ EXC_SCI_TEI
[UNUSED] SCI Transmit error
Definition irq.h:239
@ EXC_IRQE
[POST ] External IRQ request (level 14)
Definition irq.h:228
@ EXC_RTC_CUI
[UNUSED] RTC carry interrupt
Definition irq.h:235
Architecture-specific structure for holding the processor state.
Definition irq.h:86
uint32_t fpul
Floating-point communication register.
Definition irq.h:94
uint32_t sr
Status register.
Definition irq.h:93
uint32_t mach
Multiply-and-accumulate register (high)
Definition irq.h:91
uint32_t fpscr
Floating-point status/control register.
Definition irq.h:98
uint32_t macl
Multiply-and-accumulate register (low)
Definition irq.h:92
uint32_t vbr
Vector base register.
Definition irq.h:90
uint32_t pc
Program counter.
Definition irq.h:87
uint32_t gbr
Global base register (TLS segment ptr)
Definition irq.h:89
uint32_t pr
Procedure register (aka return address)
Definition irq.h:88
Common integer types.