diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2012-03-28 10:49:27 +0200 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2012-03-29 12:33:01 -0400 |
commit | 0729e2a7af22fa27defcd1daa90aad32721947b6 (patch) | |
tree | 1b499f51298536bcfb929b8b34fd3b225ee1b48a /c/src/lib/libbsp/sparc/leon2/include/bsp.h | |
parent | SMC91111: remove old unused LEON2/LEON3 intialization code (diff) | |
download | rtems-0729e2a7af22fa27defcd1daa90aad32721947b6.tar.bz2 |
SPARC: bsp_early_malloc() routine for startup memory allocation
If bsp_early_malloc() is called early during boot room will be
allocated after BSS END. If the function is called after boot
is will call malloc() instead. The returned memory is not freeable
and always 8-byte aligned.
If the bsp_early_malloc() isn't called the function is not
dragged in and the workspace will be unmodified in size.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon2/include/bsp.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/sparc/leon2/include/bsp.h b/c/src/lib/libbsp/sparc/leon2/include/bsp.h index 994f89bd8c..796290e915 100644 --- a/c/src/lib/libbsp/sparc/leon2/include/bsp.h +++ b/c/src/lib/libbsp/sparc/leon2/include/bsp.h @@ -15,8 +15,6 @@ * * ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995. * European Space Agency. - * - * $Id$ */ #ifndef _BSP_H @@ -100,6 +98,13 @@ void BSP_fatal_return( void ); void bsp_spurious_initialize( void ); +/* Allocate 8-byte aligned non-freeable pre-malloc() memory. The function + * can be called at any time. The work-area will shrink when called before + * bsp_get_work_area(). malloc() is called to get memory when this function + * is called after bsp_get_work_area(). + */ +void *bsp_early_malloc(int size); + #ifdef __cplusplus } #endif |