[c8471315] | 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 | * |
---|
[2211b75c] | 7 | * COPYRIGHT (c) 1989-2008. |
---|
[c8471315] | 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 |
---|
[a6f969b3] | 12 | * http://www.rtems.com/license/LICENSE. |
---|
[c8471315] | 13 | * |
---|
| 14 | * $Id$ |
---|
| 15 | */ |
---|
| 16 | |
---|
| 17 | #include <bsp.h> |
---|
[d4886a06] | 18 | #include <bsp/bootcard.h> |
---|
[c8471315] | 19 | |
---|
| 20 | /* |
---|
[2211b75c] | 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. |
---|
[c8471315] | 24 | */ |
---|
[d4886a06] | 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 |
---|
[2211b75c] | 30 | ) |
---|
[c8471315] | 31 | { |
---|
[2211b75c] | 32 | extern int WorkspaceBase; |
---|
| 33 | extern int end; |
---|
[c8471315] | 34 | |
---|
[d4886a06] | 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; |
---|
[c8471315] | 39 | } |
---|
[6128a4a] | 40 | |
---|
[c8471315] | 41 | /* |
---|
| 42 | * bsp_start |
---|
| 43 | * |
---|
| 44 | * This routine does the bulk of the system initialization. |
---|
| 45 | */ |
---|
| 46 | |
---|
| 47 | void bsp_start( void ) |
---|
| 48 | { |
---|
[7353e150] | 49 | extern void mips_install_isr_entries(void); |
---|
| 50 | |
---|
[7a677fd7] | 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(); |
---|
[c8471315] | 54 | } |
---|
| 55 | |
---|
[2211b75c] | 56 | /* |
---|
| 57 | * Required routine by some gcc run-times. |
---|
| 58 | */ |
---|
[c8471315] | 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 | } |
---|