4.104.114.95
Last change
on this file since ea0586b1 was
ea0586b1,
checked in by Joel Sherrill <joel.sherrill@…>, on 08/19/08 at 14:39:21
|
2008-08-19 Joel Sherrill <joel.sherrill@…>
- shared/m68kbspgetworkarea.c: Move extern of global symbols from
linkcmds outside function.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * This routine is an implementation of the bsp_get_work_area() |
---|
3 | * that can be used by all m68k BSPs following linkcmds conventions |
---|
4 | * regarding heap, stack, and workspace allocation. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-2008. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may be |
---|
10 | * found in the file LICENSE in this distribution or at |
---|
11 | * http://www.rtems.com/license/LICENSE. |
---|
12 | * |
---|
13 | * $Id$ |
---|
14 | */ |
---|
15 | |
---|
16 | #include <bsp.h> |
---|
17 | #include <bsp/bootcard.h> |
---|
18 | |
---|
19 | /* |
---|
20 | * These are provided by the linkcmds of ALL M68K BSPs which use this file. |
---|
21 | */ |
---|
22 | extern char _RamBase[]; |
---|
23 | extern char _WorkspaceBase[]; |
---|
24 | extern char _HeapSize[]; |
---|
25 | extern char _RamSize[]; |
---|
26 | |
---|
27 | /* |
---|
28 | * This method returns the base address and size of the area which |
---|
29 | * is to be allocated between the RTEMS Workspace and the C Program |
---|
30 | * Heap. |
---|
31 | */ |
---|
32 | void bsp_get_work_area( |
---|
33 | void **work_area_start, |
---|
34 | size_t *work_area_size, |
---|
35 | void **heap_start, |
---|
36 | size_t *heap_size |
---|
37 | ) |
---|
38 | { |
---|
39 | *work_area_start = _WorkspaceBase; |
---|
40 | *work_area_size = (unsigned long)_RamBase + (unsigned long) _RamSize - |
---|
41 | (unsigned long)_WorkspaceBase; |
---|
42 | *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; |
---|
43 | *heap_size = (size_t) _HeapSize; |
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.