1 |
30 |
unneback |
/* vectors.s 1.1 - 95/12/04
|
2 |
|
|
*
|
3 |
|
|
* This file contains the assembly code for the PowerPC 505
|
4 |
|
|
* interrupt veneers for RTEMS.
|
5 |
|
|
*
|
6 |
|
|
* Author: Sergei Organov
|
7 |
|
|
*
|
8 |
|
|
* COPYRIGHT (c) 1998 by JPS.
|
9 |
|
|
*
|
10 |
|
|
* To anyone who acknowledges that this file is provided "AS IS"
|
11 |
|
|
* without any express or implied warranty:
|
12 |
|
|
* permission to use, copy, modify, and distribute this file
|
13 |
|
|
* for any purpose is hereby granted without fee, provided that
|
14 |
|
|
* the above copyright notice and this notice appears in all
|
15 |
|
|
* copies, and that the name of i-cubed limited not be used in
|
16 |
|
|
* advertising or publicity pertaining to distribution of the
|
17 |
|
|
* software without specific, written prior permission.
|
18 |
|
|
* i-cubed limited makes no representations about the suitability
|
19 |
|
|
* of this software for any purpose.
|
20 |
|
|
*
|
21 |
|
|
*/
|
22 |
|
|
|
23 |
|
|
#include "asm.h"
|
24 |
|
|
#include "ppc_offs.h"
|
25 |
|
|
|
26 |
|
|
/* Vector offsets */
|
27 |
|
|
.set reset, 0x0100 # PPC_IRQ_RESET
|
28 |
|
|
.set machine_check, 0x0200 # PPC_IRQ_MCHECK
|
29 |
|
|
.set dsi, 0x0300 # PPC_IRQ_PROTECT
|
30 |
|
|
.set isi, 0x0400 # PPC_IRQ_ISI
|
31 |
|
|
.set external_interrupt, 0x0500 # PPC_IRQ_EXTERNAL
|
32 |
|
|
.set alignment, 0x0600 # PPC_IRQ_ALIGN
|
33 |
|
|
.set program, 0x0700 # PPC_IRQ_PROGRAM
|
34 |
|
|
.set fp_unavailable, 0x0800 # PPC_IRQ_NOFP
|
35 |
|
|
.set decrementer, 0x0900 # PPC_IRQ_DEC
|
36 |
|
|
.set system_call, 0x0C00 # PPC_IRQ_SCALL
|
37 |
|
|
.set trace, 0x0D00 # PPC_IRQ_TRACE
|
38 |
|
|
.set fp_assist, 0x0E00 # PPC_IRQ_FPASSIST
|
39 |
|
|
.set software_emulation, 0x1000 # PPC_IRQ_SOFTEMU
|
40 |
|
|
.set data_bp, 0x1C00 # PPC_IRQ_DATA_BP
|
41 |
|
|
.set istruction_bp, 0x1D00 # PPC_IRQ_INST_BP
|
42 |
|
|
.set m_extern_bp, 0x1E00 # PPC_IRQ_MEXT_BP
|
43 |
|
|
.set nm_extern_bp, 0x1F00 # PPC_IRQ_NMEXT_BP
|
44 |
|
|
|
45 |
|
|
#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
|
46 |
|
|
#define ABI_ADD 20*4
|
47 |
|
|
#else
|
48 |
|
|
#define ABI_ADD 0
|
49 |
|
|
#endif
|
50 |
|
|
|
51 |
|
|
#define ISR_HANDLER(vector, irq) \
|
52 |
|
|
.org vector; \
|
53 |
|
|
stwu r1, -(ABI_ADD + IP_END)(r1); \
|
54 |
|
|
stw r0, IP_0(r1); \
|
55 |
|
|
li r0, irq; \
|
56 |
|
|
b PROC (_ISR_Handler);
|
57 |
|
|
|
58 |
|
|
/* Go to the right section */
|
59 |
|
|
.section .vect,"ax",@progbits
|
60 |
|
|
.globl __vect
|
61 |
|
|
__vect:
|
62 |
|
|
ISR_HANDLER(reset, PPC_IRQ_RESET)
|
63 |
|
|
ISR_HANDLER(machine_check, PPC_IRQ_MCHECK)
|
64 |
|
|
ISR_HANDLER(dsi, PPC_IRQ_PROTECT)
|
65 |
|
|
ISR_HANDLER(isi, PPC_IRQ_ISI)
|
66 |
|
|
ISR_HANDLER(external_interrupt, PPC_IRQ_EXTERNAL)
|
67 |
|
|
ISR_HANDLER(alignment, PPC_IRQ_ALIGN)
|
68 |
|
|
ISR_HANDLER(program, PPC_IRQ_PROGRAM)
|
69 |
|
|
ISR_HANDLER(fp_unavailable, PPC_IRQ_NOFP)
|
70 |
|
|
ISR_HANDLER(decrementer, PPC_IRQ_DEC)
|
71 |
|
|
ISR_HANDLER(system_call, PPC_IRQ_SCALL)
|
72 |
|
|
ISR_HANDLER(trace, PPC_IRQ_TRACE)
|
73 |
|
|
ISR_HANDLER(fp_assist, PPC_IRQ_FPASSIST)
|
74 |
|
|
ISR_HANDLER(software_emulation, PPC_IRQ_SOFTEMU)
|
75 |
|
|
ISR_HANDLER(data_bp, PPC_IRQ_DATA_BP)
|
76 |
|
|
ISR_HANDLER(istruction_bp, PPC_IRQ_INST_BP)
|
77 |
|
|
ISR_HANDLER(m_extern_bp, PPC_IRQ_MEXT_BP)
|
78 |
|
|
ISR_HANDLER(nm_extern_bp, PPC_IRQ_NMEXT_BP)
|