From 1690c6b636dad196f1327021e00a721cebc1f264 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 21 Jul 1995 20:10:49 +0000 Subject: after testing go32 and cvme961 --- c/src/exec/sapi/headers/sptables.h | 2 +- c/src/exec/sapi/include/rtems/sptables.h | 2 +- c/src/exec/score/cpu/i386/cpu.c | 9 ++++++++- c/src/lib/libbsp/i386/go32/timer/timer.c | 11 +++++++---- c/src/lib/libbsp/i386/go32/timer/timerisr.s | 2 +- c/src/tests/sptests/sp19/init.c | 12 ++++++------ cpukit/score/cpu/i386/cpu.c | 9 ++++++++- testsuites/sptests/sp19/init.c | 12 ++++++------ 8 files changed, 38 insertions(+), 21 deletions(-) diff --git a/c/src/exec/sapi/headers/sptables.h b/c/src/exec/sapi/headers/sptables.h index 01addc6118..b3c090518a 100644 --- a/c/src/exec/sapi/headers/sptables.h +++ b/c/src/exec/sapi/headers/sptables.h @@ -42,7 +42,7 @@ const rtems_multiprocessing_table */ const char _RTEMS_version[] = - "RTEMS RELEASE V3.2.01 (" CPU_NAME "/" RTEMS_MODEL_NAME ")"; + "RTEMS RELEASE V3.2.02 (" CPU_NAME "/" RTEMS_MODEL_NAME ")"; /* diff --git a/c/src/exec/sapi/include/rtems/sptables.h b/c/src/exec/sapi/include/rtems/sptables.h index 01addc6118..b3c090518a 100644 --- a/c/src/exec/sapi/include/rtems/sptables.h +++ b/c/src/exec/sapi/include/rtems/sptables.h @@ -42,7 +42,7 @@ const rtems_multiprocessing_table */ const char _RTEMS_version[] = - "RTEMS RELEASE V3.2.01 (" CPU_NAME "/" RTEMS_MODEL_NAME ")"; + "RTEMS RELEASE V3.2.02 (" CPU_NAME "/" RTEMS_MODEL_NAME ")"; /* diff --git a/c/src/exec/score/cpu/i386/cpu.c b/c/src/exec/score/cpu/i386/cpu.c index cf30fd0b94..d1ceaba88a 100644 --- a/c/src/exec/score/cpu/i386/cpu.c +++ b/c/src/exec/score/cpu/i386/cpu.c @@ -86,7 +86,14 @@ void _CPU_ISR_install_raw_handler( #if __GO32__ _go32_dpmi_seginfo handler_info; - *old_handler = 0; /* XXX not supported */ + /* get the address of the old handler */ + _go32_dpmi_get_protected_mode_interrupt_vector( vector, &handler_info); + + /* Notice how we're failing to save the pm_segment portion of the */ + /* structure here? That means we might crash the system if we */ + /* try to restore the ISR. Can't fix this until i386_isr is */ + /* redefined. XXX [BHC]. */ + *old_handler = (proc_ptr *) handler_info.pm_offset; handler_info.pm_offset = (u_long) new_handler; handler_info.pm_selector = _go32_my_cs(); diff --git a/c/src/lib/libbsp/i386/go32/timer/timer.c b/c/src/lib/libbsp/i386/go32/timer/timer.c index a7f911baee..725aaac0f9 100644 --- a/c/src/lib/libbsp/i386/go32/timer/timer.c +++ b/c/src/lib/libbsp/i386/go32/timer/timer.c @@ -40,6 +40,9 @@ static void restore_timer( void ) } #else /* pentium */ rtems_isr timerisr(); + +#define TIMER_ISR_US 10000 + #endif /* pentium */ void Timer_initialize() @@ -74,10 +77,10 @@ void Timer_initialize() /* Wait for ISR to be called at least once */ WAIT(); - /* load timer for 250 microsecond period */ + /* load timer for TIMER_ISR_US microsecond period */ outport_byte( TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN ); - outport_byte( TIMER_CNTR0, US_TO_TICK(250) >> 0 & 0xff); - outport_byte( TIMER_CNTR0, US_TO_TICK(250) >> 8 & 0xff); + outport_byte( TIMER_CNTR0, US_TO_TICK(TIMER_ISR_US) >> 0 & 0xff); + outport_byte( TIMER_CNTR0, US_TO_TICK(TIMER_ISR_US) >> 8 & 0xff); } /* Wait for ISR to be called at least once */ @@ -101,7 +104,7 @@ int Read_timer() inport_byte( TIMER_CNTR0, lsb ); inport_byte( TIMER_CNTR0, msb ); clicks = msb << 8 | lsb; - total = Ttimer_val + (250 - TICK_TO_US( clicks )); + total = (Ttimer_val * TIMER_ISR_US) + (TIMER_ISR_US - TICK_TO_US( clicks )); #endif /* pentium */ if ( Timer_driver_Find_average_overhead == 1 ) diff --git a/c/src/lib/libbsp/i386/go32/timer/timerisr.s b/c/src/lib/libbsp/i386/go32/timer/timerisr.s index ef4fa51728..cbd6b5cb6d 100644 --- a/c/src/lib/libbsp/i386/go32/timer/timerisr.s +++ b/c/src/lib/libbsp/i386/go32/timer/timerisr.s @@ -27,7 +27,7 @@ PUBLIC(timerisr) SYM (timerisr): - addl $250,_Ttimer_val # another 250 microseconds + addl $1,_Ttimer_val # another tick push edx push eax movw $0x20,dx diff --git a/c/src/tests/sptests/sp19/init.c b/c/src/tests/sptests/sp19/init.c index 477ec4ef43..bfadb2bce1 100644 --- a/c/src/tests/sptests/sp19/init.c +++ b/c/src/tests/sptests/sp19/init.c @@ -46,7 +46,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 1 ], 2, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_FLOATING_POINT, &Task_id[ 1 ] @@ -56,7 +56,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 2 ], 2, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ] @@ -66,7 +66,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 3 ], 2, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ] @@ -76,7 +76,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 4 ], 2, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_FLOATING_POINT, &Task_id[ 4 ] @@ -86,7 +86,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 5 ], 2, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_FLOATING_POINT, &Task_id[ 5 ] @@ -96,7 +96,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 6 ], 1, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_FLOATING_POINT, &Task_id[ 6 ] diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c index cf30fd0b94..d1ceaba88a 100644 --- a/cpukit/score/cpu/i386/cpu.c +++ b/cpukit/score/cpu/i386/cpu.c @@ -86,7 +86,14 @@ void _CPU_ISR_install_raw_handler( #if __GO32__ _go32_dpmi_seginfo handler_info; - *old_handler = 0; /* XXX not supported */ + /* get the address of the old handler */ + _go32_dpmi_get_protected_mode_interrupt_vector( vector, &handler_info); + + /* Notice how we're failing to save the pm_segment portion of the */ + /* structure here? That means we might crash the system if we */ + /* try to restore the ISR. Can't fix this until i386_isr is */ + /* redefined. XXX [BHC]. */ + *old_handler = (proc_ptr *) handler_info.pm_offset; handler_info.pm_offset = (u_long) new_handler; handler_info.pm_selector = _go32_my_cs(); diff --git a/testsuites/sptests/sp19/init.c b/testsuites/sptests/sp19/init.c index 477ec4ef43..bfadb2bce1 100644 --- a/testsuites/sptests/sp19/init.c +++ b/testsuites/sptests/sp19/init.c @@ -46,7 +46,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 1 ], 2, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_FLOATING_POINT, &Task_id[ 1 ] @@ -56,7 +56,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 2 ], 2, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ] @@ -66,7 +66,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 3 ], 2, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ] @@ -76,7 +76,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 4 ], 2, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_FLOATING_POINT, &Task_id[ 4 ] @@ -86,7 +86,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 5 ], 2, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_FLOATING_POINT, &Task_id[ 5 ] @@ -96,7 +96,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 6 ], 1, - 2048, + 8192, RTEMS_DEFAULT_MODES, RTEMS_FLOATING_POINT, &Task_id[ 6 ] -- cgit v1.2.3