From 3f71ac151b047fbde1ef4c0a5dbb707793ab3ce6 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 31 Mar 2004 03:47:48 +0000 Subject: 2004-03-31 Ralf Corsepius * include/bsp.h, shmsupp/getcfg.c, startup/bspstart.c, timer/timer.c: Convert to using c99 fixed size types. --- c/src/lib/libbsp/powerpc/psim/ChangeLog | 5 +++++ c/src/lib/libbsp/powerpc/psim/include/bsp.h | 8 ++++---- c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c | 4 ++-- c/src/lib/libbsp/powerpc/psim/startup/bspstart.c | 12 ++++++------ c/src/lib/libbsp/powerpc/psim/timer/timer.c | 12 ++++++------ 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/c/src/lib/libbsp/powerpc/psim/ChangeLog b/c/src/lib/libbsp/powerpc/psim/ChangeLog index 4132f647f2..f7dfa143ba 100644 --- a/c/src/lib/libbsp/powerpc/psim/ChangeLog +++ b/c/src/lib/libbsp/powerpc/psim/ChangeLog @@ -1,3 +1,8 @@ +2004-03-31 Ralf Corsepius + + * include/bsp.h, shmsupp/getcfg.c, startup/bspstart.c, + timer/timer.c: Convert to using c99 fixed size types. + 2004-02-19 Ralf Corsepius * Makefile.am: Reflect changes to bsp.am. diff --git a/c/src/lib/libbsp/powerpc/psim/include/bsp.h b/c/src/lib/libbsp/powerpc/psim/include/bsp.h index d566935519..cf68d42f79 100644 --- a/c/src/lib/libbsp/powerpc/psim/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/psim/include/bsp.h @@ -81,20 +81,20 @@ extern "C" { #define Cause_tm27_intr() \ do { \ - unsigned32 _clicks = 1; \ + uint32_t _clicks = 1; \ asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \ } while (0) #define Clear_tm27_intr() \ do { \ - unsigned32 _clicks = 0xffffffff; \ + uint32_t _clicks = 0xffffffff; \ asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \ } while (0) #define Lower_tm27_intr() \ do { \ - unsigned32 _msr = 0; \ + uint32_t _msr = 0; \ _ISR_Set_level( 0 ); \ asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \ _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_unsigned32 bsp_isr_level; +extern uint32_t bsp_isr_level; #endif /* ASM */ diff --git a/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c b/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c index 7f0d2cd9bd..0a9056314a 100644 --- a/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c +++ b/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c @@ -31,11 +31,11 @@ shm_config_table BSP_shm_cfgtbl; void Shm_Get_configuration( - rtems_unsigned32 localnode, + uint32_t localnode, 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.format = SHM_BIG; diff --git a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c index 2f94755485..6709f43403 100644 --- a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c @@ -31,14 +31,14 @@ extern rtems_configuration_table Configuration; rtems_configuration_table BSP_Configuration; 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. */ #if 0 -extern rtems_unsigned32 rdb_start; +extern uint32_t rdb_start; #endif /* @@ -46,7 +46,7 @@ extern rtems_unsigned32 rdb_start; */ void bsp_postdriver_hook(void); -void bsp_libc_init( void *, unsigned32, int ); +void bsp_libc_init( void *, uint32_t, int ); /* * bsp_pretasking_hook @@ -58,10 +58,10 @@ void bsp_libc_init( void *, unsigned32, int ); void bsp_pretasking_hook(void) { extern int end; - rtems_unsigned32 heap_start; - rtems_unsigned32 heap_size; + uint32_t heap_start; + uint32_t heap_size; - heap_start = (rtems_unsigned32) &end; + heap_start = (uint32_t) &end; if (heap_start & (CPU_ALIGNMENT-1)) heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); diff --git a/c/src/lib/libbsp/powerpc/psim/timer/timer.c b/c/src/lib/libbsp/powerpc/psim/timer/timer.c index fa62028a04..3052f0402c 100644 --- a/c/src/lib/libbsp/powerpc/psim/timer/timer.c +++ b/c/src/lib/libbsp/powerpc/psim/timer/timer.c @@ -12,7 +12,7 @@ #include -rtems_unsigned64 Timer_driver_Start_time; +uint64_t Timer_driver_Start_time; rtems_boolean Timer_driver_Find_average_overhead; @@ -32,9 +32,9 @@ void Timer_initialize() int Read_timer() { - rtems_unsigned64 clicks; - rtems_unsigned64 total64; - rtems_unsigned32 total; + uint64_t clicks; + uint64_t total64; + uint32_t total; /* approximately CLOCK_SPEED clicks per microsecond */ @@ -44,9 +44,9 @@ int Read_timer() 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 ) return total; /* in one microsecond units */ -- cgit v1.2.3