4.104.115
Last change
on this file since 4fcb2f17 was
28b6765d,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/15/08 at 00:23:55
|
2008-09-14 Joel Sherrill <joel.sherrill@…>
- Makefile.am, startup/bspstart.c: Use shared bsp_get_work_area() into
its own file and use BSP Framework to perform more initialization.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[41c9282] | 1 | /* |
---|
| 2 | * This set of routines 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 any of these are invoked. |
---|
| 6 | * |
---|
[6dacdf9d] | 7 | * COPYRIGHT (c) 1989-2007. |
---|
[41c9282] | 8 | * On-Line Applications Research Corporation (OAR). |
---|
| 9 | * |
---|
| 10 | * Modified for LEON3 BSP. |
---|
| 11 | * COPYRIGHT (c) 2004. |
---|
| 12 | * Gaisler Research. |
---|
| 13 | * |
---|
| 14 | * The license and distribution terms for this file may be |
---|
| 15 | * found in the file LICENSE in this distribution or at |
---|
| 16 | * http://www.rtems.com/license/LICENSE. |
---|
| 17 | * |
---|
| 18 | * $Id$ |
---|
| 19 | */ |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | #include <bsp.h> |
---|
[6dacdf9d] | 23 | #include <rtems/bspIo.h> |
---|
[41c9282] | 24 | |
---|
[4cb04f2] | 25 | /* |
---|
| 26 | * Tells us if data cache snooping is available |
---|
| 27 | */ |
---|
| 28 | int CPU_SPARC_HAS_SNOOPING; |
---|
| 29 | |
---|
| 30 | /* |
---|
| 31 | * set_snooping |
---|
| 32 | * |
---|
| 33 | * Read the data cache configuration register to determine if |
---|
| 34 | * bus snooping is available. This is needed for some drivers so |
---|
| 35 | * that they can select the most efficient copy routines. |
---|
| 36 | * |
---|
| 37 | */ |
---|
| 38 | |
---|
| 39 | static inline int set_snooping(void) |
---|
| 40 | { |
---|
[4c94ffff] | 41 | int tmp; |
---|
| 42 | asm(" lda [%1] 2, %0 " |
---|
| 43 | : "=r"(tmp) |
---|
| 44 | : "r"(0xC) |
---|
| 45 | ); |
---|
| 46 | return (tmp >> 27) & 1; |
---|
[4cb04f2] | 47 | } |
---|
| 48 | |
---|
[41c9282] | 49 | /* |
---|
| 50 | * bsp_pretasking_hook |
---|
| 51 | * |
---|
| 52 | * BSP pretasking hook. Called just before drivers are initialized. |
---|
[4c94ffff] | 53 | * Used to setup libc and install any BSP extensions . |
---|
[41c9282] | 54 | */ |
---|
| 55 | |
---|
| 56 | void bsp_pretasking_hook(void) |
---|
| 57 | { |
---|
| 58 | bsp_spurious_initialize(); |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | /* |
---|
| 62 | * bsp_start |
---|
| 63 | * |
---|
| 64 | * This routine does the bulk of the system initialization. |
---|
| 65 | */ |
---|
| 66 | void bsp_start( void ) |
---|
| 67 | { |
---|
[4cb04f2] | 68 | CPU_SPARC_HAS_SNOOPING = set_snooping(); |
---|
[41c9282] | 69 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.