diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2003-08-20 19:32:52 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2003-08-20 19:32:52 +0000 |
commit | 49703eb3f53c12fb0ac3d12ca0beaddfe581cfd4 (patch) | |
tree | 067bcfc2b0cb8868e00ef0977c53f0ddf978df94 /libgloss/mips/cfe_api.h | |
parent | 2bf794af9a7fff8aeeae6e53642b64e40918b76f (diff) | |
download | cygnal-49703eb3f53c12fb0ac3d12ca0beaddfe581cfd4.tar.gz cygnal-49703eb3f53c12fb0ac3d12ca0beaddfe581cfd4.tar.bz2 cygnal-49703eb3f53c12fb0ac3d12ca0beaddfe581cfd4.zip |
2003-08-20 Chris Demetriou <cgd@broadcom.com>
* mips/crt0_cfe.S: New file.
* mips/cfe_mem.c: New file.
* mips/cfe_prestart.S: Remove.
* mips/cfe.ld: Adjust to use crt0_cfe.o as the startup file, and
and use _start as the entry point. Align BSS to 32-byte boundary.
* mips/cfe.c: Reimplement to fit on top of a crt0_cfe.o file.
* mips/cfe_api.h (__libcfe_stack_size, __libcfe_mem_limit)
(__libcfe_meminit, __libcfe_stack_top): New prototypes.
* mips/Makefile.in (CFEOBJS): Replace cfe_prestart.o with cfe_mem.o.
(cfe.o, cfe_api.o, cfe_mem.o, crt0_cfe.o): New targets.
* mips/configure.in: Build and install crt0_cfe.o when CFE support
is built.
* mips/configure: Regenerate.
Diffstat (limited to 'libgloss/mips/cfe_api.h')
-rw-r--r-- | libgloss/mips/cfe_api.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/libgloss/mips/cfe_api.h b/libgloss/mips/cfe_api.h index 7b98a8fc8..afe46834e 100644 --- a/libgloss/mips/cfe_api.h +++ b/libgloss/mips/cfe_api.h @@ -71,6 +71,40 @@ typedef unsigned _POINTER_INT uintptr_t; #define CFE_API_ALL #define CFE_API_IMPL_NAMESPACE + +/* Return the stack size to be used for the program. Normally 32KB. The + normal memory allocator uses the bottom of the stack as its heap limit, + so if your application uses a lot of stack space define this function + appropriately to keep the heap from growing into the stack. */ +unsigned long __libcfe_stack_size(void) __attribute__((__weak__)); + +/* Return the (max address + 1) to be used by this program. (This address + minus '_end' is used as the heap size, so the address should be in the + same address space segments as _end. The normal memory allocator + queries CFE to determine the available memory. */ +void *__libcfe_mem_limit(void) __attribute__((__weak__)); + +/* If the configuration ability provided by __libcfe_mem_limit() and + __libcfe_stack_size() do not provide enough flexibility for your + application's memory allocation needs, you can replace the normal + low-level allocator by providing the functions listed below and + also the function: + + void *sbrk(ptrdiff_t incr); + + If you provide any of these functions, you should provide all three, + and be sure to link them into your application as a .o file (rather + than a .a). + + __libcfe_meminit() is responsible for initializing the low-level + memory allocator. + + __libcfe_stack_top() returns a pointer to the top (highest address; + the stack grows down from that address) of the stack to be used by + the program. */ +void __libcfe_meminit (void); +void *__libcfe_stack_top (void); + /* End customization. */ |