4.104.115
Last change
on this file since 379a4761 was
5e8726d0,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/15/08 at 19:18:45
|
2008-09-15 Joel Sherrill <joel.sherrill@…>
- shared/bspgetworkarea.c, shared/bsphwinit.c, shared/bspstart.c:
New files.
|
-
Property mode set to
100644
|
File size:
892 bytes
|
Rev | Line | |
---|
[5e8726d0] | 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 *RamBase; |
---|
| 14 | extern void *RamSize; |
---|
| 15 | extern void *WorkSpaceStart; |
---|
| 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 | size = (uintptr_t)&RamBase + (uintptr_t)&RamSize |
---|
| 32 | - (uintptr_t)&WorkSpaceStart; |
---|
| 33 | |
---|
| 34 | *work_area_start = (void *)&WorkSpaceStart; |
---|
| 35 | *work_area_size = size; |
---|
| 36 | *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; |
---|
| 37 | *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT; |
---|
| 38 | } |
---|
| 39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.