forked from Imagelibrary/rtems
score: Add INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR
Use INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR on PowerPC for _CPU_ISR_install_vector().
This commit is contained in:
@@ -132,25 +132,3 @@ void _CPU_Context_Initialize(
|
|||||||
_CPU_Context_initialize_altivec(the_context);
|
_CPU_Context_initialize_altivec(the_context);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _CPU_ISR_install_vector
|
|
||||||
*
|
|
||||||
* This kernel routine installs the RTEMS handler for the
|
|
||||||
* specified vector.
|
|
||||||
*
|
|
||||||
* Input parameters:
|
|
||||||
* vector - interrupt vector number
|
|
||||||
* old_handler - former ISR for this vector number
|
|
||||||
* new_handler - replacement ISR for this vector number
|
|
||||||
*
|
|
||||||
* Output parameters: NONE
|
|
||||||
*/
|
|
||||||
|
|
||||||
void _CPU_ISR_install_vector(
|
|
||||||
uint32_t vector,
|
|
||||||
proc_ptr new_handler,
|
|
||||||
proc_ptr *old_handler
|
|
||||||
)
|
|
||||||
{
|
|
||||||
BSP_panic("_CPU_ISR_install_vector called\n");
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ static const char *const internal_error_desc [] = {
|
|||||||
"INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP",
|
"INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP",
|
||||||
"INTERNAL_ERROR_GXX_KEY_ADD_FAILED",
|
"INTERNAL_ERROR_GXX_KEY_ADD_FAILED",
|
||||||
"INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED",
|
"INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED",
|
||||||
"INTERNAL_ERROR_NO_MEMORY_FOR_HEAP"
|
"INTERNAL_ERROR_NO_MEMORY_FOR_HEAP",
|
||||||
|
"INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR"
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *rtems_internal_error_description( rtems_fatal_code error )
|
const char *rtems_internal_error_description( rtems_fatal_code error )
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ include_rtems_powerpc_HEADERS = rtems/powerpc/registers.h
|
|||||||
|
|
||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
libscorecpu_a_SOURCES = cpu.c
|
libscorecpu_a_SOURCES = cpu.c
|
||||||
|
libscorecpu_a_SOURCES += ppc-isr-vector-install.c
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|
||||||
include $(srcdir)/preinstall.am
|
include $(srcdir)/preinstall.am
|
||||||
|
|||||||
33
cpukit/score/cpu/powerpc/ppc-isr-vector-install.c
Normal file
33
cpukit/score/cpu/powerpc/ppc-isr-vector-install.c
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
|
||||||
|
*
|
||||||
|
* embedded brains GmbH
|
||||||
|
* Obere Lagerstr. 30
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@embedded-brains.de>
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <rtems/score/cpu.h>
|
||||||
|
#include <rtems/score/interr.h>
|
||||||
|
|
||||||
|
void _CPU_ISR_install_vector(
|
||||||
|
uint32_t vector,
|
||||||
|
proc_ptr new_handler,
|
||||||
|
proc_ptr *old_handler
|
||||||
|
)
|
||||||
|
{
|
||||||
|
_Internal_error_Occurred(
|
||||||
|
INTERNAL_ERROR_CORE,
|
||||||
|
false,
|
||||||
|
INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -73,7 +73,8 @@ typedef enum {
|
|||||||
INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP,
|
INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP,
|
||||||
INTERNAL_ERROR_GXX_KEY_ADD_FAILED,
|
INTERNAL_ERROR_GXX_KEY_ADD_FAILED,
|
||||||
INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED,
|
INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED,
|
||||||
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP
|
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP,
|
||||||
|
INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR
|
||||||
} Internal_errors_Core_list;
|
} Internal_errors_Core_list;
|
||||||
|
|
||||||
typedef uint32_t Internal_errors_t;
|
typedef uint32_t Internal_errors_t;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ static void test(void)
|
|||||||
puts( desc );
|
puts( desc );
|
||||||
} while ( desc != desc_last );
|
} while ( desc != desc_last );
|
||||||
|
|
||||||
rtems_test_assert( error - 3 == INTERNAL_ERROR_NO_MEMORY_FOR_HEAP );
|
rtems_test_assert( error - 3 == INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UP
|
|||||||
INTERNAL_ERROR_GXX_KEY_ADD_FAILED
|
INTERNAL_ERROR_GXX_KEY_ADD_FAILED
|
||||||
INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED
|
INTERNAL_ERROR_GXX_MUTEX_INIT_FAILED
|
||||||
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP
|
INTERNAL_ERROR_NO_MEMORY_FOR_HEAP
|
||||||
|
INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR
|
||||||
?
|
?
|
||||||
?
|
?
|
||||||
*** END OF TEST SPINTERNALERROR 2 ***
|
*** END OF TEST SPINTERNALERROR 2 ***
|
||||||
|
|||||||
Reference in New Issue
Block a user