2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>

* amba/amba.c, startup/bspstart.c: Moved most of the remaining CPU
	Table fields to the Configuration Table. This included
	pretasking_hook, predriver_hook, postdriver_hook, idle_task,
	do_zero_of_workspace, extra_mpci_receive_server_stack,
	stack_allocate_hook, and stack_free_hook. As a side-effect of this
	effort some multiprocessing code was made conditional and some style
	clean up occurred.
This commit is contained in:
Joel Sherrill
2007-12-03 22:24:07 +00:00
parent 2f1d801fd3
commit 03bfdbb39c
3 changed files with 19 additions and 20 deletions

View File

@@ -1,3 +1,13 @@
2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
* amba/amba.c, startup/bspstart.c: Moved most of the remaining CPU
Table fields to the Configuration Table. This included
pretasking_hook, predriver_hook, postdriver_hook, idle_task,
do_zero_of_workspace, extra_mpci_receive_server_stack,
stack_allocate_hook, and stack_free_hook. As a side-effect of this
effort some multiprocessing code was made conditional and some style
clean up occurred.
2007-11-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* shmsupp/getcfg.c: Fix spacing.

View File

@@ -24,7 +24,7 @@ volatile LEON3_IrqCtrl_Regs_Map *LEON3_IrqCtrl_Regs;
int LEON3_Cpu_Index = 0;
/*
* bsp_leon3_predriver_hook
* bsp_predriver_hook
*
* BSP predriver hook. Called just before drivers are initialized.
* Used to scan system bus. Probes for AHB masters, AHB slaves and
@@ -44,23 +44,23 @@ asm(" .text \n"
extern rtems_configuration_table Configuration;
void bsp_leon3_predriver_hook(void)
void bsp_predriver_hook(void)
{
int i;
unsigned int tmp;
amba_apb_device dev;
/* Scan the AMBA Plug&Play info at the default LEON3 area */
amba_scan(&amba_conf,LEON3_IO_AREA,NULL);
/* Scan the AMBA Plug&Play info at the default LEON3 area */
amba_scan(&amba_conf,LEON3_IO_AREA,NULL);
/* Find LEON3 Interrupt controler */
i = amba_find_apbslv(&amba_conf,VENDOR_GAISLER,GAISLER_IRQMP,&dev);
if ( i > 0 ){
/* Found APB IRQ_MP Interrupt Controller */
LEON3_IrqCtrl_Regs = (volatile LEON3_IrqCtrl_Regs_Map *) dev.start;
if (Configuration.User_multiprocessing_table != NULL) {
tmp = getasr17();
LEON3_Cpu_Index = (tmp >> 28) & 3;
if (Configuration.User_multiprocessing_table != NULL) {
tmp = getasr17();
LEON3_Cpu_Index = (tmp >> 28) & 3;
}
}

View File

@@ -100,7 +100,7 @@ void bsp_pretasking_hook(void)
bsp_spurious_initialize();
}
void bsp_leon3_predriver_hook(void);
void bsp_predriver_hook(void);
/*
* bsp_start
@@ -112,20 +112,9 @@ void bsp_start( void )
{
unsigned char *work_space_start;
/*
* Set up our hooks
* Make sure libc_init is done before drivers initialized so that
* they can use atexit()
*/
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.predriver_hook = bsp_leon3_predriver_hook; /* scan system bus */
/*
* This should be enough interrupt stack.
*/
Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
work_space_start =