forked from Imagelibrary/rtems
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, startup/linkcmds: Use top level shared bsp_get_work_area() implementation. * startup/bspgetworkarea.c: Removed.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, startup/linkcmds: Use top level shared
|
||||
bsp_get_work_area() implementation.
|
||||
* startup/bspgetworkarea.c: Removed.
|
||||
|
||||
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* startup/bspstart.c: Remove unnecessary includes of
|
||||
|
||||
@@ -30,7 +30,7 @@ startup_SOURCES = ../../shared/bspclean.c ../../shared/bsppretaskinghook.c \
|
||||
../../shared/bsppredriverhook.c ../../shared/bsplibc.c \
|
||||
../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
|
||||
../../shared/sbrk.c ../../shared/gnatinstallhandler.c \
|
||||
../../shared/setvec.c startup/bspgetworkarea.c
|
||||
../../shared/setvec.c ../../shared/bspgetworkarea.c
|
||||
clock_SOURCES = clock/clockdrv.c
|
||||
console_SOURCES = console/conscfg.c ../../shared/console.c
|
||||
timer_SOURCES = timer/timer.c
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/bootcard.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern void *WorkspaceBase;
|
||||
extern void *_RamBase;
|
||||
extern void *_RamSize;
|
||||
|
||||
/*
|
||||
* This method returns the base address and size of the area which
|
||||
* is to be allocated between the RTEMS Workspace and the C Program
|
||||
* Heap.
|
||||
*/
|
||||
void bsp_get_work_area(
|
||||
void **work_area_start,
|
||||
size_t *work_area_size,
|
||||
void **heap_start,
|
||||
size_t *heap_size
|
||||
)
|
||||
{
|
||||
uintptr_t size;
|
||||
|
||||
/*
|
||||
* Old code had hard-coded heap size of 0x20000 and a comment indicating
|
||||
* something about the undefined symbol MEM_NOCACHE_SIZE.
|
||||
*/
|
||||
size = (uintptr_t)&_RamBase + (uintptr_t)&_RamSize
|
||||
- (uintptr_t)&WorkspaceBase;
|
||||
|
||||
*work_area_start = (void *)&WorkspaceBase;
|
||||
*work_area_size = size;
|
||||
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
||||
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
|
||||
}
|
||||
|
||||
@@ -11,13 +11,12 @@
|
||||
* Declare some sizes.
|
||||
*/
|
||||
|
||||
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000000;
|
||||
_RamSize = DEFINED(_RamSize) ? _RamSize : 32M;
|
||||
RamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
|
||||
RamSize = DEFINED(RamSize) ? RamSize : 32M;
|
||||
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
|
||||
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x4000;
|
||||
ClockRate = DEFINED(ClockRate) ? ClockRate : 12000000;
|
||||
|
||||
|
||||
|
||||
MEMORY
|
||||
{
|
||||
ram : ORIGIN = 0x80020000, LENGTH = 4M
|
||||
@@ -169,7 +168,7 @@ SECTIONS
|
||||
__stack = .;
|
||||
_stack_init = .;
|
||||
_clear_end = .;
|
||||
WorkspaceBase = .;
|
||||
WorkAreaBase = .;
|
||||
end = .;
|
||||
_end = .;
|
||||
} >ram
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, startup/linkcmds: Use top level shared
|
||||
bsp_get_work_area() implementation.
|
||||
* startup/bspgetworkarea.c: Removed.
|
||||
|
||||
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* clock/ckinit.c, startup/bspstart.c: Remove unnecessary includes of
|
||||
|
||||
@@ -30,7 +30,7 @@ dist_project_lib_DATA += startup/linkcmds
|
||||
|
||||
startup_SOURCES = ../../shared/bspclean.c \
|
||||
../../shared/bsplibc.c ../../shared/bsppost.c \
|
||||
../../shared/bsppretaskinghook.c startup/bspgetworkarea.c \
|
||||
../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \
|
||||
../../shared/bsppredriverhook.c startup/bspstart.c \
|
||||
../../shared/bootcard.c ../../shared/sbrk.c \
|
||||
../../shared/gnatinstallhandler.c ../../shared/setvec.c \
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/bootcard.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern void *_RamBase;
|
||||
extern void *_RamSize;
|
||||
extern void *end;
|
||||
|
||||
/*
|
||||
* This method returns the base address and size of the area which
|
||||
* is to be allocated between the RTEMS Workspace and the C Program
|
||||
* Heap.
|
||||
*/
|
||||
void bsp_get_work_area(
|
||||
void **work_area_start,
|
||||
size_t *work_area_size,
|
||||
void **heap_start,
|
||||
size_t *heap_size
|
||||
)
|
||||
{
|
||||
uintptr_t size;
|
||||
|
||||
size = (uintptr_t)&_RamBase + (uintptr_t)&_RamSize - (uintptr_t)&end;
|
||||
|
||||
*work_area_start = (void *)&end;
|
||||
*work_area_size = size;
|
||||
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
||||
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
/*
|
||||
* Declare some sizes.
|
||||
*/
|
||||
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000000;
|
||||
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
|
||||
RamBase = DEFINED(RamBase) ? RamBase : 0x80000000;
|
||||
RamSize = DEFINED(RamSize) ? RamSize : 4M;
|
||||
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
|
||||
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
|
||||
|
||||
SECTIONS
|
||||
@@ -147,6 +148,7 @@ SECTIONS
|
||||
_stack_init = .;
|
||||
end = .;
|
||||
_end = .;
|
||||
WorkAreaBase = .;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user