forked from Imagelibrary/rtems
2001-01-03 Joel Sherrill <joel@OARcorp.com>
* new_exception_processing/cpu.h, old_exception_processing/cpu.c: old_exception_processing/cpu.h, Added _CPU_Initialize_vectors(). In particular, spurious vector initialization had to be moved on old exception processing model.
This commit is contained in:
@@ -612,7 +612,11 @@ SCORE_EXTERN struct {
|
|||||||
#define CPU_MINIMUM_STACK_FRAME_SIZE 8
|
#define CPU_MINIMUM_STACK_FRAME_SIZE 8
|
||||||
|
|
||||||
|
|
||||||
/* ISR handler macros */
|
/*
|
||||||
|
* ISR handler macros
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define _CPU_Initialize_vectors()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable all interrupts for an RTEMS critical section. The previous
|
* Disable all interrupts for an RTEMS critical section. The previous
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ void _CPU_Initialize(
|
|||||||
void (*thread_dispatch) /* ignored on this CPU */
|
void (*thread_dispatch) /* ignored on this CPU */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
proc_ptr handler = (proc_ptr)ppc_spurious;
|
|
||||||
int i;
|
int i;
|
||||||
#if (PPC_ABI != PPC_ABI_POWEROPEN)
|
#if (PPC_ABI != PPC_ABI_POWEROPEN)
|
||||||
register unsigned32 r2 = 0;
|
register unsigned32 r2 = 0;
|
||||||
@@ -75,7 +74,7 @@ void _CPU_Initialize(
|
|||||||
|
|
||||||
_CPU_IRQ_info.Nest_level = &_ISR_Nest_level;
|
_CPU_IRQ_info.Nest_level = &_ISR_Nest_level;
|
||||||
_CPU_IRQ_info.Disable_level = &_Thread_Dispatch_disable_level;
|
_CPU_IRQ_info.Disable_level = &_Thread_Dispatch_disable_level;
|
||||||
_CPU_IRQ_info.Vector_table = _ISR_Vector_table;
|
/* fill in _CPU_IRQ_info.Vector_table later */
|
||||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||||
_CPU_IRQ_info.Dispatch_r2 = ((unsigned32 *)_Thread_Dispatch)[1];
|
_CPU_IRQ_info.Dispatch_r2 = ((unsigned32 *)_Thread_Dispatch)[1];
|
||||||
#endif
|
#endif
|
||||||
@@ -97,15 +96,34 @@ void _CPU_Initialize(
|
|||||||
asm volatile("mtspr 0x112, %0" : "=r" (i) : "0" (i)); /* SPRG 2 */
|
asm volatile("mtspr 0x112, %0" : "=r" (i) : "0" (i)); /* SPRG 2 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( cpu_table->spurious_handler )
|
_CPU_Table = *cpu_table;
|
||||||
handler = (proc_ptr)cpu_table->spurious_handler;
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _CPU_Initialize_vectors()
|
||||||
|
*
|
||||||
|
* Support routine to initialize the RTEMS vector table after it is allocated.
|
||||||
|
*
|
||||||
|
* PowerPC Specific Information:
|
||||||
|
*
|
||||||
|
* Complete initialization since the table is now allocated.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void _CPU_Initialize_vectors(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
proc_ptr handler = (proc_ptr)ppc_spurious;
|
||||||
|
|
||||||
|
_CPU_IRQ_info.Vector_table = _ISR_Vector_table;
|
||||||
|
|
||||||
|
if ( _CPU_Table.spurious_handler )
|
||||||
|
handler = (proc_ptr)_CPU_Table.spurious_handler;
|
||||||
|
|
||||||
for (i = 0; i < PPC_INTERRUPT_MAX; i++)
|
for (i = 0; i < PPC_INTERRUPT_MAX; i++)
|
||||||
_ISR_Vector_table[i] = handler;
|
_ISR_Vector_table[i] = handler;
|
||||||
|
|
||||||
_CPU_Table = *cpu_table;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
* _CPU_ISR_Calculate_level
|
* _CPU_ISR_Calculate_level
|
||||||
|
|||||||
@@ -706,7 +706,11 @@ SCORE_EXTERN struct {
|
|||||||
|
|
||||||
#define CPU_STACK_ALIGNMENT (PPC_STACK_ALIGNMENT)
|
#define CPU_STACK_ALIGNMENT (PPC_STACK_ALIGNMENT)
|
||||||
|
|
||||||
/* ISR handler macros */
|
/*
|
||||||
|
* ISR handler macros
|
||||||
|
*/
|
||||||
|
|
||||||
|
void _CPU_Initialize_vectors(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable all interrupts for an RTEMS critical section. The previous
|
* Disable all interrupts for an RTEMS critical section. The previous
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
2001-01-03 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* new_exception_processing/cpu.h, old_exception_processing/cpu.c:
|
||||||
|
old_exception_processing/cpu.h, Added _CPU_Initialize_vectors().
|
||||||
|
In particular, spurious vector initialization had to be moved
|
||||||
|
on old exception processing model.
|
||||||
|
|
||||||
2000-11-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
2000-11-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS.
|
* Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS.
|
||||||
|
|||||||
@@ -612,7 +612,11 @@ SCORE_EXTERN struct {
|
|||||||
#define CPU_MINIMUM_STACK_FRAME_SIZE 8
|
#define CPU_MINIMUM_STACK_FRAME_SIZE 8
|
||||||
|
|
||||||
|
|
||||||
/* ISR handler macros */
|
/*
|
||||||
|
* ISR handler macros
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define _CPU_Initialize_vectors()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable all interrupts for an RTEMS critical section. The previous
|
* Disable all interrupts for an RTEMS critical section. The previous
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ void _CPU_Initialize(
|
|||||||
void (*thread_dispatch) /* ignored on this CPU */
|
void (*thread_dispatch) /* ignored on this CPU */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
proc_ptr handler = (proc_ptr)ppc_spurious;
|
|
||||||
int i;
|
int i;
|
||||||
#if (PPC_ABI != PPC_ABI_POWEROPEN)
|
#if (PPC_ABI != PPC_ABI_POWEROPEN)
|
||||||
register unsigned32 r2 = 0;
|
register unsigned32 r2 = 0;
|
||||||
@@ -75,7 +74,7 @@ void _CPU_Initialize(
|
|||||||
|
|
||||||
_CPU_IRQ_info.Nest_level = &_ISR_Nest_level;
|
_CPU_IRQ_info.Nest_level = &_ISR_Nest_level;
|
||||||
_CPU_IRQ_info.Disable_level = &_Thread_Dispatch_disable_level;
|
_CPU_IRQ_info.Disable_level = &_Thread_Dispatch_disable_level;
|
||||||
_CPU_IRQ_info.Vector_table = _ISR_Vector_table;
|
/* fill in _CPU_IRQ_info.Vector_table later */
|
||||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||||
_CPU_IRQ_info.Dispatch_r2 = ((unsigned32 *)_Thread_Dispatch)[1];
|
_CPU_IRQ_info.Dispatch_r2 = ((unsigned32 *)_Thread_Dispatch)[1];
|
||||||
#endif
|
#endif
|
||||||
@@ -97,15 +96,34 @@ void _CPU_Initialize(
|
|||||||
asm volatile("mtspr 0x112, %0" : "=r" (i) : "0" (i)); /* SPRG 2 */
|
asm volatile("mtspr 0x112, %0" : "=r" (i) : "0" (i)); /* SPRG 2 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( cpu_table->spurious_handler )
|
_CPU_Table = *cpu_table;
|
||||||
handler = (proc_ptr)cpu_table->spurious_handler;
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _CPU_Initialize_vectors()
|
||||||
|
*
|
||||||
|
* Support routine to initialize the RTEMS vector table after it is allocated.
|
||||||
|
*
|
||||||
|
* PowerPC Specific Information:
|
||||||
|
*
|
||||||
|
* Complete initialization since the table is now allocated.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void _CPU_Initialize_vectors(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
proc_ptr handler = (proc_ptr)ppc_spurious;
|
||||||
|
|
||||||
|
_CPU_IRQ_info.Vector_table = _ISR_Vector_table;
|
||||||
|
|
||||||
|
if ( _CPU_Table.spurious_handler )
|
||||||
|
handler = (proc_ptr)_CPU_Table.spurious_handler;
|
||||||
|
|
||||||
for (i = 0; i < PPC_INTERRUPT_MAX; i++)
|
for (i = 0; i < PPC_INTERRUPT_MAX; i++)
|
||||||
_ISR_Vector_table[i] = handler;
|
_ISR_Vector_table[i] = handler;
|
||||||
|
|
||||||
_CPU_Table = *cpu_table;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
* _CPU_ISR_Calculate_level
|
* _CPU_ISR_Calculate_level
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ void _CPU_Initialize(
|
|||||||
void (*thread_dispatch) /* ignored on this CPU */
|
void (*thread_dispatch) /* ignored on this CPU */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
proc_ptr handler = (proc_ptr)ppc_spurious;
|
|
||||||
int i;
|
int i;
|
||||||
#if (PPC_ABI != PPC_ABI_POWEROPEN)
|
#if (PPC_ABI != PPC_ABI_POWEROPEN)
|
||||||
register unsigned32 r2 = 0;
|
register unsigned32 r2 = 0;
|
||||||
@@ -75,7 +74,7 @@ void _CPU_Initialize(
|
|||||||
|
|
||||||
_CPU_IRQ_info.Nest_level = &_ISR_Nest_level;
|
_CPU_IRQ_info.Nest_level = &_ISR_Nest_level;
|
||||||
_CPU_IRQ_info.Disable_level = &_Thread_Dispatch_disable_level;
|
_CPU_IRQ_info.Disable_level = &_Thread_Dispatch_disable_level;
|
||||||
_CPU_IRQ_info.Vector_table = _ISR_Vector_table;
|
/* fill in _CPU_IRQ_info.Vector_table later */
|
||||||
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
#if (PPC_ABI == PPC_ABI_POWEROPEN)
|
||||||
_CPU_IRQ_info.Dispatch_r2 = ((unsigned32 *)_Thread_Dispatch)[1];
|
_CPU_IRQ_info.Dispatch_r2 = ((unsigned32 *)_Thread_Dispatch)[1];
|
||||||
#endif
|
#endif
|
||||||
@@ -97,15 +96,34 @@ void _CPU_Initialize(
|
|||||||
asm volatile("mtspr 0x112, %0" : "=r" (i) : "0" (i)); /* SPRG 2 */
|
asm volatile("mtspr 0x112, %0" : "=r" (i) : "0" (i)); /* SPRG 2 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( cpu_table->spurious_handler )
|
_CPU_Table = *cpu_table;
|
||||||
handler = (proc_ptr)cpu_table->spurious_handler;
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _CPU_Initialize_vectors()
|
||||||
|
*
|
||||||
|
* Support routine to initialize the RTEMS vector table after it is allocated.
|
||||||
|
*
|
||||||
|
* PowerPC Specific Information:
|
||||||
|
*
|
||||||
|
* Complete initialization since the table is now allocated.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void _CPU_Initialize_vectors(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
proc_ptr handler = (proc_ptr)ppc_spurious;
|
||||||
|
|
||||||
|
_CPU_IRQ_info.Vector_table = _ISR_Vector_table;
|
||||||
|
|
||||||
|
if ( _CPU_Table.spurious_handler )
|
||||||
|
handler = (proc_ptr)_CPU_Table.spurious_handler;
|
||||||
|
|
||||||
for (i = 0; i < PPC_INTERRUPT_MAX; i++)
|
for (i = 0; i < PPC_INTERRUPT_MAX; i++)
|
||||||
_ISR_Vector_table[i] = handler;
|
_ISR_Vector_table[i] = handler;
|
||||||
|
|
||||||
_CPU_Table = *cpu_table;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
* _CPU_ISR_Calculate_level
|
* _CPU_ISR_Calculate_level
|
||||||
|
|||||||
@@ -706,7 +706,11 @@ SCORE_EXTERN struct {
|
|||||||
|
|
||||||
#define CPU_STACK_ALIGNMENT (PPC_STACK_ALIGNMENT)
|
#define CPU_STACK_ALIGNMENT (PPC_STACK_ALIGNMENT)
|
||||||
|
|
||||||
/* ISR handler macros */
|
/*
|
||||||
|
* ISR handler macros
|
||||||
|
*/
|
||||||
|
|
||||||
|
void _CPU_Initialize_vectors(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable all interrupts for an RTEMS critical section. The previous
|
* Disable all interrupts for an RTEMS critical section. The previous
|
||||||
|
|||||||
Reference in New Issue
Block a user