forked from Imagelibrary/rtems
2005-10-05 Jiri Gaisler <jiri@gaisler.com>
Edvin Catovic <edvin@gaisler.com> Konrad Eisele <konrad@gaisler.com> PR 827/bsps * Makefile.am, bspstart.c, gnatcommon.c, start.S: Portion of large update of SPARC BSPs. Includes addition of sis, leon2 and leon3 BSPs, deletion of leon BSP, addition of SMC91111 NIC driver and much more.
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2005-10-05 Jiri Gaisler <jiri@gaisler.com>
|
||||
Edvin Catovic <edvin@gaisler.com>
|
||||
Konrad Eisele <konrad@gaisler.com>
|
||||
|
||||
PR 827/bsps
|
||||
* Makefile.am, bspstart.c, gnatcommon.c, start.S: Portion of large
|
||||
update of SPARC BSPs. Includes addition of sis, leon2 and leon3 BSPs,
|
||||
deletion of leon BSP, addition of SMC91111 NIC driver and much more.
|
||||
|
||||
2003-09-04 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* bspclean.c, bspstart.c: URL for license changed.
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
##
|
||||
|
||||
|
||||
EXTRA_DIST = bspclean.c bspstart.c gnatcommon.c start.S
|
||||
EXTRA_DIST = bspclean.c gnatcommon.c start.S
|
||||
|
||||
include $(top_srcdir)/../../../../../automake/local.am
|
||||
|
||||
@@ -198,8 +198,8 @@ void bsp_start( void )
|
||||
|
||||
Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
|
||||
|
||||
work_space_start =
|
||||
(unsigned char *)rdb_start - BSP_Configuration.work_space_size;
|
||||
work_space_start = (unsigned char *)rdb_start;
|
||||
work_space_start -= BSP_Configuration.work_space_size;
|
||||
|
||||
if ( work_space_start <= (unsigned char *)&end ) {
|
||||
DEBUG_puts( "bspstart: Not enough RAM!!!\n" );
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Support for gnat/rtems interrupts and exception handling.
|
||||
* Jiri Gaisler, ESA/ESTEC, 17-02-1999.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <asm.h>
|
||||
#include <bspopts.h>
|
||||
|
||||
/*
|
||||
* Unexpected trap will halt the processor by forcing it to error state
|
||||
@@ -216,10 +217,6 @@ SYM(hard_reset):
|
||||
nop
|
||||
nop
|
||||
|
||||
call __bsp_board_init
|
||||
nop
|
||||
|
||||
|
||||
set (SYM(rdb_start)), %g6 ! End of work-space area
|
||||
st %sp, [%g6]
|
||||
set (SYM(Configuration)), %l1
|
||||
@@ -230,6 +227,62 @@ SYM(hard_reset):
|
||||
mov %sp, %fp ! Set frame pointer
|
||||
nop
|
||||
|
||||
#if ENABLE_SIS_QUIRKS==1
|
||||
|
||||
#include <erc32.h>
|
||||
|
||||
/* Check if MEC is initialised. If not, this means that we are
|
||||
running on the simulator. Initiate some of the parameters
|
||||
that are done by the boot-prom otherwise.
|
||||
*/
|
||||
|
||||
set SYM(ERC32_MEC), %g3 ! g3 = base address of peripherals
|
||||
ld [%g3], %g2
|
||||
set 0xfe080000, %g1
|
||||
andcc %g1, %g2, %g0
|
||||
bne 2f
|
||||
|
||||
/* Set the correct memory size in MEC memory config register */
|
||||
|
||||
set SYM(PROM_SIZE), %l0
|
||||
set 0, %l1
|
||||
srl %l0, 18, %l0
|
||||
1:
|
||||
tst %l0
|
||||
srl %l0, 1, %l0
|
||||
bne,a 1b
|
||||
inc %l1
|
||||
sll %l1, 8, %l1
|
||||
|
||||
set SYM(RAM_SIZE), %l0
|
||||
srl %l0, 19, %l0
|
||||
1:
|
||||
tst %l0
|
||||
srl %l0, 1, %l0
|
||||
bne,a 1b
|
||||
inc %l1
|
||||
sll %l1, 10, %l1
|
||||
|
||||
! set the Memory Configuration
|
||||
st %l1, [ %g3 + ERC32_MEC_MEMORY_CONFIGURATION_OFFSET ]
|
||||
!DISABLE THE HARDWARE WATCHDOG
|
||||
st %g0, [ %g3 + ERC32_MEC_WATCHDOG_TRAP_DOOR_SET_OFFSET ]
|
||||
!Reduce the number of wait states to 0 for all memory areas.
|
||||
st %g0, [ %g3 + ERC32_MEC_WAIT_STATE_CONFIGURATION_OFFSET ]
|
||||
|
||||
set SYM(RAM_START), %l1 ! Cannot use RAM_END due to bug in linker
|
||||
set SYM(RAM_SIZE), %l2
|
||||
add %l1, %l2, %sp
|
||||
st %sp, [%g6]
|
||||
|
||||
|
||||
set SYM(CLOCK_SPEED), %g6 ! Use 14 MHz in simulator
|
||||
set 14, %g1
|
||||
st %g1, [%g6]
|
||||
|
||||
2:
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copy the initialized data to RAM
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user