mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* shared/startup/bspgetworkarea.c, shared/startup/sbrk.c: Remove warnings by switching to uintptr_t.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* shared/startup/bspgetworkarea.c, shared/startup/sbrk.c: Remove
|
||||||
|
warnings by switching to uintptr_t.
|
||||||
|
|
||||||
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* shared/start/start.S, shared/startup/bspgetworkarea.c,
|
* shared/start/start.S, shared/startup/bspgetworkarea.c,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
extern void *__rtems_end;
|
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
|
* 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
|
size_t *heap_size
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
uintptr_t size;
|
uintptr_t work_size;
|
||||||
uintptr_t reserve;
|
|
||||||
uintptr_t spared;
|
uintptr_t spared;
|
||||||
|
uintptr_t work_area;
|
||||||
|
|
||||||
reserve = rtems_configuration_get_interrupt_stack_size();
|
work_area = (uintptr_t)&__rtems_end +
|
||||||
size = (uintptr_t)BSP_mem_size - (uintptr_t)&__rtems_end - reserve;
|
rtems_configuration_get_interrupt_stack_size();
|
||||||
|
work_size = (uintptr_t)BSP_mem_size - work_area;
|
||||||
|
|
||||||
*work_area_start = (void *)((uintptr_t) &__rtems_end + reserve);
|
spared = _bsp_sbrk_init( work_area, &work_size );
|
||||||
*work_area_size = size;
|
|
||||||
spared = _bsp_sbrk_init( *work_area_start, work_area_size );
|
*work_area_start = (void *)work_area,
|
||||||
|
*work_area_size = work_size;
|
||||||
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
||||||
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
|
*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.
|
* you are allocating the Work Area in a new BSP.
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 0
|
||||||
printk( "Work Area Base %d %x\n", *work_area_start, *work_area_start );
|
printk( "Work Area Base %d %x\n", work_area, work_area );
|
||||||
printk( "Work Area Size %d %x\n", *work_area_size, *work_area_size );
|
printk( "Work Area Size %d %x\n", work_size, work_size );
|
||||||
printk( "Work Area End %d %x\n",
|
printk( "Work Area End %d %x\n",
|
||||||
*work_area_start + size, *work_area_start + size );
|
work_area + work_size, work_area + work_size );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,10 +75,12 @@ static uint32_t remaining_size=0;
|
|||||||
|
|
||||||
#define LIMIT_32M 0x02000000
|
#define LIMIT_32M 0x02000000
|
||||||
|
|
||||||
uint32_t
|
uintptr_t _bsp_sbrk_init(
|
||||||
_bsp_sbrk_init(uint32_t heap_start, uint32_t *heap_size_p)
|
uintptr_t heap_start,
|
||||||
|
uintptr_t *heap_size_p
|
||||||
|
)
|
||||||
{
|
{
|
||||||
uint32_t rval=0;
|
uintptr_t rval=0;
|
||||||
|
|
||||||
remaining_start = heap_start;
|
remaining_start = heap_start;
|
||||||
remaining_size =* heap_size_p;
|
remaining_size =* heap_size_p;
|
||||||
|
|||||||
Reference in New Issue
Block a user