1 | /* |
---|
2 | * This routine starts the application. It includes application, |
---|
3 | * board, and monitor specific initialization and configuration. |
---|
4 | * The generic CPU dependent initialization has been performed |
---|
5 | * before this routine is invoked. |
---|
6 | * |
---|
7 | * COPYRIGHT (c) 1989-2008. |
---|
8 | * On-Line Applications Research Corporation (OAR). |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.com/license/LICENSE. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #include <bsp.h> |
---|
18 | #include <bsp/bootcard.h> |
---|
19 | |
---|
20 | /* |
---|
21 | * This method returns the base address and size of the area which |
---|
22 | * is to be allocated between the RTEMS Workspace and the C Program |
---|
23 | * Heap. |
---|
24 | */ |
---|
25 | void bsp_get_work_area( |
---|
26 | void **work_area_start, |
---|
27 | size_t *work_area_size, |
---|
28 | void **heap_start, |
---|
29 | size_t *heap_size |
---|
30 | ) |
---|
31 | { |
---|
32 | extern int WorkspaceBase; |
---|
33 | extern int end; |
---|
34 | |
---|
35 | *work_area_start = &WorkspaceBase; |
---|
36 | *work_area_size = (void *)&end - (void *)&WorkspaceBase; |
---|
37 | *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; |
---|
38 | *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT; |
---|
39 | } |
---|
40 | |
---|
41 | /* |
---|
42 | * bsp_start |
---|
43 | * |
---|
44 | * This routine does the bulk of the system initialization. |
---|
45 | */ |
---|
46 | |
---|
47 | void bsp_start( void ) |
---|
48 | { |
---|
49 | extern void mips_install_isr_entries(void); |
---|
50 | |
---|
51 | mips_set_sr( 0xff00 ); /* all interrupts unmasked but globally off */ |
---|
52 | /* depend on the IRC to take care of things */ |
---|
53 | mips_install_isr_entries(); |
---|
54 | } |
---|
55 | |
---|
56 | /* |
---|
57 | * Required routine by some gcc run-times. |
---|
58 | */ |
---|
59 | void clear_cache( void *address, size_t n ) |
---|
60 | { |
---|
61 | } |
---|
62 | |
---|
63 | /* Structure filled in by get_mem_info. Only the size field is |
---|
64 | actually used (to clear bss), so the others aren't even filled in. */ |
---|
65 | |
---|
66 | struct s_mem |
---|
67 | { |
---|
68 | unsigned int size; |
---|
69 | unsigned int icsize; |
---|
70 | unsigned int dcsize; |
---|
71 | }; |
---|
72 | |
---|
73 | void |
---|
74 | get_mem_info (mem) |
---|
75 | struct s_mem *mem; |
---|
76 | { |
---|
77 | mem->size = 0x1000000; /* XXX figure out something here */ |
---|
78 | } |
---|