summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-19 21:31:43 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-19 21:31:43 +0000
commitbb573f750f0136ac77d9514532f632adb01aa760 (patch)
tree76c7444ac81e30fce614ac00fdd0c76cf6ae4501 /c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c
parent2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-bb573f750f0136ac77d9514532f632adb01aa760.tar.bz2
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* shared/startup/bspgetworkarea.c, shared/startup/sbrk.c: Remove warnings by switching to uintptr_t.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c')
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c b/c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c
index 0b015c694f..ecf5abb4fe 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/bspgetworkarea.c
@@ -11,7 +11,7 @@
#include <stdint.h>
extern void *__rtems_end;
-extern uint32_t _bsp_sbrk_init(uint32_t, uint32_t*);
+extern uintptr_t _bsp_sbrk_init(uintptr_t, uintptr_t*);
/*
* This method returns the base address and size of the area which
@@ -25,16 +25,18 @@ void bsp_get_work_area(
size_t *heap_size
)
{
- uintptr_t size;
- uintptr_t reserve;
+ uintptr_t work_size;
uintptr_t spared;
+ uintptr_t work_area;
- reserve = rtems_configuration_get_interrupt_stack_size();
- size = (uintptr_t)BSP_mem_size - (uintptr_t)&__rtems_end - reserve;
+ work_area = (uintptr_t)&__rtems_end +
+ rtems_configuration_get_interrupt_stack_size();
+ work_size = (uintptr_t)BSP_mem_size - work_area;
- *work_area_start = (void *)((uintptr_t) &__rtems_end + reserve);
- *work_area_size = size;
- spared = _bsp_sbrk_init( *work_area_start, work_area_size );
+ spared = _bsp_sbrk_init( work_area, &work_size );
+
+ *work_area_start = (void *)work_area,
+ *work_area_size = work_size;
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
@@ -43,10 +45,10 @@ void bsp_get_work_area(
* you are allocating the Work Area in a new BSP.
*/
#if 0
- printk( "Work Area Base %d %x\n", *work_area_start, *work_area_start );
- printk( "Work Area Size %d %x\n", *work_area_size, *work_area_size );
+ printk( "Work Area Base %d %x\n", work_area, work_area );
+ printk( "Work Area Size %d %x\n", work_size, work_size );
printk( "Work Area End %d %x\n",
- *work_area_start + size, *work_area_start + size );
+ work_area + work_size, work_area + work_size );
#endif
}