2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>

* include/bsp.h, shmsupp/getcfg.c, startup/bspstart.c,
	timer/timer.c: Convert to using c99 fixed size types.
This commit is contained in:
Ralf Corsepius
2004-03-31 03:47:48 +00:00
parent 2a832d84ce
commit 3f71ac151b
5 changed files with 23 additions and 18 deletions

View File

@@ -1,3 +1,8 @@
2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
* include/bsp.h, shmsupp/getcfg.c, startup/bspstart.c,
timer/timer.c: Convert to using c99 fixed size types.
2004-02-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2004-02-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am: Reflect changes to bsp.am. * Makefile.am: Reflect changes to bsp.am.

View File

@@ -81,20 +81,20 @@ extern "C" {
#define Cause_tm27_intr() \ #define Cause_tm27_intr() \
do { \ do { \
unsigned32 _clicks = 1; \ uint32_t _clicks = 1; \
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \ asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
} while (0) } while (0)
#define Clear_tm27_intr() \ #define Clear_tm27_intr() \
do { \ do { \
unsigned32 _clicks = 0xffffffff; \ uint32_t _clicks = 0xffffffff; \
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \ asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
} while (0) } while (0)
#define Lower_tm27_intr() \ #define Lower_tm27_intr() \
do { \ do { \
unsigned32 _msr = 0; \ uint32_t _msr = 0; \
_ISR_Set_level( 0 ); \ _ISR_Set_level( 0 ); \
asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \ asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
_msr |= 0x8002; \ _msr |= 0x8002; \
@@ -154,7 +154,7 @@ extern rtems_configuration_table BSP_Configuration; /* owned by BSP */
extern rtems_cpu_table Cpu_table; /* owned by BSP */ extern rtems_cpu_table Cpu_table; /* owned by BSP */
extern rtems_unsigned32 bsp_isr_level; extern uint32_t bsp_isr_level;
#endif /* ASM */ #endif /* ASM */

View File

@@ -31,11 +31,11 @@
shm_config_table BSP_shm_cfgtbl; shm_config_table BSP_shm_cfgtbl;
void Shm_Get_configuration( void Shm_Get_configuration(
rtems_unsigned32 localnode, uint32_t localnode,
shm_config_table **shmcfg shm_config_table **shmcfg
) )
{ {
BSP_shm_cfgtbl.base = (rtems_unsigned32 *)0xc0000000; BSP_shm_cfgtbl.base = (uint32_t*)0xc0000000;
BSP_shm_cfgtbl.length = 64 * 1024; BSP_shm_cfgtbl.length = 64 * 1024;
BSP_shm_cfgtbl.format = SHM_BIG; BSP_shm_cfgtbl.format = SHM_BIG;

View File

@@ -31,14 +31,14 @@ extern rtems_configuration_table Configuration;
rtems_configuration_table BSP_Configuration; rtems_configuration_table BSP_Configuration;
rtems_cpu_table Cpu_table; rtems_cpu_table Cpu_table;
rtems_unsigned32 bsp_isr_level; uint32_t bsp_isr_level;
/* /*
* Tells us where to put the workspace in case remote debugger is present. * Tells us where to put the workspace in case remote debugger is present.
*/ */
#if 0 #if 0
extern rtems_unsigned32 rdb_start; extern uint32_t rdb_start;
#endif #endif
/* /*
@@ -46,7 +46,7 @@ extern rtems_unsigned32 rdb_start;
*/ */
void bsp_postdriver_hook(void); void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int ); void bsp_libc_init( void *, uint32_t, int );
/* /*
* bsp_pretasking_hook * bsp_pretasking_hook
@@ -58,10 +58,10 @@ void bsp_libc_init( void *, unsigned32, int );
void bsp_pretasking_hook(void) void bsp_pretasking_hook(void)
{ {
extern int end; extern int end;
rtems_unsigned32 heap_start; uint32_t heap_start;
rtems_unsigned32 heap_size; uint32_t heap_size;
heap_start = (rtems_unsigned32) &end; heap_start = (uint32_t) &end;
if (heap_start & (CPU_ALIGNMENT-1)) if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);

View File

@@ -12,7 +12,7 @@
#include <bsp.h> #include <bsp.h>
rtems_unsigned64 Timer_driver_Start_time; uint64_t Timer_driver_Start_time;
rtems_boolean Timer_driver_Find_average_overhead; rtems_boolean Timer_driver_Find_average_overhead;
@@ -32,9 +32,9 @@ void Timer_initialize()
int Read_timer() int Read_timer()
{ {
rtems_unsigned64 clicks; uint64_t clicks;
rtems_unsigned64 total64; uint64_t total64;
rtems_unsigned32 total; uint32_t total;
/* approximately CLOCK_SPEED clicks per microsecond */ /* approximately CLOCK_SPEED clicks per microsecond */
@@ -44,9 +44,9 @@ int Read_timer()
total64 = clicks - Timer_driver_Start_time; total64 = clicks - Timer_driver_Start_time;
assert( total64 <= 0xffffffff ); /* fits into a unsigned32 */ assert( total64 <= 0xffffffff ); /* fits into a uint32_t */
total = (rtems_unsigned32) total64; total = (uint32_t) total64;
if ( Timer_driver_Find_average_overhead == 1 ) if ( Timer_driver_Find_average_overhead == 1 )
return total; /* in one microsecond units */ return total; /* in one microsecond units */