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

* clock/ckinit.c, include/bsp.h, startup/bspstart.c: Eliminate copies
	of the Configuration Table. Use the RTEMS provided accessor macros to
	obtain configuration fields.
This commit is contained in:
Joel Sherrill
2007-12-11 15:49:53 +00:00
parent cba8eabd23
commit 12bd47efc0
56 changed files with 144 additions and 249 deletions

View File

@@ -1,3 +1,9 @@
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* clock/ckinit.c, include/bsp.h, startup/bspstart.c: Eliminate copies
of the Configuration Table. Use the RTEMS provided accessor macros to
obtain configuration fields.
2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
* amba/amba.c, clock/ckinit.c, console/console.c, include/bsp.h,

View File

@@ -31,8 +31,6 @@
* The Real Time Clock Counter Timer uses this trap type.
*/
extern rtems_configuration_table Configuration;
#if defined(RTEMS_MULTIPROCESSING)
#define LEON3_CLOCK_INDEX \
(rtems_configuration_get_user_multiprocessing_table() ? LEON3_Cpu_Index : 0)
@@ -83,7 +81,7 @@ static int clkirq;
#define Clock_driver_support_initialize_hardware() \
do { \
LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].reload = \
BSP_Configuration.microseconds_per_tick - 1; \
rtems_configuration_get_microseconds_per_tick() - 1; \
\
LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].conf = \
LEON3_GPTIMER_EN | LEON3_GPTIMER_RL | \

View File

@@ -119,8 +119,6 @@ void BSP_fatal_return( void );
void bsp_spurious_initialize( void );
extern rtems_configuration_table BSP_Configuration; /* owned by BSP */
#ifdef __cplusplus
}
#endif

View File

@@ -26,24 +26,14 @@
#include <bsp.h>
#include <rtems/bspIo.h>
/*
* The original table from the application and our copy of it with
* some changes.
*/
extern rtems_configuration_table Configuration;
rtems_configuration_table BSP_Configuration;
/*
* Tells us where to put the workspace in case remote debugger is present.
*/
extern uint32_t rdb_start;
/*
* Tells us if data cache snooping is available
*/
int CPU_SPARC_HAS_SNOOPING;
void bsp_postdriver_hook(void);
@@ -86,7 +76,7 @@ void bsp_pretasking_hook(void)
if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
heap_size = BSP_Configuration.work_space_start - (void *)&end - STACK_SIZE;
heap_size = Configuration.work_space_start - (void *)&end - STACK_SIZE;
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
bsp_libc_init((void *) heap_start, heap_size, 0);
@@ -111,14 +101,14 @@ void bsp_start( void )
unsigned char *work_space_start;
work_space_start =
(unsigned char *)rdb_start - BSP_Configuration.work_space_size;
(unsigned char *)rdb_start - rtems_configuration_get_work_space_size();
if ( work_space_start <= (unsigned char *)&end ) {
printk( "bspstart: Not enough RAM!!!\n" );
BSP_fatal_return();
}
BSP_Configuration.work_space_start = work_space_start;
Configuration.work_space_start = work_space_start;
CPU_SPARC_HAS_SNOOPING = set_snooping();
}