2008-07-21 Till Straumann <strauman@slac.stanford.edu>

* startup/bspstart.c: Removed SPRG0 warning - this BSP
	is OK.

	Use interrupt stack limits from linker script.

	No need to reserve space beyond '_end'. linkcmds now
	reserves space below '_end'.

	Use low-level exception handling support from
	new-exceptions/bspsupport.
This commit is contained in:
Till Straumann
2008-07-22 05:50:57 +00:00
parent e1095fc521
commit 336495b9c0
2 changed files with 21 additions and 16 deletions

View File

@@ -1,3 +1,16 @@
2008-07-21 Till Straumann <strauman@slac.stanford.edu>
* startup/bspstart.c: Removed SPRG0 warning - this BSP
is OK.
Use interrupt stack limits from linker script.
No need to reserve space beyond '_end'. linkcmds now
reserves space below '_end'.
Use low-level exception handling support from
new-exceptions/bspsupport.
2008-07-21 Till Straumann <strauman@slac.stanford.edu>
* dlentry/dlentry.S: load R13 with _SDA_BASE_ so that

View File

@@ -56,8 +56,6 @@
* $Id$
*/
#warning The interrupt disable mask is now stored in SPRG0, please verify that this is compatible to this BSP (see also bootcard.c).
#include <string.h>
#include <fcntl.h>
@@ -70,8 +68,6 @@
#include <libcpu/spr.h>
#include <rtems/powerpc/powerpc.h>
SPR_RW(SPRG1)
#include RTEMS_XPARAMETERS_H
#include <stdio.h>
@@ -154,8 +150,8 @@ void bsp_pretasking_hook(void)
void bsp_start( void )
{
extern unsigned long *intrStackPtr;
register unsigned char* intrStack;
extern unsigned char IntrStack_start[];
extern unsigned char IntrStack_end[];
ppc_cpu_id_t myCpu;
ppc_cpu_revision_t myCpuRevision;
@@ -182,18 +178,14 @@ void bsp_start( void )
bsp_timer_average_overhead = 2;
bsp_timer_least_valid = 3;
/*
* Initialize some SPRG registers related to irq handling
*/
intrStack = (((unsigned char*)&intrStackPtr) - PPC_MINIMUM_STACK_FRAME_SIZE);
_write_SPRG1((unsigned int)intrStack);
/*
* Initialize default raw exception handlers.
* See shared/vectors/vectors_init.c
*/
initialize_exceptions();
ppc_exc_initialize(
PPC_INTERRUPT_DISABLE_MASK_DEFAULT | MSR_CE,
(uint32_t)IntrStack_start,
IntrStack_end - IntrStack_start
);
/*
* Install our own set of exception vectors
@@ -223,7 +215,7 @@ void bsp_start( void )
extern int _end;
/* round _end up to next 64k boundary for start of workspace */
Configuration.work_space_start = (void *)((((uint32_t)&_end) + 0x18000) & 0xffff0000);
Configuration.work_space_start = (void *)((((uint32_t)&_end) + 0xffff) & 0xffff0000);
}
}