forked from Imagelibrary/rtems
Score ISR - Minimize Capabilities When Not Simple Vectored
In particular CPU_INTERRUPT_NUMBER_OF_VECTORS and CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER are only used on Simple Vectored Architectures, so do not depend on them being defined. This disables as much as possible that is specific to the Simple Vectored Model and not expected to be used on architectures which use the Programmable Interrupt Controller model for interrupt handler vectoring.
This commit is contained in:
@@ -48,8 +48,13 @@ typedef ISR_Vector_number rtems_vector_number;
|
|||||||
/**
|
/**
|
||||||
* @brief Return type for interrupt handler.
|
* @brief Return type for interrupt handler.
|
||||||
*/
|
*/
|
||||||
typedef void rtems_isr;
|
typedef ISR_Handler rtems_isr;
|
||||||
|
|
||||||
|
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE)
|
||||||
|
|
||||||
|
typedef ISR_Handler_entry rtems_isr_entry;
|
||||||
|
|
||||||
|
#else
|
||||||
/**
|
/**
|
||||||
* @brief Interrupt handler type.
|
* @brief Interrupt handler type.
|
||||||
*
|
*
|
||||||
@@ -59,7 +64,6 @@ typedef rtems_isr ( *rtems_isr_entry )(
|
|||||||
rtems_vector_number
|
rtems_vector_number
|
||||||
);
|
);
|
||||||
|
|
||||||
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
|
|
||||||
/**
|
/**
|
||||||
* @brief Implementation of the rtems_interrupt_catch directive.
|
* @brief Implementation of the rtems_interrupt_catch directive.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT (c) 1989-2007.
|
* COPYRIGHT (c) 1989-2012.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* COPYRIGHT (c) 1995 i-cubed ltd.
|
* COPYRIGHT (c) 1995 i-cubed ltd.
|
||||||
@@ -624,11 +624,13 @@ SCORE_EXTERN struct {
|
|||||||
/*
|
/*
|
||||||
* This defines the number of entries in the ISR_Vector_table managed
|
* This defines the number of entries in the ISR_Vector_table managed
|
||||||
* by RTEMS.
|
* by RTEMS.
|
||||||
|
*
|
||||||
|
* NOTE: CPU_INTERRUPT_NUMBER_OF_VECTORS and
|
||||||
|
* CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER are only used on
|
||||||
|
* Simple Vectored Architectures and thus are not defined
|
||||||
|
* for this architecture.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CPU_INTERRUPT_NUMBER_OF_VECTORS (0)
|
|
||||||
#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER (UINT32_MAX)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is defined if the port has a special way to report the ISR nesting
|
* This is defined if the port has a special way to report the ISR nesting
|
||||||
* level. Most ports maintain the variable _ISR_Nest_level. Note that
|
* level. Most ports maintain the variable _ISR_Nest_level. Note that
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT (c) 1989-2006.
|
* COPYRIGHT (c) 1989-2012.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -50,6 +50,11 @@ typedef uint32_t ISR_Vector_number;
|
|||||||
*/
|
*/
|
||||||
typedef void ISR_Handler;
|
typedef void ISR_Handler;
|
||||||
|
|
||||||
|
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == FALSE)
|
||||||
|
|
||||||
|
typedef void * ISR_Handler_entry;
|
||||||
|
|
||||||
|
#else
|
||||||
/**
|
/**
|
||||||
* Pointer to an ISR Handler
|
* Pointer to an ISR Handler
|
||||||
*/
|
*/
|
||||||
@@ -76,7 +81,6 @@ typedef ISR_Handler ( *ISR_Handler_entry )(
|
|||||||
*/
|
*/
|
||||||
#define ISR_INTERRUPT_MAXIMUM_VECTOR_NUMBER CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER
|
#define ISR_INTERRUPT_MAXIMUM_VECTOR_NUMBER CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER
|
||||||
|
|
||||||
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
|
|
||||||
/**
|
/**
|
||||||
* The following declares the Vector Table. Application
|
* The following declares the Vector Table. Application
|
||||||
* interrupt service routines are vectored by the ISR Handler via this table.
|
* interrupt service routines are vectored by the ISR Handler via this table.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT (c) 1989-2004.
|
* COPYRIGHT (c) 1989-2012.
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
|
||||||
/**
|
/**
|
||||||
* This function returns true if the vector is a valid vector number
|
* This function returns true if the vector is a valid vector number
|
||||||
* for this processor and false otherwise.
|
* for this processor and false otherwise.
|
||||||
@@ -51,6 +52,7 @@ RTEMS_INLINE_ROUTINE bool _ISR_Is_valid_user_handler (
|
|||||||
{
|
{
|
||||||
return (handler != NULL);
|
return (handler != NULL);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user