[e56c3546] | 1 | /* |
---|
| 2 | * BSP startup |
---|
| 3 | * |
---|
| 4 | * This routine starts the application. It includes application, |
---|
| 5 | * board, and monitor specific initialization and configuration. |
---|
| 6 | * The generic CPU dependent initialization has been performed |
---|
| 7 | * before this routine is invoked. |
---|
| 8 | * |
---|
| 9 | * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia |
---|
| 10 | * Author: Victor V. Vengerov <vvv@oktet.ru> |
---|
| 11 | * |
---|
| 12 | * Based on work: |
---|
| 13 | * Author: |
---|
| 14 | * David Fiddes, D.J@fiddes.surfaid.org |
---|
| 15 | * http://www.calm.hw.ac.uk/davidf/coldfire/ |
---|
| 16 | * |
---|
| 17 | * COPYRIGHT (c) 1989-1998. |
---|
| 18 | * On-Line Applications Research Corporation (OAR). |
---|
| 19 | * |
---|
| 20 | * The license and distribution terms for this file may be |
---|
| 21 | * found in the file LICENSE in this distribution or at |
---|
| 22 | * |
---|
[acaae90] | 23 | * http://www.rtems.com/license/LICENSE. |
---|
[e56c3546] | 24 | * |
---|
| 25 | * $Id$ |
---|
| 26 | */ |
---|
| 27 | |
---|
| 28 | #include <bsp.h> |
---|
| 29 | #include <rtems/libio.h> |
---|
| 30 | |
---|
| 31 | #include <rtems/libcsupport.h> |
---|
| 32 | |
---|
| 33 | #include <string.h> |
---|
| 34 | |
---|
| 35 | /* |
---|
| 36 | * The original table from the application and our copy of it with |
---|
| 37 | * some changes. |
---|
| 38 | */ |
---|
| 39 | |
---|
| 40 | extern rtems_configuration_table Configuration; |
---|
| 41 | rtems_configuration_table BSP_Configuration; |
---|
| 42 | |
---|
| 43 | rtems_cpu_table Cpu_table; |
---|
| 44 | |
---|
| 45 | unsigned long _RamSize; |
---|
| 46 | |
---|
| 47 | char *rtems_progname; |
---|
| 48 | |
---|
| 49 | /* |
---|
| 50 | * Use the shared implementations of the following routines |
---|
| 51 | */ |
---|
| 52 | |
---|
| 53 | void bsp_postdriver_hook(void); |
---|
[b7044dc] | 54 | void bsp_libc_init( void *, uint32_t, int ); |
---|
[e56c3546] | 55 | void bsp_pretasking_hook(void); /* m68k version */ |
---|
| 56 | |
---|
| 57 | /* bsp_start -- |
---|
| 58 | * This routine does the bulk of the system initialisation. |
---|
| 59 | */ |
---|
| 60 | void bsp_start( void ) |
---|
| 61 | { |
---|
| 62 | extern void *_WorkspaceBase; |
---|
| 63 | |
---|
| 64 | /* |
---|
| 65 | * Need to "allocate" the memory for the RTEMS Workspace and |
---|
| 66 | * tell the RTEMS configuration where it is. This memory is |
---|
| 67 | * not malloc'ed. It is just "pulled from the air". |
---|
| 68 | */ |
---|
| 69 | |
---|
| 70 | BSP_Configuration.work_space_start = (void *)&_WorkspaceBase; |
---|
| 71 | |
---|
| 72 | /* |
---|
| 73 | * initialize the CPU table for this BSP |
---|
| 74 | */ |
---|
| 75 | Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ |
---|
| 76 | |
---|
| 77 | Cpu_table.postdriver_hook = bsp_postdriver_hook; |
---|
| 78 | |
---|
| 79 | Cpu_table.do_zero_of_workspace = TRUE; |
---|
| 80 | |
---|
| 81 | Cpu_table.interrupt_stack_size = 4096; |
---|
| 82 | |
---|
| 83 | Cpu_table.interrupt_vector_table = (m68k_isr *)0; /* vectors at start of RAM */ |
---|
| 84 | |
---|
| 85 | } |
---|