m68k: Remove use of proc_ptr

Update #3585.
This commit is contained in:
Sebastian Huber
2018-11-08 15:44:56 +01:00
parent 0e16fa45cd
commit 5c6edeed51
4 changed files with 34 additions and 39 deletions

View File

@@ -308,7 +308,7 @@ dbugInitialise (void)
it may be usefull to do so to check for performances with an oscilloscope */ it may be usefull to do so to check for performances with an oscilloscope */
/* /*
{ {
proc_ptr ignored; CPU_ISR_raw_handler ignored;
_CPU_ISR_install_raw_handler( CONSOLE_VECTOR, _Debug_ISR_Handler_Console, &ignored ); _CPU_ISR_install_raw_handler( CONSOLE_VECTOR, _Debug_ISR_Handler_Console, &ignored );
} }
*/ */
@@ -391,7 +391,7 @@ dbugInitialise (void)
it may be usefull to do so to check for performances with an oscilloscope */ it may be usefull to do so to check for performances with an oscilloscope */
/* /*
{ {
proc_ptr ignored; CPU_ISR_raw_handler ignored;
_CPU_ISR_install_raw_handler( CONSOLE_VECTOR, _Debug_ISR_Handler_Console, &ignored ); _CPU_ISR_install_raw_handler( CONSOLE_VECTOR, _Debug_ISR_Handler_Console, &ignored );
} }
*/ */

View File

@@ -6,14 +6,18 @@
/* /*
* User exception handlers * User exception handlers
*/ */
proc_ptr M68040FPSPUserExceptionHandlers[9]; CPU_ISR_raw_handler M68040FPSPUserExceptionHandlers[9];
/* /*
* Intercept requests to install an exception handler. * Intercept requests to install an exception handler.
* FPSP exceptions get special treatment. * FPSP exceptions get special treatment.
*/ */
static int static int
FPSP_install_raw_handler (uint32_t vector, proc_ptr new_handler, proc_ptr *old_handler) FPSP_install_raw_handler(
uint32_t vector,
CPU_ISR_raw_handler new_handler,
CPU_ISR_raw_handler *old_handler
)
{ {
int fpspVector; int fpspVector;
@@ -71,7 +75,7 @@ M68KFPSPInstallExceptionHandlers (void)
{ 55, _fpspEntry_unsupp }, { 55, _fpspEntry_unsupp },
}; };
int i; int i;
proc_ptr oldHandler; CPU_ISR_raw_handler oldHandler;
for (i = 0 ; i < sizeof fpspHandlers / sizeof fpspHandlers[0] ; i++) { for (i = 0 ; i < sizeof fpspHandlers / sizeof fpspHandlers[0] ; i++) {
_CPU_ISR_install_raw_handler(fpspHandlers[i].vector_number, fpspHandlers[i].handler, &oldHandler); _CPU_ISR_install_raw_handler(fpspHandlers[i].vector_number, fpspHandlers[i].handler, &oldHandler);

View File

@@ -50,8 +50,8 @@ _CPU_ISR_jump_table[ CPU_INTERRUPT_NUMBER_OF_VECTORS ];
#if (M68K_HAS_FPSP_PACKAGE == 1) #if (M68K_HAS_FPSP_PACKAGE == 1)
int (*_FPSP_install_raw_handler)( int (*_FPSP_install_raw_handler)(
uint32_t vector, uint32_t vector,
proc_ptr new_handler, CPU_ISR_raw_handler new_handler,
proc_ptr *old_handler CPU_ISR_raw_handler *old_handler
); );
#endif #endif
@@ -97,17 +97,17 @@ uint32_t _CPU_ISR_Get_level( void )
return level; return level;
} }
/*
* _CPU_ISR_install_raw_handler
*/
void _CPU_ISR_install_raw_handler( void _CPU_ISR_install_raw_handler(
uint32_t vector, uint32_t vector,
proc_ptr new_handler, CPU_ISR_raw_handler new_handler,
proc_ptr *old_handler CPU_ISR_raw_handler *old_handler
) )
{ {
proc_ptr *interrupt_table = NULL; #if ( M68K_HAS_VBR == 1 )
CPU_ISR_raw_handler *interrupt_table = NULL;
#else
_CPU_ISR_handler_entry *interrupt_table = NULL;
#endif
#if (M68K_HAS_FPSP_PACKAGE == 1) #if (M68K_HAS_FPSP_PACKAGE == 1)
/* /*
@@ -141,20 +141,20 @@ void _CPU_ISR_install_raw_handler(
* load it appropriately to vector to the RTEMS jump table. * load it appropriately to vector to the RTEMS jump table.
*/ */
*old_handler = (proc_ptr) _CPU_ISR_jump_table[vector].isr_handler; *old_handler = (CPU_ISR_raw_handler) _CPU_ISR_jump_table[vector].isr_handler;
_CPU_ISR_jump_table[vector].isr_handler = (uint32_t) new_handler; _CPU_ISR_jump_table[vector].isr_handler = (uint32_t) new_handler;
if ( (uint32_t) interrupt_table != 0xFFFFFFFF ) if ( (uint32_t) interrupt_table != 0xFFFFFFFF )
interrupt_table[ vector ] = (proc_ptr) &_CPU_ISR_jump_table[vector]; interrupt_table[ vector ] = &_CPU_ISR_jump_table[vector];
#endif /* M68K_HAS_VBR */ #endif /* M68K_HAS_VBR */
} }
void _CPU_ISR_install_vector( void _CPU_ISR_install_vector(
uint32_t vector, uint32_t vector,
proc_ptr new_handler, CPU_ISR_handler new_handler,
proc_ptr *old_handler CPU_ISR_handler *old_handler
) )
{ {
proc_ptr ignored = 0; /* to avoid warning */ CPU_ISR_raw_handler ignored = 0; /* to avoid warning */
*old_handler = _ISR_Vector_table[ vector ]; *old_handler = _ISR_Vector_table[ vector ];

View File

@@ -564,29 +564,20 @@ extern const unsigned char _CPU_m68k_BFFFO_table[256];
void _CPU_Initialize(void); void _CPU_Initialize(void);
/* typedef void ( *CPU_ISR_raw_handler )( void );
* _CPU_ISR_install_raw_handler
*
* This routine installs a "raw" interrupt handler directly into the
* processor's vector table.
*/
void _CPU_ISR_install_raw_handler( void _CPU_ISR_install_raw_handler(
uint32_t vector, uint32_t vector,
proc_ptr new_handler, CPU_ISR_raw_handler new_handler,
proc_ptr *old_handler CPU_ISR_raw_handler *old_handler
); );
/* typedef void ( *CPU_ISR_handler )( uint32_t );
* _CPU_ISR_install_vector
*
* This routine installs an interrupt vector.
*/
void _CPU_ISR_install_vector( void _CPU_ISR_install_vector(
uint32_t vector, uint32_t vector,
proc_ptr new_handler, CPU_ISR_handler new_handler,
proc_ptr *old_handler CPU_ISR_handler *old_handler
); );
/* /*
@@ -677,8 +668,8 @@ void M68KFPSPInstallExceptionHandlers (void);
extern int (*_FPSP_install_raw_handler)( extern int (*_FPSP_install_raw_handler)(
uint32_t vector, uint32_t vector,
proc_ptr new_handler, CPU_ISR_raw_handler new_handler,
proc_ptr *old_handler CPU_ISR_raw_handler *old_handler
); );
#endif #endif