summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/shared
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-21 12:00:49 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-22 09:40:23 +0100
commit07d96453a98c9df64be87eaf1f9023ba05e90297 (patch)
tree6d4b2e13511403419f36c5b8e50db71d1e9ca6b4 /c/src/lib/libbsp/powerpc/shared
parentpowerpc: Replace BSP_panic() with rtems_panic() (diff)
downloadrtems-07d96453a98c9df64be87eaf1f9023ba05e90297.tar.bz2
powerpc: Remove _BSP_Fatal_error()
BSPs can use the bsp_fatal_extension() to provide BSP-specific fatal error handling. There is no need for a _BSP_Fatal_error(). Close #3246.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared')
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/bspstart.c9
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/panic.c79
2 files changed, 0 insertions, 88 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
index 8a3695ab47..5a97cc8531 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c
@@ -84,15 +84,6 @@ unsigned int BSP_processor_frequency;
*/
unsigned int BSP_time_base_divisor;
-void _BSP_Fatal_error(unsigned int v)
-{
- printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
-
- while (true) {
- /* Do nothing */
- }
-}
-
/*
* Use the shared implementations of the following routines
*/
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/panic.c b/c/src/lib/libbsp/powerpc/shared/startup/panic.c
deleted file mode 100644
index 636dbe6fd0..0000000000
--- a/c/src/lib/libbsp/powerpc/shared/startup/panic.c
+++ /dev/null
@@ -1,79 +0,0 @@
-#include <rtems.h>
-#include <bsp.h>
-#include <bsp/bootcard.h>
-#include <bsp/uart.h>
-#include <rtems/bspIo.h>
-#include <rtems/error.h>
-#include <libcpu/stackTrace.h>
-#include <rtems/score/percpu.h>
-#include <rtems/score/threaddispatch.h>
-
-#include <inttypes.h>
-
-static void
-rebootQuestion(void)
-{
- printk("Press a key to reboot\n");
- BSP_poll_char_via_serial();
- bsp_reset();
-}
-
-#define THESRC _Internal_errors_What_happened.the_source
-#define THEERR _Internal_errors_What_happened.the_error
-
-void _BSP_Fatal_error(unsigned int v)
-{
- unsigned long flags;
- const char *err = 0;
-
- rtems_interrupt_disable(flags);
- (void) flags; /* avoid set but not used warning */
-
- printk("%s\n",_RTEMS_version);
- printk("FATAL ERROR:\n");
- printk("Environment:");
- switch (THESRC) {
- case INTERNAL_ERROR_CORE:
- printk(" RTEMS Core\n");
- err = rtems_internal_error_text(THEERR);
- break;
-
- case INTERNAL_ERROR_RTEMS_API:
- printk(" RTEMS API\n");
- err = rtems_status_text(THEERR);
- break;
-
- case INTERNAL_ERROR_POSIX_API:
- printk(" POSIX API (errno)\n");
- /* could use strerror but I'd rather avoid using this here */
- break;
-
- default:
- printk(" UNKNOWN (0x%x)\n",THESRC);
- break;
- }
- if ( _Thread_Dispatch_is_enabled() )
- printk("enabled\n");
- else
- printk(
- " Error occurred in a Thread Dispatching DISABLED"
- " context (level %" PRIu32 ")\n",
- _Thread_Dispatch_get_disable_level());
-
- if ( _ISR_Nest_level ) {
- printk(
- " Error occurred from ISR context (ISR nest level %" PRIu32 ")\n",
- _ISR_Nest_level
- );
- }
-
- printk("Error %d",THEERR);
- if (err) {
- printk(": %s",err);
- }
- printk("\n");
- printk("Stack Trace:\n");
- CPU_print_stack();
-
- rebootQuestion();
-}