source: rtems/c/src/lib/libbsp/sparc64/niagara/include/bsp.h @ a052181

4.115
Last change on this file since a052181 was a052181, checked in by Sebastian Huber <sebastian.huber@…>, on 11/14/12 at 08:59:10

score: Add RTEMS_FATAL_SOURCE_EXIT

Include <bsp/default-initial-extension.h> in all BSPs. Call
rtems_fatal() with RTEMS_FATAL_SOURCE_EXIT as source and the exit()
status code as fatal code in every bsp_cleanup(). Move previous
bsp_cleanup() code into bsp_fatal_extension().

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*  bsp.h
2 *
3 *  This include file contains all SPARC64 simulator definitions.
4 *
5 *  COPYRIGHT (c) 1989-1998.
6 *  On-Line Applications Research Corporation (OAR).
7 *  COPYRIGHT (c) 1995.
8 *  European Space Agency.
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.com/license/LICENSE.
13 *
14 *  Ported to Simics Niagara version of SPARC64
15 *  Niagara modifications of respective RTEMS file: COPYRIGHT (c) 2010.
16 *  Eugen Leontie.
17 */
18
19#ifndef _BSP_H
20#define _BSP_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <bspopts.h>
27#include <bsp/default-initial-extension.h>
28
29#include <rtems.h>
30#include <rtems/iosupp.h>
31#include <rtems/console.h>
32#include <rtems/clockdrv.h>
33
34/* support for simulated clock tick */
35/*
36Thread clock_driver_sim_idle_body(uintptr_t);
37#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
38*/
39
40/* this should be defined somewhere */
41rtems_isr_entry set_vector(                     /* returns old vector */
42    rtems_isr_entry     handler,                /* isr routine        */
43    rtems_vector_number vector,                 /* vector number      */
44    int                 type                    /* RTEMS or RAW intr  */
45);
46
47/*
48 *  Simple spin delay in microsecond units for device drivers.
49 *  This is very dependent on the clock speed of the target.
50 */
51
52#define rtems_bsp_delay( microseconds ) \
53  { register uint32_t         _delay=(microseconds); \
54    register uint32_t         _tmp = 0; /* initialized to avoid warning */ \
55    __asm__ volatile( "0: \
56                     remo      3,31,%0 ; \
57                     cmpo      0,%0 ; \
58                     subo      1,%1,%1 ; \
59                     cmpobne.t 0,%1,0b " \
60                  : "=d" (_tmp), "=d" (_delay) \
61                  : "0"  (_tmp), "1"  (_delay) ); \
62  }
63
64#ifdef __cplusplus
65}
66#endif
67
68#endif
Note: See TracBrowser for help on using the repository browser.