Changeset 21766bd6 in rtems


Ignore:
Timestamp:
Nov 8, 2001, 2:15:47 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
f3dc8e6
Parents:
1fd36613
Message:

2001-11-08 Jiri Gaisler <jiri@…>

This fix is in response to test results reported by Jerry Needell
<jerry.needell@…> for the SPARC/ERC32 and tracked as PR80.

  • erc32/include/bsp.h: TM27 was not running properly because the ERC32 and LEON cannot nest interrupts at the same level. The BSP test support had to be modified to support using two different interrupt sources.
  • tm27/task1.c: Account for overhead in starting and stopping the timer.
Location:
c/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/erc32/include/bsp.h

    r1fd36613 r21766bd6  
    2020 */
    2121
    22 #ifndef __SIS_h
    23 #define __SIS_h
     22#ifndef __ERC32_BSP_h
     23#define __ERC32_BSP_h
     24 
    2425
    2526#ifdef __cplusplus
     
    9192
    9293#define TEST_INTERRUPT_SOURCE ERC32_INTERRUPT_EXTERNAL_1
     94#define TEST_INTERRUPT_SOURCE2 (ERC32_INTERRUPT_EXTERNAL_1+1)
    9395#define TEST_VECTOR ERC32_TRAP_TYPE( TEST_INTERRUPT_SOURCE )
     96#define TEST_VECTOR2 ERC32_TRAP_TYPE( TEST_INTERRUPT_SOURCE2 )
    9497 
    9598#define MUST_WAIT_FOR_INTERRUPT 1
    9699 
    97100#define Install_tm27_vector( handler ) \
    98   set_vector( (handler), TEST_VECTOR, 1 );
     101  set_vector( (handler), TEST_VECTOR, 1 ); \
     102  set_vector( (handler), TEST_VECTOR2, 1 );
    99103 
    100104#define Cause_tm27_intr() \
    101105  do { \
    102     ERC32_Force_interrupt( TEST_INTERRUPT_SOURCE ); \
     106    ERC32_Force_interrupt( TEST_INTERRUPT_SOURCE+(Interrupt_nest>>1) ); \
    103107    nop(); \
    104108    nop(); \
  • c/src/tests/tmtests/tm27/task1.c

    r1fd36613 r21766bd6  
    3535volatile rtems_unsigned32 Interrupt_return_time, Interrupt_return_nested_time;
    3636rtems_unsigned32 Interrupt_nest;
     37rtems_unsigned32 timer_overhead;
    3738
    3839rtems_isr Isr_handler(
     
    7677  directive_failed( status, "rtems_task_start of Task_2" );
    7778
     79  Timer_initialize();
     80  Read_timer();
     81  Timer_initialize();
     82  timer_overhead = Read_timer();
     83
    7884  status = rtems_task_delete( RTEMS_SELF );
    7985  directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
     
    95101
    96102  Interrupt_occurred = 0;
    97   Timer_initialize();
    98     Cause_tm27_intr();
     103
     104  Timer_initialize();
     105  Cause_tm27_intr();
    99106  /* goes to Isr_handler */
    100107
     
    109116    1,
    110117    0,
    111     0
     118    timer_overhead
    112119  );
    113120
     
    117124    1,
    118125    0,
    119     0
     126    timer_overhead
    120127  );
    121128
     
    130137  Interrupt_occurred = 0;
    131138  Timer_initialize();
    132     Cause_tm27_intr();
     139  Cause_tm27_intr();
    133140  /* goes to Isr_handler */
    134141
     
    166173  Interrupt_occurred = 0;
    167174  Timer_initialize();
    168     Cause_tm27_intr();
     175  Cause_tm27_intr();
    169176
    170177  /*
     
    198205    1,
    199206    0,
    200     0
     207    timer_overhead
    201208  );
    202209
     
    257264      Lower_tm27_intr();
    258265      Timer_initialize();
    259         Cause_tm27_intr();
     266      Cause_tm27_intr();
    260267      /* goes to a nested copy of Isr_handler */
    261268#if (MUST_WAIT_FOR_INTERRUPT == 1)
Note: See TracChangeset for help on using the changeset viewer.