Changeset 9a26317 in rtems


Ignore:
Timestamp:
Mar 30, 2004, 11:46:37 AM (16 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
d86bae8
Parents:
42540ecd
Message:

2004-03-30 Ralf Corsepius <ralf_corsepius@…>

  • cpu.c, rtems/score/cpu.h, rtems/score/sh.h, rtems/score/sh_io.h: Convert to using c99 fixed size types.
Location:
cpukit/score/cpu/sh
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/sh/ChangeLog

    r42540ecd r9a26317  
     12004-03-30      Ralf Corsepius <ralf_corsepius@rtems.org>
     2
     3        * cpu.c, rtems/score/cpu.h, rtems/score/sh.h, rtems/score/sh_io.h:
     4        Convert to using c99 fixed size types.
     5
    162004-03-29      Ralf Corsepius <ralf_corsepius@rtems.org>
    27
  • cpukit/score/cpu/sh/cpu.c

    r42540ecd r9a26317  
    5151)
    5252{
    53   register unsigned32 level = 0;
     53  register uint32_t  level = 0;
    5454
    5555  /*
     
    9494 */
    9595 
    96 unsigned32 _CPU_ISR_Get_level( void )
     96uint32_t  _CPU_ISR_Get_level( void )
    9797{
    9898  /*
     
    100100   */
    101101
    102   register unsigned32 _mask ;
     102  register uint32_t  _mask ;
    103103 
    104104  sh_get_interrupt_level( _mask );
     
    113113 
    114114void _CPU_ISR_install_raw_handler(
    115   unsigned32  vector,
     115  uint32_t    vector,
    116116  proc_ptr    new_handler,
    117117  proc_ptr   *old_handler
     
    125125
    126126#if SH_PARANOID_ISR 
    127   unsigned32            level ;
     127  uint32_t              level ;
    128128
    129129  sh_disable_interrupts( level );
     
    160160#if defined(__sh1__) || defined(__sh2__)
    161161void _CPU_ISR_install_vector(
    162   unsigned32  vector,
     162  uint32_t    vector,
    163163  proc_ptr    new_handler,
    164164  proc_ptr   *old_handler
     
    224224#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
    225225
    226 unsigned8 _bit_set_table[16] =
     226uint8_t  _bit_set_table[16] =
    227227  { 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 1,0};
    228228
     
    233233  Context_Control       *_the_context,
    234234  void                  *_stack_base,
    235   unsigned32            _size,
    236   unsigned32            _isr,
     235  uint32_t              _size,
     236  uint32_t              _isr,
    237237  void  (*_entry_point)(void),
    238238  int                   _is_fp )
    239239{
    240   _the_context->r15 = (unsigned32*) ((unsigned32) (_stack_base) + (_size) );
     240  _the_context->r15 = (uint32_t  *) ((uint32_t  ) (_stack_base) + (_size) );
    241241#if defined(__sh1__) || defined(__sh2__)
    242242  _the_context->sr  = (_isr << 4) & 0x00f0 ;
     
    244244  _the_context->sr  = SH4_SR_MD | ((_isr << 4) & 0x00f0);
    245245#endif
    246   _the_context->pr  = (unsigned32*) _entry_point ;
     246  _the_context->pr  = (uint32_t  *) _entry_point ;
    247247
    248248
  • cpukit/score/cpu/sh/rtems/score/cpu.h

    r42540ecd r9a26317  
    333333
    334334typedef struct {
    335   unsigned32 *r15;      /* stack pointer */
    336 
    337   unsigned32 macl;
    338   unsigned32 mach;
    339   unsigned32 *pr;
    340 
    341   unsigned32 *r14;      /* frame pointer/call saved */
    342 
    343   unsigned32 r13;       /* call saved */
    344   unsigned32 r12;       /* call saved */
    345   unsigned32 r11;       /* call saved */
    346   unsigned32 r10;       /* call saved */
    347   unsigned32 r9;        /* call saved */
    348   unsigned32 r8;        /* call saved */
    349 
    350   unsigned32 *r7;       /* arg in */
    351   unsigned32 *r6;       /* arg in */
     335  uint32_t  *r15;      /* stack pointer */
     336
     337  uint32_t  macl;
     338  uint32_t  mach;
     339  uint32_t  *pr;
     340
     341  uint32_t  *r14;      /* frame pointer/call saved */
     342
     343  uint32_t  r13;       /* call saved */
     344  uint32_t  r12;       /* call saved */
     345  uint32_t  r11;       /* call saved */
     346  uint32_t  r10;       /* call saved */
     347  uint32_t  r9;        /* call saved */
     348  uint32_t  r8;        /* call saved */
     349
     350  uint32_t  *r7;       /* arg in */
     351  uint32_t  *r6;       /* arg in */
    352352
    353353#if 0
    354   unsigned32 *r5;       /* arg in */
    355   unsigned32 *r4;       /* arg in */
    356 #endif
    357 
    358   unsigned32 *r3;       /* scratch */
    359   unsigned32 *r2;       /* scratch */
    360   unsigned32 *r1;       /* scratch */
    361 
    362   unsigned32 *r0;       /* arg return */
    363 
    364   unsigned32 gbr;
    365   unsigned32 sr;
     354  uint32_t  *r5;       /* arg in */
     355  uint32_t  *r4;       /* arg in */
     356#endif
     357
     358  uint32_t  *r3;       /* scratch */
     359  uint32_t  *r2;       /* scratch */
     360  uint32_t  *r1;       /* scratch */
     361
     362  uint32_t  *r0;       /* arg return */
     363
     364  uint32_t  gbr;
     365  uint32_t  sr;
    366366
    367367} Context_Control;
     
    380380  } r;
    381381  float fpul;       /* fp communication register */
    382   unsigned32 fpscr; /* fp control register */
     382  uint32_t  fpscr; /* fp control register */
    383383#endif /* SH_HAS_FPU */
    384384} Context_Control_fp;
     
    399399  void       (*idle_task)( void );
    400400  boolean      do_zero_of_workspace;
    401   unsigned32   idle_task_stack_size;
    402   unsigned32   interrupt_stack_size;
    403   unsigned32   extra_mpci_receive_server_stack;
    404   void *     (*stack_allocate_hook)( unsigned32 );
     401  uint32_t     idle_task_stack_size;
     402  uint32_t     interrupt_stack_size;
     403  uint32_t     extra_mpci_receive_server_stack;
     404  void *     (*stack_allocate_hook)( uint32_t  );
    405405  void       (*stack_free_hook)( void* );
    406406  /* end of fields required on all CPUs */
    407   unsigned32    clicks_per_second ; /* cpu frequency in Hz */
     407  uint32_t      clicks_per_second ; /* cpu frequency in Hz */
    408408}   rtems_cpu_table;
    409409
     
    464464
    465465/* XXX: if needed, put more variables here */
    466 SCORE_EXTERN void CPU_delay( unsigned32 microseconds );
     466SCORE_EXTERN void CPU_delay( uint32_t  microseconds );
    467467
    468468/*
     
    611611  sh_set_interrupt_level(_newlevel)
    612612
    613 unsigned32 _CPU_ISR_Get_level( void );
     613uint32_t  _CPU_ISR_Get_level( void );
    614614
    615615/* end of ISR handler macros */
     
    644644  Context_Control       *_the_context,
    645645  void                  *_stack_base,
    646   unsigned32            _size,
    647   unsigned32            _isr,
     646  uint32_t              _size,
     647  uint32_t              _isr,
    648648  void    (*_entry_point)(void),
    649649  int                   _is_fp );
     
    717717#ifdef BSP_FATAL_HALT
    718718  /* we manage the fatal error in the board support package */
    719   void bsp_fatal_halt( unsigned32 _error);
     719  void bsp_fatal_halt( uint32_t  _error);
    720720#define _CPU_Fatal_halt( _error ) bsp_fatal_halt( _error)
    721721#else
     
    792792#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
    793793
    794 extern unsigned8 _bit_set_table[];
     794extern uint8_t  _bit_set_table[];
    795795
    796796#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
     
    857857 
    858858void _CPU_ISR_install_raw_handler(
    859   unsigned32  vector,
     859  uint32_t    vector,
    860860  proc_ptr    new_handler,
    861861  proc_ptr   *old_handler
     
    869869
    870870void _CPU_ISR_install_vector(
    871   unsigned32  vector,
     871  uint32_t    vector,
    872872  proc_ptr    new_handler,
    873873  proc_ptr   *old_handler
  • cpukit/score/cpu/sh/rtems/score/sh.h

    r42540ecd r9a26317  
    163163#define sh_get_interrupt_level( _level ) \
    164164{ \
    165   register unsigned32 _tmpsr ; \
     165  register uint32_t  _tmpsr ; \
    166166  \
    167167  asm volatile( "stc sr, %0" : "=r" (_tmpsr) ); \
     
    171171#define sh_set_interrupt_level( _newlevel ) \
    172172{ \
    173   register unsigned32 _tmpsr; \
     173  register uint32_t  _tmpsr; \
    174174  \
    175175  asm volatile ( "stc sr, %0" : "=r" (_tmpsr) ); \
  • cpukit/score/cpu/sh/rtems/score/sh_io.h

    r42540ecd r9a26317  
    3131#define readw(addr)     (*(volatile unsigned short *) (addr))
    3232#define readl(addr)     (*(volatile unsigned int *) (addr))
    33 #define read8(addr)     (*(volatile unsigned8 *) (addr))
    34 #define read16(addr)    (*(volatile unsigned16 *) (addr))
    35 #define read32(addr)    (*(volatile unsigned32 *) (addr))
     33#define read8(addr)     (*(volatile uint8_t  *) (addr))
     34#define read16(addr)    (*(volatile uint16_t  *) (addr))
     35#define read32(addr)    (*(volatile uint32_t  *) (addr))
    3636
    3737#define writeb(b,addr)  ((*(volatile unsigned char *) (addr)) = (b))
    3838#define writew(b,addr)  ((*(volatile unsigned short *) (addr)) = (b))
    3939#define writel(b,addr)  ((*(volatile unsigned int *) (addr)) = (b))
    40 #define write8(b,addr)  ((*(volatile unsigned8  *) (addr)) = (b))
    41 #define write16(b,addr) ((*(volatile unsigned16 *) (addr)) = (b))
    42 #define write32(b,addr) ((*(volatile unsigned32 *) (addr)) = (b))
     40#define write8(b,addr)  ((*(volatile uint8_t    *) (addr)) = (b))
     41#define write16(b,addr) ((*(volatile uint16_t  *) (addr)) = (b))
     42#define write32(b,addr) ((*(volatile uint32_t  *) (addr)) = (b))
    4343
    4444#define inb(addr)       readb(addr)
Note: See TracChangeset for help on using the changeset viewer.