source: rtems/c/src/lib/libbsp/sparc/erc32/include/tm27.h @ 3defec6

4.104.114.84.95
Last change on this file since 3defec6 was 3defec6, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/23/04 at 04:47:38

2004-04-23 Ralf Corsepius <ralf_corsepius@…>

PR 610/bsps

  • Makefile.am: Add include/tm27.h, Cosmetics.
  • include/tm27.h: Final cosmetics.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*
2 *  tm27.h
3 *
4 *  The license and distribution terms for this file may be
5 *  found in the file LICENSE in this distribution or at
6 *  http://www.rtems.com/license/LICENSE.
7 *
8 *  $Id$
9 */
10
11#ifndef _RTEMS_TMTEST27
12#error "This is an RTEMS internal file you must not include directly."
13#endif
14
15#ifndef __tm27_h
16#define __tm27_h
17
18/*
19 *  Define the interrupt mechanism for Time Test 27
20 *
21 *  NOTE: Since the interrupt code for the SPARC supports both synchronous
22 *        and asynchronous trap handlers, support for testing with both
23 *        is included.
24 */
25
26#define ERC32_BSP_USE_SYNCHRONOUS_TRAP  0
27
28/*
29 *  The synchronous trap is an arbitrarily chosen software trap.
30 */
31
32#if (ERC32_BSP_USE_SYNCHRONOUS_TRAP == 1)
33
34#define TEST_VECTOR SPARC_SYNCHRONOUS_TRAP( 0x90 )
35
36#define MUST_WAIT_FOR_INTERRUPT 1
37
38#define Install_tm27_vector( handler ) \
39  set_vector( (handler), TEST_VECTOR, 1 );
40
41#define Cause_tm27_intr() \
42  asm volatile( "ta 0x10; nop " );
43
44#define Clear_tm27_intr() /* empty */
45
46#define Lower_tm27_intr() /* empty */
47
48/*
49 *  The asynchronous trap is an arbitrarily chosen ERC32 interrupt source.
50 */
51
52#else   /* use a regular asynchronous trap */
53
54#define TEST_INTERRUPT_SOURCE ERC32_INTERRUPT_EXTERNAL_1
55#define TEST_INTERRUPT_SOURCE2 (ERC32_INTERRUPT_EXTERNAL_1+1)
56#define TEST_VECTOR ERC32_TRAP_TYPE( TEST_INTERRUPT_SOURCE )
57#define TEST_VECTOR2 ERC32_TRAP_TYPE( TEST_INTERRUPT_SOURCE2 )
58
59#define MUST_WAIT_FOR_INTERRUPT 1
60
61#define Install_tm27_vector( handler ) \
62  set_vector( (handler), TEST_VECTOR, 1 ); \
63  set_vector( (handler), TEST_VECTOR2, 1 );
64
65#define Cause_tm27_intr() \
66  do { \
67    ERC32_Force_interrupt( TEST_INTERRUPT_SOURCE+(Interrupt_nest>>1) ); \
68    nop(); \
69    nop(); \
70    nop(); \
71  } while (0)
72
73#define Clear_tm27_intr() \
74  ERC32_Clear_interrupt( TEST_INTERRUPT_SOURCE )
75
76#define Lower_tm27_intr() /* empty */
77
78#endif
79
80#endif
Note: See TracBrowser for help on using the repository browser.