Changeset 4ca27cf in rtems for c/src/lib/libbsp/i386


Ignore:
Timestamp:
Jul 18, 1995, 9:19:53 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
3b170f5
Parents:
3ea5288
Message:

committing for rtems-3.2.01 snapshot

Location:
c/src/lib/libbsp/i386/go32
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/go32/clock/rtc.c

    r3ea5288 r4ca27cf  
    3737
    3838#include <rtems.h>
    39 #include <cpu.h>
    4039#include <memory.h>
    4140
  • c/src/lib/libbsp/i386/go32/console/inch.c

    r3ea5288 r4ca27cf  
    66#include <go32.h>
    77#include <bsp.h>
    8 #include <cpu.h>
    98
    109/*
  • c/src/lib/libbsp/i386/go32/console/outch.c

    r3ea5288 r4ca27cf  
    55#include <go32.h>
    66#include <bsp.h>
    7 #include <cpu.h>
    87
    98#include <memory.h>
  • c/src/lib/libbsp/i386/go32/include/bsp.h

    r3ea5288 r4ca27cf  
    2222
    2323#include <rtems.h>
    24 #include <cpu.h>
    2524#include <iosupp.h>
    2625
     
    143142/* routines */
    144143
    145 i386_isr set_vector(
     144i386_isr_entry set_vector(
    146145  rtems_isr_entry     handler,
    147146  rtems_vector_number vector,
  • c/src/lib/libbsp/i386/go32/startup/bspstart.c

    r3ea5288 r4ca27cf  
    2323#include <rtems.h>
    2424#include <bsp.h>
    25 #include <cpu.h>
    2625#include <libcsupport.h>
    2726
  • c/src/lib/libbsp/i386/go32/startup/setvec.c

    r3ea5288 r4ca27cf  
    2929#include <go32.h>
    3030
    31 i386_isr set_vector(                            /* returns old vector */
     31i386_isr_entry set_vector(                      /* returns old vector */
    3232  rtems_isr_entry     handler,                  /* isr routine        */
    3333  rtems_vector_number vector,                   /* vector number      */
     
    3535)
    3636{
    37   i386_isr       previous_isr;
     37  i386_isr_entry   previous_isr;
    3838
    3939  if ( type )  {
     
    5656      /* try to restore the ISR.  Can't fix this until i386_isr is      */
    5757      /* redefined.  XXX [BHC].                                         */
    58       previous_isr = (i386_isr) handler_info.pm_offset;
     58      previous_isr = (i386_isr_entry) handler_info.pm_offset;
    5959     
    6060      /* install the IDT entry */
    61       handler_info.pm_offset   = (int)handler;
     61      handler_info.pm_offset   = (u_long)handler;
    6262      handler_info.pm_selector = _go32_my_cs();
    6363      _go32_dpmi_set_protected_mode_interrupt_vector( vector, &handler_info);
  • c/src/lib/libbsp/i386/go32/timer/timer.c

    r3ea5288 r4ca27cf  
    2323
    2424#include <rtems.h>
    25 #include <cpu.h>
    2625#include <bsp.h>
    2726
     
    4847    static int First = 1;
    4948    if ( First )  {
    50         /* install ISR */
    51         set_vector( timerisr, 0x8, 0 );
     49        /* install ISR */
     50        set_vector( timerisr, 0x8, 0 );
    5251
    53         /* Wait for ISR to be called at least once */
    54         Ttimer_val = 0;
    55         while ( Ttimer_val == 0 )
    56             continue;
     52        /* Wait for ISR to be called at least once */
     53        Ttimer_val = 0;
     54        while ( Ttimer_val == 0 )
     55            continue;
    5756
    58         /* load timer for 250 microsecond period */
    59         outport_byte( TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN );
    60         outport_byte( TIMER_CNTR0, US_TO_TICK(250) >> 0 & 0xff);
    61         outport_byte( TIMER_CNTR0, US_TO_TICK(250) >> 8 & 0xff);
     57        /* load timer for 250 microsecond period */
     58        outport_byte( TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN );
     59        outport_byte( TIMER_CNTR0, US_TO_TICK(250) >> 0 & 0xff);
     60        outport_byte( TIMER_CNTR0, US_TO_TICK(250) >> 8 & 0xff);
    6261
    63         First = 0;
     62        First = 0;
    6463    }
    6564    Ttimer_val = 0;                           /* clear timer ISR count */
     
    6766}
    6867
    69 #define AVG_OVERHEAD       0  /* 0.1 microseconds to start/stop timer. */
    70 #define LEAST_VALID        1  /* Don't trust a value lower than this */
     68#define AVG_OVERHEAD       0  /* 0.1 microseconds to start/stop timer. */
     69#define LEAST_VALID        1  /* Don't trust a value lower than this */
    7170
    7271
     
    8786
    8887    if ( Timer_driver_Find_average_overhead == 1 )
    89         return total;
     88        return total;
    9089    else if ( total < LEAST_VALID )
    91         return 0;               /* below timer resolution */
     90        return 0;               /* below timer resolution */
    9291    else
    93         return total - AVG_OVERHEAD;
     92        return total - AVG_OVERHEAD;
    9493}
    9594
  • c/src/lib/libbsp/i386/go32/timer/timerisr.s

    r3ea5288 r4ca27cf  
    2525        EXTERN(_Ttimer_val)
    2626
    27 SYM (_timerisr):       
     27        PUBLIC(timerisr)
     28
     29SYM (timerisr):
    2830        addl    $250,_Ttimer_val   # another 250 microseconds
    2931        push    edx
Note: See TracChangeset for help on using the changeset viewer.