diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-08 13:24:27 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-08 13:24:27 +0000 |
commit | 5ab278ff9e96e4364da2537365aa7bdd98468512 (patch) | |
tree | a3df7965d9c97ce73b63c0e4d5bf68092412d2c2 /c | |
parent | 2009-05-08 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-5ab278ff9e96e4364da2537365aa7bdd98468512.tar.bz2 |
2009-05-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* bootcard.c, bspgetworkarea.c, include/bootcard.h: Switch from ssize_t
to uintptr_t for bsp_get_work_area() since the work area is larger
than a single allocatable object.
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libbsp/shared/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/shared/bootcard.c | 17 | ||||
-rw-r--r-- | c/src/lib/libbsp/shared/bspgetworkarea.c | 10 | ||||
-rw-r--r-- | c/src/lib/libbsp/shared/include/bootcard.h | 8 |
4 files changed, 24 insertions, 17 deletions
diff --git a/c/src/lib/libbsp/shared/ChangeLog b/c/src/lib/libbsp/shared/ChangeLog index 7ce537c6b1..9a17b2f8c4 100644 --- a/c/src/lib/libbsp/shared/ChangeLog +++ b/c/src/lib/libbsp/shared/ChangeLog @@ -1,3 +1,9 @@ +2009-05-08 Joel Sherrill <joel.sherrill@oarcorp.com> + + * bootcard.c, bspgetworkarea.c, include/bootcard.h: Switch from ssize_t + to uintptr_t for bsp_get_work_area() since the work area is larger + than a single allocatable object. + 2009-05-06 Joel Sherrill <joel.sherrill@oarcorp.com> * bspinit.c: Fix warning by adding include file. diff --git a/c/src/lib/libbsp/shared/bootcard.c b/c/src/lib/libbsp/shared/bootcard.c index 7327e210a4..912f73b094 100644 --- a/c/src/lib/libbsp/shared/bootcard.c +++ b/c/src/lib/libbsp/shared/bootcard.c @@ -46,6 +46,7 @@ #include <rtems.h> #include <bsp/bootcard.h> +#include <rtems/bspIo.h> /* * At most a single pointer to the cmdline for those target @@ -121,9 +122,9 @@ int boot_card( rtems_interrupt_level bsp_isr_level; rtems_status_code sc = RTEMS_SUCCESSFUL; void *work_area_start = NULL; - intptr_t work_area_size = 0; + uintptr_t work_area_size = 0; void *heap_start = NULL; - intptr_t heap_size = 0; + uintptr_t heap_size = 0; /* * Special case for PowerPC: The interrupt disable mask is stored in SPRG0. @@ -149,14 +150,14 @@ int boot_card( * Find out where the block of memory the BSP will use for * the RTEMS Workspace and the C Program Heap is. */ - bsp_get_work_area(&work_area_start, (ssize_t*) &work_area_size, - &heap_start, (ssize_t*) &heap_size); + bsp_get_work_area(&work_area_start, &work_area_size, + &heap_start, &heap_size); - if ( work_area_size <= Configuration.work_space_size ) { + if ( (uint32_t) work_area_size <= (uint32_t) Configuration.work_space_size ) { printk( - "bootcard: Work space too big for work area! (%d > %d)\n", - Configuration.work_space_size, - work_area_size + "bootcard: Work space too big for work area! (0x%08lx > 0x%08lx)\n", + (uint32_t)Configuration.work_space_size, + (uint32_t)work_area_size ); bsp_cleanup(); return -1; diff --git a/c/src/lib/libbsp/shared/bspgetworkarea.c b/c/src/lib/libbsp/shared/bspgetworkarea.c index d3ed83c033..0f261b37d1 100644 --- a/c/src/lib/libbsp/shared/bspgetworkarea.c +++ b/c/src/lib/libbsp/shared/bspgetworkarea.c @@ -43,10 +43,10 @@ extern char HeapSize[]; * Heap. */ void bsp_get_work_area( - void **work_area_start, - ssize_t *work_area_size, - void **heap_start, - ssize_t *heap_size + void **work_area_start, + uintptr_t *work_area_size, + void **heap_start, + uintptr_t *heap_size ) { uintptr_t ram_end; @@ -61,7 +61,7 @@ void bsp_get_work_area( *work_area_start = WorkAreaBase; *work_area_size = ram_end - (uintptr_t) WorkAreaBase; *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; - *heap_size = (ssize_t) HeapSize; + *heap_size = (uintptr_t) HeapSize; /* * The following may be helpful in debugging what goes wrong when diff --git a/c/src/lib/libbsp/shared/include/bootcard.h b/c/src/lib/libbsp/shared/include/bootcard.h index 18c9069f2e..9a6dcfdb93 100644 --- a/c/src/lib/libbsp/shared/include/bootcard.h +++ b/c/src/lib/libbsp/shared/include/bootcard.h @@ -54,10 +54,10 @@ void bsp_reset(void); #define BSP_BOOTCARD_HEAP_SIZE_DEFAULT 0 void bsp_get_work_area( - void **work_area_start, - ssize_t *work_area_size, - void **heap_start, - ssize_t *heap_size + void **work_area_start, + uintptr_t *work_area_size, + void **heap_start, + uintptr_t *heap_size ); int boot_card( const char *cmdline ); |