summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-03-30 11:46:37 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-03-30 11:46:37 +0000
commit9a26317f87f329c748cedb2b7cb307a15540703e (patch)
treefcfee802bd592b08e30b48591508deb68fef7459 /cpukit
parent2004-03-30 Ralf Corsepius <ralf_corsepius@rtems.org> (diff)
downloadrtems-9a26317f87f329c748cedb2b7cb307a15540703e.tar.bz2
2004-03-30 Ralf Corsepius <ralf_corsepius@rtems.org>
* cpu.c, rtems/score/cpu.h, rtems/score/sh.h, rtems/score/sh_io.h: Convert to using c99 fixed size types.
Diffstat (limited to '')
-rw-r--r--cpukit/score/cpu/sh/ChangeLog5
-rw-r--r--cpukit/score/cpu/sh/cpu.c22
-rw-r--r--cpukit/score/cpu/sh/rtems/score/cpu.h70
-rw-r--r--cpukit/score/cpu/sh/rtems/score/sh.h4
-rw-r--r--cpukit/score/cpu/sh/rtems/score/sh_io.h12
5 files changed, 59 insertions, 54 deletions
diff --git a/cpukit/score/cpu/sh/ChangeLog b/cpukit/score/cpu/sh/ChangeLog
index 9079c7da50..11a1cbfe22 100644
--- a/cpukit/score/cpu/sh/ChangeLog
+++ b/cpukit/score/cpu/sh/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-30 Ralf Corsepius <ralf_corsepius@rtems.org>
+
+ * cpu.c, rtems/score/cpu.h, rtems/score/sh.h, rtems/score/sh_io.h:
+ Convert to using c99 fixed size types.
+
2004-03-29 Ralf Corsepius <ralf_corsepius@rtems.org>
* configure.ac: RTEMS_TOP([../../../..]).
diff --git a/cpukit/score/cpu/sh/cpu.c b/cpukit/score/cpu/sh/cpu.c
index 998ebbbdaf..9e34f3fc30 100644
--- a/cpukit/score/cpu/sh/cpu.c
+++ b/cpukit/score/cpu/sh/cpu.c
@@ -50,7 +50,7 @@ void _CPU_Initialize(
void (*thread_dispatch) /* ignored on this CPU */
)
{
- register unsigned32 level = 0;
+ register uint32_t level = 0;
/*
* The thread_dispatch argument is the address of the entry point
@@ -93,13 +93,13 @@ void _CPU_Initialize(
* _CPU_ISR_Get_level
*/
-unsigned32 _CPU_ISR_Get_level( void )
+uint32_t _CPU_ISR_Get_level( void )
{
/*
* This routine returns the current interrupt level.
*/
- register unsigned32 _mask ;
+ register uint32_t _mask ;
sh_get_interrupt_level( _mask );
@@ -112,7 +112,7 @@ unsigned32 _CPU_ISR_Get_level( void )
*/
void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
+ uint32_t vector,
proc_ptr new_handler,
proc_ptr *old_handler
)
@@ -124,7 +124,7 @@ void _CPU_ISR_install_raw_handler(
volatile proc_ptr *vbr ;
#if SH_PARANOID_ISR
- unsigned32 level ;
+ uint32_t level ;
sh_disable_interrupts( level );
#endif
@@ -159,7 +159,7 @@ void _CPU_ISR_install_raw_handler(
#if defined(__sh1__) || defined(__sh2__)
void _CPU_ISR_install_vector(
- unsigned32 vector,
+ uint32_t vector,
proc_ptr new_handler,
proc_ptr *old_handler
)
@@ -223,7 +223,7 @@ void _CPU_Thread_Idle_body( void )
#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-unsigned8 _bit_set_table[16] =
+uint8_t _bit_set_table[16] =
{ 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 1,0};
@@ -232,18 +232,18 @@ unsigned8 _bit_set_table[16] =
void _CPU_Context_Initialize(
Context_Control *_the_context,
void *_stack_base,
- unsigned32 _size,
- unsigned32 _isr,
+ uint32_t _size,
+ uint32_t _isr,
void (*_entry_point)(void),
int _is_fp )
{
- _the_context->r15 = (unsigned32*) ((unsigned32) (_stack_base) + (_size) );
+ _the_context->r15 = (uint32_t *) ((uint32_t ) (_stack_base) + (_size) );
#if defined(__sh1__) || defined(__sh2__)
_the_context->sr = (_isr << 4) & 0x00f0 ;
#else
_the_context->sr = SH4_SR_MD | ((_isr << 4) & 0x00f0);
#endif
- _the_context->pr = (unsigned32*) _entry_point ;
+ _the_context->pr = (uint32_t *) _entry_point ;
#if 0 && SH_HAS_FPU
diff --git a/cpukit/score/cpu/sh/rtems/score/cpu.h b/cpukit/score/cpu/sh/rtems/score/cpu.h
index c5ced4bf5f..db209875b7 100644
--- a/cpukit/score/cpu/sh/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sh/rtems/score/cpu.h
@@ -332,37 +332,37 @@ extern "C" {
*/
typedef struct {
- unsigned32 *r15; /* stack pointer */
+ uint32_t *r15; /* stack pointer */
- unsigned32 macl;
- unsigned32 mach;
- unsigned32 *pr;
+ uint32_t macl;
+ uint32_t mach;
+ uint32_t *pr;
- unsigned32 *r14; /* frame pointer/call saved */
+ uint32_t *r14; /* frame pointer/call saved */
- unsigned32 r13; /* call saved */
- unsigned32 r12; /* call saved */
- unsigned32 r11; /* call saved */
- unsigned32 r10; /* call saved */
- unsigned32 r9; /* call saved */
- unsigned32 r8; /* call saved */
+ uint32_t r13; /* call saved */
+ uint32_t r12; /* call saved */
+ uint32_t r11; /* call saved */
+ uint32_t r10; /* call saved */
+ uint32_t r9; /* call saved */
+ uint32_t r8; /* call saved */
- unsigned32 *r7; /* arg in */
- unsigned32 *r6; /* arg in */
+ uint32_t *r7; /* arg in */
+ uint32_t *r6; /* arg in */
#if 0
- unsigned32 *r5; /* arg in */
- unsigned32 *r4; /* arg in */
+ uint32_t *r5; /* arg in */
+ uint32_t *r4; /* arg in */
#endif
- unsigned32 *r3; /* scratch */
- unsigned32 *r2; /* scratch */
- unsigned32 *r1; /* scratch */
+ uint32_t *r3; /* scratch */
+ uint32_t *r2; /* scratch */
+ uint32_t *r1; /* scratch */
- unsigned32 *r0; /* arg return */
+ uint32_t *r0; /* arg return */
- unsigned32 gbr;
- unsigned32 sr;
+ uint32_t gbr;
+ uint32_t sr;
} Context_Control;
@@ -379,7 +379,7 @@ typedef struct {
double d[8];
} r;
float fpul; /* fp communication register */
- unsigned32 fpscr; /* fp control register */
+ uint32_t fpscr; /* fp control register */
#endif /* SH_HAS_FPU */
} Context_Control_fp;
@@ -398,13 +398,13 @@ typedef struct {
void (*postdriver_hook)( void );
void (*idle_task)( void );
boolean do_zero_of_workspace;
- unsigned32 idle_task_stack_size;
- unsigned32 interrupt_stack_size;
- unsigned32 extra_mpci_receive_server_stack;
- void * (*stack_allocate_hook)( unsigned32 );
+ uint32_t idle_task_stack_size;
+ uint32_t interrupt_stack_size;
+ uint32_t extra_mpci_receive_server_stack;
+ void * (*stack_allocate_hook)( uint32_t );
void (*stack_free_hook)( void* );
/* end of fields required on all CPUs */
- unsigned32 clicks_per_second ; /* cpu frequency in Hz */
+ uint32_t clicks_per_second ; /* cpu frequency in Hz */
} rtems_cpu_table;
/*
@@ -463,7 +463,7 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
*/
/* XXX: if needed, put more variables here */
-SCORE_EXTERN void CPU_delay( unsigned32 microseconds );
+SCORE_EXTERN void CPU_delay( uint32_t microseconds );
/*
* The size of the floating point context area. On some CPUs this
@@ -610,7 +610,7 @@ SCORE_EXTERN void CPU_delay( unsigned32 microseconds );
#define _CPU_ISR_Set_level( _newlevel) \
sh_set_interrupt_level(_newlevel)
-unsigned32 _CPU_ISR_Get_level( void );
+uint32_t _CPU_ISR_Get_level( void );
/* end of ISR handler macros */
@@ -643,8 +643,8 @@ unsigned32 _CPU_ISR_Get_level( void );
SCORE_EXTERN void _CPU_Context_Initialize(
Context_Control *_the_context,
void *_stack_base,
- unsigned32 _size,
- unsigned32 _isr,
+ uint32_t _size,
+ uint32_t _isr,
void (*_entry_point)(void),
int _is_fp );
@@ -716,7 +716,7 @@ SCORE_EXTERN void _CPU_Context_Initialize(
#ifdef BSP_FATAL_HALT
/* we manage the fatal error in the board support package */
- void bsp_fatal_halt( unsigned32 _error);
+ void bsp_fatal_halt( uint32_t _error);
#define _CPU_Fatal_halt( _error ) bsp_fatal_halt( _error)
#else
#define _CPU_Fatal_halt( _error)\
@@ -791,7 +791,7 @@ SCORE_EXTERN void _CPU_Context_Initialize(
#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
-extern unsigned8 _bit_set_table[];
+extern uint8_t _bit_set_table[];
#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
{ \
@@ -856,7 +856,7 @@ void _CPU_Initialize(
*/
void _CPU_ISR_install_raw_handler(
- unsigned32 vector,
+ uint32_t vector,
proc_ptr new_handler,
proc_ptr *old_handler
);
@@ -868,7 +868,7 @@ void _CPU_ISR_install_raw_handler(
*/
void _CPU_ISR_install_vector(
- unsigned32 vector,
+ uint32_t vector,
proc_ptr new_handler,
proc_ptr *old_handler
);
diff --git a/cpukit/score/cpu/sh/rtems/score/sh.h b/cpukit/score/cpu/sh/rtems/score/sh.h
index e1914e0a61..691332e540 100644
--- a/cpukit/score/cpu/sh/rtems/score/sh.h
+++ b/cpukit/score/cpu/sh/rtems/score/sh.h
@@ -162,7 +162,7 @@ extern "C" {
#define sh_get_interrupt_level( _level ) \
{ \
- register unsigned32 _tmpsr ; \
+ register uint32_t _tmpsr ; \
\
asm volatile( "stc sr, %0" : "=r" (_tmpsr) ); \
_level = (_tmpsr & 0xf0) >> 4 ; \
@@ -170,7 +170,7 @@ extern "C" {
#define sh_set_interrupt_level( _newlevel ) \
{ \
- register unsigned32 _tmpsr; \
+ register uint32_t _tmpsr; \
\
asm volatile ( "stc sr, %0" : "=r" (_tmpsr) ); \
_tmpsr = ( _tmpsr & ~0xf0 ) | ((_newlevel) << 4) ; \
diff --git a/cpukit/score/cpu/sh/rtems/score/sh_io.h b/cpukit/score/cpu/sh/rtems/score/sh_io.h
index ba1266b431..5be558093e 100644
--- a/cpukit/score/cpu/sh/rtems/score/sh_io.h
+++ b/cpukit/score/cpu/sh/rtems/score/sh_io.h
@@ -30,16 +30,16 @@
#define readb(addr) (*(volatile unsigned char *) (addr))
#define readw(addr) (*(volatile unsigned short *) (addr))
#define readl(addr) (*(volatile unsigned int *) (addr))
-#define read8(addr) (*(volatile unsigned8 *) (addr))
-#define read16(addr) (*(volatile unsigned16 *) (addr))
-#define read32(addr) (*(volatile unsigned32 *) (addr))
+#define read8(addr) (*(volatile uint8_t *) (addr))
+#define read16(addr) (*(volatile uint16_t *) (addr))
+#define read32(addr) (*(volatile uint32_t *) (addr))
#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b))
#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b))
#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b))
-#define write8(b,addr) ((*(volatile unsigned8 *) (addr)) = (b))
-#define write16(b,addr) ((*(volatile unsigned16 *) (addr)) = (b))
-#define write32(b,addr) ((*(volatile unsigned32 *) (addr)) = (b))
+#define write8(b,addr) ((*(volatile uint8_t *) (addr)) = (b))
+#define write16(b,addr) ((*(volatile uint16_t *) (addr)) = (b))
+#define write32(b,addr) ((*(volatile uint32_t *) (addr)) = (b))
#define inb(addr) readb(addr)
#define outb(b,addr) writeb(b,addr)