bsps/sparc: Remove set_vector() usage and implementation

Removed all uses and implementations of set_vector() function across ERC32,
LEON2, and LEON3 BSPs. Replaced with rtems_interrupt_handler_install() and
rtems_interrupt_entry_install().

- Added ERC32_Clear_and_unmask_interrupt() and LEON_Clear_and_unmask_interrupt()
  for unmasking logic previously in set_vector().
- Deleted set_vector() definitions and implementations in each BSP.
- Updated related obj.yml files.
- Replaced set_vector() with rtems_interrupt_catch() in shared/gnatcommon.c.
This commit is contained in:
Sunil-Hegde
2025-05-16 01:43:20 +05:30
committed by Sunil Hegde
parent 3e1a73d634
commit a899cdd57d
17 changed files with 250 additions and 298 deletions

View File

@@ -66,7 +66,7 @@ void _CPU_SMP_Send_interrupt( uint32_t target_processor_index )
}
static rtems_isr bsp_inter_processor_interrupt(
rtems_vector_number vector
void *vector
)
{
_SMP_Inter_processor_interrupt_handler( _Per_CPU_Get() );
@@ -74,7 +74,21 @@ static rtems_isr bsp_inter_processor_interrupt(
static void erc32_install_inter_processor_interrupt( void )
{
set_vector( bsp_inter_processor_interrupt, IPI_VECTOR, 1 );
rtems_interrupt_entry erc32_handle_ipi;
rtems_interrupt_entry_initialize(
&erc32_handle_ipi,
bsp_inter_processor_interrupt,
NULL,
"process IPI Interrupt"
);
rtems_interrupt_entry_install(
IPI_VECTOR,
RTEMS_INTERRUPT_UNIQUE,
&erc32_handle_ipi
);
SPARC_Clear_and_unmask_interrupt(IPI_VECTOR);
}
RTEMS_SYSINIT_ITEM(

View File

@@ -1,61 +0,0 @@
/* set_vector
*
* This routine installs an interrupt vector on the SPARC simulator.
*
* INPUT PARAMETERS:
* handler - interrupt handler entry point
* vector - vector number
* type - 0 indicates raw hardware connect
* 1 indicates RTEMS interrupt connect
*
* OUTPUT PARAMETERS: NONE
*
* RETURNS:
* address of previous interrupt handler
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*
* Ported to ERC32 implementation of the SPARC by On-Line Applications
* Research Corporation (OAR) under contract to the European Space
* Agency (ESA).
*
* ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
* European Space Agency.
*/
#include <bsp.h>
rtems_isr_entry set_vector( /* returns old vector */
rtems_isr_entry handler, /* isr routine */
rtems_vector_number vector, /* vector number */
int type /* RTEMS or RAW intr */
)
{
rtems_isr_entry previous_isr;
if ( type ) {
rtems_interrupt_catch( handler, vector, &previous_isr );
} else {
_CPU_ISR_install_raw_handler(
vector,
(void *)handler,
(void *)&previous_isr
);
}
if ( SPARC_IS_INTERRUPT_TRAP( vector ) ) {
uint32_t source;
source = SPARC_INTERRUPT_TRAP_TO_SOURCE( vector );
ERC32_Clear_interrupt( source );
ERC32_Unmask_interrupt( source );
}
return previous_isr;
}