Ejemplo n.º 1
0
void bsp_reset()
{

  printk("Printing a stack trace for your convenience :-)\n");
  CPU_print_stack();

  printk("RTEMS terminated; Rebooting ...\n");
  /* Mvme5500 board reset : 2004 S. Kate Feng <*****@*****.**>  */
  out_8((volatile uint8_t*) (GT64x60_DEV1_BASE +2), 0x80);
}
Ejemplo n.º 2
0
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 %i)\n",
            _Thread_Dispatch_get_disable_level());

    if ( _ISR_Nest_level ) {
        printk(
            "  Error occurred from ISR context (ISR nest level %i)\n",
            _ISR_Nest_level
        );
    }

    printk("Error %d",THEERR);
    if (err) {
        printk(": %s",err);
    }
    printk("\n");
    printk("Stack Trace:\n");
    CPU_print_stack();

    rebootQuestion();
}
Ejemplo n.º 3
0
void bsp_cleanup(void)
{
#if AUTO_BOOT
  /* Till Straumann <*****@*****.**> for SVGM */
  void rtemsReboot();

  rtemsReboot();
#else
  /* Kate Feng <*****@*****.**> for the MVME5500 */
  printk("\nPrinting a stack trace for your convenience :-)\n");
  CPU_print_stack();
  printk("RTEMS terminated; Boot manually or turn on AUTO_BOOT.\n");
#endif
}
Ejemplo n.º 4
0
/*-------------------------------------------------------------------------+
|         Function: bsp_reset
|      Description: Reboot the PC.
| Global Variables: None.
|        Arguments: None.
|          Returns: Nothing.
+--------------------------------------------------------------------------*/
void bsp_reset(void)
{
  printk("Printing a stack trace for your convenience :-)\n");
  CPU_print_stack();
  /* shutdown and reboot */

#if defined(mvme2100)
  *(unsigned char*)0xffe00000 |= 0x80;
#else
   /* Memory-mapped Port 92 PIB device access
   *(unsigned char*)0x80000092 |= 0x01;
   */
   outb(1, 0x92);

#endif
} /* bsp_reset */
Ejemplo n.º 5
0
void bsp_fatal_extension(
  rtems_fatal_source source,
  bool is_internal,
  rtems_fatal_code error
)
{
#if AUTO_BOOT
  /* Till Straumann <*****@*****.**> for SVGM */
  bsp_reset();
#else
  /* Kate Feng <*****@*****.**> for the MVME5500 */
  printk("\nPrinting a stack trace for your convenience :-)\n");
  CPU_print_stack();
  printk("RTEMS terminated; Boot manually or turn on AUTO_BOOT.\n");
#endif
}