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 | * |
---|
23 | * http://www.rtems.com/license/LICENSE. |
---|
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 | extern unsigned int _RamSize; |
---|
44 | char *rtems_progname; |
---|
45 | |
---|
46 | /* |
---|
47 | * Use the shared implementations of the following routines |
---|
48 | */ |
---|
49 | void bsp_postdriver_hook(void); |
---|
50 | void bsp_libc_init( void *, uint32_t, int ); |
---|
51 | void bsp_pretasking_hook(void); /* m68k version */ |
---|
52 | |
---|
53 | /* bsp_start -- |
---|
54 | * This routine does the bulk of the system initialisation. |
---|
55 | */ |
---|
56 | void bsp_start( void ) |
---|
57 | { |
---|
58 | extern void *_WorkspaceBase; |
---|
59 | extern unsigned long _M68k_Ramsize; |
---|
60 | _M68k_Ramsize = (unsigned long)&_RamSize; /* size set in linker script */ |
---|
61 | |
---|
62 | /* |
---|
63 | * Need to "allocate" the memory for the RTEMS Workspace and |
---|
64 | * tell the RTEMS configuration where it is. This memory is |
---|
65 | * not malloc'ed. It is just "pulled from the air". |
---|
66 | */ |
---|
67 | |
---|
68 | BSP_Configuration.work_space_start = (void *)&_WorkspaceBase; |
---|
69 | } |
---|