4.104.115
Last change
on this file since fe27e20f was
fe27e20f,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/10/08 at 20:32:47
|
2008-09-10 Joel Sherrill <joel.sherrill@…>
- Makefile.am, configure.ac, startup/bspstart.c: Split out
bsp_get_work_area() into its own file and user BSP Framework to
perform more initialization.
- startup/bspgetworkarea.c: New file.
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | /* |
---|
2 | * The license and distribution terms for this file may be |
---|
3 | * found in the file LICENSE in this distribution or at |
---|
4 | * http://www.rtems.com/license/LICENSE. |
---|
5 | * |
---|
6 | * $Id$ |
---|
7 | */ |
---|
8 | |
---|
9 | #include <bsp.h> |
---|
10 | #include <bsp/bootcard.h> |
---|
11 | #include <stdint.h> |
---|
12 | |
---|
13 | extern void *_sdram_size; |
---|
14 | extern void *_sdram_base; |
---|
15 | extern void *_bss_free_start; |
---|
16 | |
---|
17 | /* |
---|
18 | * This method returns the base address and size of the area which |
---|
19 | * is to be allocated between the RTEMS Workspace and the C Program |
---|
20 | * Heap. |
---|
21 | */ |
---|
22 | void bsp_get_work_area( |
---|
23 | void **work_area_start, |
---|
24 | size_t *work_area_size, |
---|
25 | void **heap_start, |
---|
26 | size_t *heap_size |
---|
27 | ) |
---|
28 | { |
---|
29 | uintptr_t size; |
---|
30 | |
---|
31 | /* |
---|
32 | * Old code had hard-coded heap size of 0x20000 and a comment indicating |
---|
33 | * something about the undefined symbol MEM_NOCACHE_SIZE. |
---|
34 | */ |
---|
35 | size = (uintptr_t)&_sdram_base + (uintptr_t)&_sdram_size |
---|
36 | - (uintptr_t)&_bss_free_start; |
---|
37 | |
---|
38 | *work_area_start = (void *)&_bss_free_start; |
---|
39 | *work_area_size = size; |
---|
40 | *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; |
---|
41 | *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT; |
---|
42 | } |
---|
43 | |
---|
Note: See
TracBrowser
for help on using the repository browser.