source: rtems/c/src/lib/libcpu/powerpc/mpc505/vectors/vectors.S @ a982e0c6

4.104.114.84.95
Last change on this file since a982e0c6 was a982e0c6, checked in by Joel Sherrill <joel.sherrill@…>, on 10/18/00 at 18:24:43

2000-10-18 Sergei Organov <osv@…>

  • Added full support for MPC505.
  • mpc505/ictrl: New directory.
  • configure.in, mpc505/Makefile.am: Modified to reflect ictrl addition.
  • mpc505/ictrl/.cvsignore, mpc505/ictrl/Makefile.am, mpc505/ictrl/ictrl.c, mpc505/ictrl/ictrl.h: New files.
  • mpc505/timer/timer.c: Use <rtems.h>, not "rtems.h".
  • mpc505/vectors/Makefile.am: alignment exception handler now included.
  • mpc505/vectors/vectors.S: Now use constants for exception numbers.
  • old_exception_processing/ppc_offs.h: New file.
  • old_exception_processing/Makefile.am: Account for ppc_offs.h.
  • old_exception_processing/cpu.h: Make Nest and Disable levels volatile.
  • old_exception_processing/cpu_asm.S: Offsets moved to ppc_offs.h.
  • Property mode set to 100644
File size: 3.2 KB
Line 
1/*  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 <osv@javad.ru>
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 <rtems/score/ppc.h>
25#include <rtems/score/ppc_offs.h>
26
27        /* Vector offsets */
28        .set    reset,                  0x0100 # PPC_IRQ_SYSTEM_RESET
29        .set    machine_check,          0x0200 # PPC_IRQ_MCHECK
30        .set    dsi,                    0x0300 # PPC_IRQ_PROTECT
31        .set    isi,                    0x0400 # PPC_IRQ_ISI
32        .set    external_interrupt,     0x0500 # PPC_IRQ_EXTERNAL
33        .set    alignment,              0x0600 # PPC_IRQ_ALIGNMENT
34        .set    program,                0x0700 # PPC_IRQ_PROGRAM
35        .set    fp_unavailable,         0x0800 # PPC_IRQ_NOFP
36        .set    decrementer,            0x0900 # PPC_IRQ_DECREMENTER
37        .set    system_call,            0x0C00 # PPC_IRQ_SCALL
38        .set    trace,                  0x0D00 # PPC_IRQ_TRACE
39        .set    fp_assist,              0x0E00 # PPC_IRQ_FP_ASST
40        .set    software_emulation,     0x1000 # PPC_IRQ_SOFTEMU
41        .set    data_bp,                0x1C00 # PPC_IRQ_DATA_BP
42        .set    istruction_bp,          0x1D00 # PPC_IRQ_INST_BP
43        .set    m_extern_bp,            0x1E00 # PPC_IRQ_MEXT_BP
44        .set    nm_extern_bp,           0x1F00 # PPC_IRQ_NMEXT_BP
45
46#if (PPC_ABI == PPC_ABI_POWEROPEN || PPC_ABI == PPC_ABI_GCC27)
47#define ABI_ADD 20*4
48#else
49#define ABI_ADD 0
50#endif
51        .extern led_green
52#define ISR_HANDLER(vector, irq) \
53        .org    vector; \
54        stwu    r1, -(ABI_ADD + IP_END)(r1); \
55        stw     r0, IP_0(r1); \
56        li      r0, irq; \
57        b       PROC (_ISR_Handler);
58
59        /* Go to the right section */
60        .section .vect,"ax",@progbits
61        .globl  __vect
62__vect:
63        ISR_HANDLER(reset,              PPC_IRQ_SYSTEM_RESET)
64        ISR_HANDLER(machine_check,      PPC_IRQ_MCHECK)
65        ISR_HANDLER(dsi,                PPC_IRQ_PROTECT)
66        ISR_HANDLER(isi,                PPC_IRQ_ISI)
67        ISR_HANDLER(external_interrupt, PPC_IRQ_EXTERNAL)
68        ISR_HANDLER(alignment,          PPC_IRQ_ALIGNMENT)
69        ISR_HANDLER(program,            PPC_IRQ_PROGRAM)
70        ISR_HANDLER(fp_unavailable,     PPC_IRQ_NOFP)
71        ISR_HANDLER(decrementer,        PPC_IRQ_DECREMENTER)
72        ISR_HANDLER(system_call,        PPC_IRQ_SCALL)
73        ISR_HANDLER(trace,              PPC_IRQ_TRACE)
74        ISR_HANDLER(fp_assist,          PPC_IRQ_FP_ASST)
75        ISR_HANDLER(software_emulation, PPC_IRQ_SOFTEMU)
76        ISR_HANDLER(data_bp,            PPC_IRQ_DATA_BP)
77        ISR_HANDLER(istruction_bp,      PPC_IRQ_INST_BP)
78        ISR_HANDLER(m_extern_bp,        PPC_IRQ_MEXT_BP)
79        ISR_HANDLER(nm_extern_bp,       PPC_IRQ_NMEXT_BP)
Note: See TracBrowser for help on using the repository browser.