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

* bsp_specs, 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:46:47 +00:00
parent ed5ba1c9e2
commit f6821c3efb
4 changed files with 11 additions and 23 deletions

View File

@@ -1,3 +1,9 @@
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* bsp_specs, include/bsp.h, startup/bspstart.c: Eliminate copies of the
Configuration Table. Use the RTEMS provided accessor macros to obtain
configuration fields.
2007-12-10 Till Straumann <strauman@slac.stanford.edu> 2007-12-10 Till Straumann <strauman@slac.stanford.edu>
* Makefile.am, irq/irq_init.c: use vector/interrupt * Makefile.am, irq/irq_init.c: use vector/interrupt

View File

@@ -10,4 +10,4 @@
%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -e _start -u __vectors} %{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -e _start -u __vectors}
*endfile: *endfile:
%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s} %{!qrtems: %(old_endfile)} %{qrtems: ecrtn.o%s}

View File

@@ -81,8 +81,6 @@ extern int end; /* last address in the program */
void bsp_cleanup( void ); void bsp_cleanup( void );
extern rtems_configuration_table BSP_Configuration; /* owned by BSP */
#endif /* ASM */ #endif /* ASM */
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -44,22 +44,6 @@ void initialize_exceptions(void);
extern int PSIM_INSTRUCTIONS_PER_MICROSECOND; extern int PSIM_INSTRUCTIONS_PER_MICROSECOND;
/*
* 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.
*/
#if 0
extern uint32_t rdb_start;
#endif
/* /*
* PCI Bus Frequency * PCI Bus Frequency
*/ */
@@ -111,7 +95,7 @@ void bsp_pretasking_hook(void)
if (heap_start & (CPU_ALIGNMENT-1)) if (heap_start & (CPU_ALIGNMENT-1))
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
heap_size = BSP_Configuration.work_space_start - (void *)&end; heap_size = Configuration.work_space_start - (void *)&end;
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */ heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
bsp_libc_init((void *) heap_start, heap_size, 0); bsp_libc_init((void *) heap_start, heap_size, 0);
@@ -151,17 +135,17 @@ void bsp_start( void )
bsp_exceptions_in_RAM = FALSE; bsp_exceptions_in_RAM = FALSE;
BSP_Configuration.work_space_size += 1024; rtems_configuration_get_work_space_size() += 1024;
work_space_start = work_space_start =
(unsigned char *)&RAM_END - BSP_Configuration.work_space_size; (unsigned char *)&RAM_END - rtems_configuration_get_work_space_size();
if ( work_space_start <= (unsigned char *)&end ) { if ( work_space_start <= (unsigned char *)&end ) {
printk( "bspstart: Not enough RAM!!!\n" ); printk( "bspstart: Not enough RAM!!!\n" );
bsp_cleanup(); bsp_cleanup();
} }
BSP_Configuration.work_space_start = work_space_start; Configuration.work_space_start = work_space_start;
#if (BSP_DIRTY_MEMORY == 1) #if (BSP_DIRTY_MEMORY == 1)
{ {
memset(&end, 0xCF, (unsigned char *)&RAM_END - (unsigned char *)&end ); memset(&end, 0xCF, (unsigned char *)&RAM_END - (unsigned char *)&end );