base/include/asm-ppc/rtai_vectors.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright (C) 2000-2007 Paolo Mantegazza,
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU General Public License as published by
00006  *   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
00007  *   USA; either version 2 of the License, or (at your option) any later
00008  *   version.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with this program; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018  */
00019 
00020 #ifndef _RTAI_ASM_PPC_VECTORS_H
00021 #define _RTAI_ASM_PPC_VECTORS_H
00022 
00023 #include <rtai_hal_names.h>
00024 #include <rtai_config.h>
00025 
00026 #ifdef CONFIG_SMP
00027 #define RTAI_APIC_HIGH_VECTOR  HAL_APIC_HIGH_VECTOR
00028 #define RTAI_APIC_LOW_VECTOR   HAL_APIC_LOW_VECTOR
00029 #else 
00030 #define RTAI_APIC_HIGH_VECTOR  0xff
00031 #define RTAI_APIC_LOW_VECTOR   0xff
00032 #endif
00033 
00034 #define RTAI_APIC_HIGH_IPI     (RTAI_APIC_HIGH_VECTOR - FIRST_EXTERNAL_VECTOR)
00035 #define RTAI_APIC_LOW_IPI      (RTAI_APIC_LOW_VECTOR - FIRST_EXTERNAL_VECTOR)
00036 
00037 #define RTAI_SYS_VECTOR        0xF6
00038 
00039 #if RTAI_APIC_HIGH_VECTOR == RTAI_SYS_VECTOR || RTAI_APIC_LOW_VECTOR == RTAI_SYS_VECTOR
00040 #error *** RTAI_SYS_VECTOR CONFLICTS WITH APIC VECTORS USED BY RTAI ***
00041 #endif
00042 
00043 #define __rtai_stringize0(_s_) #_s_
00044 #define __rtai_stringize(_s_)  __rtai_stringize0(_s_)
00045 #define __rtai_trap_call(_t_)  _t_
00046 #define __rtai_do_trap0(_t_)   __rtai_stringize(int $ _t_)
00047 #define __rtai_do_trap(_t_)    __rtai_do_trap0(__rtai_trap_call(_t_))
00048 
00049 #define RTAI_DO_TRAP(v, r, a1, a2)  do { __asm__ __volatile__ ( __rtai_do_trap(v): : "a" (a1), "c" (a2), "d" (&r)); } while (0)
00050 
00051 #endif /* _RTAI_ASM_PPC_VECTORS_H */

Generated on Tue Feb 2 17:46:05 2010 for RTAI API by  doxygen 1.4.7