committing for rtems-3.2.01 snapshot

This commit is contained in:
Joel Sherrill
1995-07-18 21:19:53 +00:00
parent 3ea52882fb
commit 4ca27cfad7
12 changed files with 30 additions and 34 deletions

View File

@@ -36,7 +36,6 @@
#include <rtems.h>
#include <cpu.h>
#include <memory.h>
void init_rtc( void )

View File

@@ -5,7 +5,6 @@
#include <pc.h>
#include <go32.h>
#include <bsp.h>
#include <cpu.h>
/*
* Ports for PC keyboard

View File

@@ -4,7 +4,6 @@
#include <go32.h>
#include <bsp.h>
#include <cpu.h>
#include <memory.h>

View File

@@ -21,7 +21,6 @@ extern "C" {
#endif
#include <rtems.h>
#include <cpu.h>
#include <iosupp.h>
/*
@@ -142,7 +141,7 @@ BSP_EXTERN unsigned int Gdt_base;
/* routines */
i386_isr set_vector(
i386_isr_entry set_vector(
rtems_isr_entry handler,
rtems_vector_number vector,
int type

View File

@@ -22,7 +22,6 @@
#include <rtems.h>
#include <bsp.h>
#include <cpu.h>
#include <libcsupport.h>
#include <stackchk.h>

View File

@@ -28,13 +28,13 @@
#include <dpmi.h>
#include <go32.h>
i386_isr set_vector( /* returns old vector */
i386_isr_entry set_vector( /* returns old vector */
rtems_isr_entry handler, /* isr routine */
rtems_vector_number vector, /* vector number */
int type /* RTEMS or RAW intr */
)
{
i386_isr previous_isr;
i386_isr_entry previous_isr;
if ( type ) {
rtems_interrupt_catch( handler, vector,
@@ -55,10 +55,10 @@ i386_isr set_vector( /* returns old vector */
/* 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]. */
previous_isr = (i386_isr) handler_info.pm_offset;
previous_isr = (i386_isr_entry) handler_info.pm_offset;
/* install the IDT entry */
handler_info.pm_offset = (int)handler;
handler_info.pm_offset = (u_long)handler;
handler_info.pm_selector = _go32_my_cs();
_go32_dpmi_set_protected_mode_interrupt_vector( vector, &handler_info);
}

View File

@@ -22,7 +22,6 @@
#include <rtems.h>
#include <cpu.h>
#include <bsp.h>
volatile rtems_unsigned32 Ttimer_val;
@@ -47,27 +46,27 @@ void Timer_initialize()
#else /* pentium */
static int First = 1;
if ( First ) {
/* install ISR */
set_vector( timerisr, 0x8, 0 );
/* install ISR */
set_vector( timerisr, 0x8, 0 );
/* Wait for ISR to be called at least once */
Ttimer_val = 0;
while ( Ttimer_val == 0 )
continue;
/* Wait for ISR to be called at least once */
Ttimer_val = 0;
while ( Ttimer_val == 0 )
continue;
/* load timer for 250 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);
/* load timer for 250 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);
First = 0;
First = 0;
}
Ttimer_val = 0; /* clear timer ISR count */
#endif /* PENTIUM */
}
#define AVG_OVERHEAD 0 /* 0.1 microseconds to start/stop timer. */
#define LEAST_VALID 1 /* Don't trust a value lower than this */
#define AVG_OVERHEAD 0 /* 0.1 microseconds to start/stop timer. */
#define LEAST_VALID 1 /* Don't trust a value lower than this */
int Read_timer()
@@ -86,11 +85,11 @@ int Read_timer()
#endif /* pentium */
if ( Timer_driver_Find_average_overhead == 1 )
return total;
return total;
else if ( total < LEAST_VALID )
return 0; /* below timer resolution */
return 0; /* below timer resolution */
else
return total - AVG_OVERHEAD;
return total - AVG_OVERHEAD;
}
rtems_status_code Empty_function( void )

View File

@@ -24,7 +24,9 @@
EXTERN(_Ttimer_val)
SYM (_timerisr):
PUBLIC(timerisr)
SYM (timerisr):
addl $250,_Ttimer_val # another 250 microseconds
push edx
push eax

View File

@@ -119,7 +119,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_task_resume self",
"rtems_task_suspend self",
end_time,
OPERATION_COUNT,
0,

View File

@@ -156,8 +156,8 @@ void check_read_timer()
* Under UNIX a simple process swap takes longer than we
* consider valid for our testing purposes.
*/
printf( "TOO LONG (%d) at %d!!!\n", end_time, index );
#if defined(unix)
printf( "TOO LONG (%d) at index %d!!!\n", end_time, index );
#if defined(unix) || defined(go32)
index--;
continue;
#else

View File

@@ -119,7 +119,7 @@ rtems_task Low_task(
end_time = Read_timer();
put_time(
"rtems_task_resume self",
"rtems_task_suspend self",
end_time,
OPERATION_COUNT,
0,

View File

@@ -156,8 +156,8 @@ void check_read_timer()
* Under UNIX a simple process swap takes longer than we
* consider valid for our testing purposes.
*/
printf( "TOO LONG (%d) at %d!!!\n", end_time, index );
#if defined(unix)
printf( "TOO LONG (%d) at index %d!!!\n", end_time, index );
#if defined(unix) || defined(go32)
index--;
continue;
#else