diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-11 15:50:25 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-11 15:50:25 +0000 |
commit | 4130d8e2e2312b72400403570b3d5f88f6f9d6db (patch) | |
tree | 8ab81640f610440e061706416fe62c5f1954b87c /c/src/lib/libbsp/powerpc | |
parent | 2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-4130d8e2e2312b72400403570b3d5f88f6f9d6db.tar.bz2 |
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* include/bsp.h, startup/bspstart.c: Eliminate copies of the
Configuration Table. Use the RTEMS provided accessor macros to obtain
configuration fields.
Diffstat (limited to 'c/src/lib/libbsp/powerpc')
18 files changed, 57 insertions, 83 deletions
diff --git a/c/src/lib/libbsp/powerpc/ep1a/ChangeLog b/c/src/lib/libbsp/powerpc/ep1a/ChangeLog index 8076bf4e38..eff61f7c58 100644 --- a/c/src/lib/libbsp/powerpc/ep1a/ChangeLog +++ b/c/src/lib/libbsp/powerpc/ep1a/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> + + * include/bsp.h, startup/bspstart.c: Eliminate copies of the + Configuration Table. Use the RTEMS provided accessor macros to obtain + configuration fields. + 2007-12-08 Till Straumann <strauman@slac.stanford.edu> * Makefile.am: merged shared/vme/vme_universe.c and diff --git a/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h b/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h index 2d9601819e..27f5d4a352 100644 --- a/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h @@ -186,7 +186,6 @@ extern unsigned int BSP_time_base_divisor; #define Processor_Synchronize() \ asm(" eieio ") -extern rtems_configuration_table BSP_Configuration; extern void BSP_panic(char *s); extern void rtemsReboot(void); extern int BSP_disconnect_clock_handler (void); diff --git a/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c b/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c index 6b8110b7ed..dff96c9cc8 100644 --- a/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c @@ -124,15 +124,6 @@ void _BSP_Fatal_error(unsigned int v) __asm__ __volatile ("sc"); } -/* - * The original table from the application and our copy of it with - * some changes. - */ - -extern rtems_configuration_table Configuration; -rtems_configuration_table BSP_Configuration; -char *rtems_progname; - int BSP_FLASH_Disable_writes( uint32_t area ) @@ -206,7 +197,7 @@ void bsp_pretasking_hook(void) if (heap_start & (CPU_ALIGNMENT-1)) heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); - heap_size = (BSP_mem_size - heap_start) - BSP_Configuration.work_space_size; + heap_size = (BSP_mem_size - heap_start) - rtems_configuration_get_work_space_size(); heap_sbrk_spared=_bsp_sbrk_init(heap_start, &heap_size); @@ -446,10 +437,11 @@ ShowBATS(); #endif #ifdef SHOW_MORE_INIT_SETTINGS - printk("BSP_Configuration.work_space_size = %x\n", BSP_Configuration.work_space_size); + printk("rtems_configuration_get_work_space_size() = %x\n", + rtems_configuration_get_work_space_size()); #endif work_space_start = - (unsigned char *)BSP_mem_size - BSP_Configuration.work_space_size; + (unsigned char *)BSP_mem_size - rtems_configuration_get_work_space_size(); if ( work_space_start <= ((unsigned char *)__rtems_end) + INIT_STACK_SIZE + rtems_configuration_get_interrupt_stack_size()) { @@ -457,7 +449,7 @@ ShowBATS(); bsp_cleanup(); } - BSP_Configuration.work_space_start = work_space_start; + Configuration.work_space_start = work_space_start; /* * Initalize RTEMS IRQ system diff --git a/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog b/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog index c30436d83a..5b51e344ee 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog +++ b/c/src/lib/libbsp/powerpc/gen83xx/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> + + * include/bsp.h, startup/bspstart.c: Eliminate copies of the + Configuration Table. Use the RTEMS provided accessor macros to obtain + configuration fields. + 2007-12-05 Till Straumann <strauman@slac.stanford.edu> * irq/ipic.c, irq/irq_init.c: diff --git a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h index 7b019d7eb6..28a5adb1b0 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/gen83xx/include/bsp.h @@ -197,7 +197,6 @@ extern "C" { /* miscellaneous stuff assumed to exist */ -extern rtems_configuration_table BSP_Configuration; /* * We need to decide how much memory will be non-cacheable. This * will mainly be memory that will be used in DMA (network and serial diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c index 81f2566b8e..e22c4aabbd 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/bspstart.c @@ -38,17 +38,8 @@ SPR_RW(SPRG0) SPR_RW(SPRG1) -/* - * The original table from the application (in ROM) and our copy of it with - * some changes. Configuration is defined in <confdefs.h>. Make sure that - * our configuration tables are uninitialized so that they get allocated in - * the .bss section (RAM). - */ -extern rtems_configuration_table Configuration; extern unsigned long intrStackPtr; -rtems_configuration_table BSP_Configuration; static char *BSP_heap_start, *BSP_heap_end; -char *rtems_progname; /* * constants for c_clock driver: @@ -156,10 +147,10 @@ void bsp_calc_mem_layout() * - Heap starts at end of workspace * - Heap ends at end of memory - reserved memory area */ - BSP_Configuration.work_space_start = _WorkspaceBase; + Configuration.work_space_start = _WorkspaceBase; - BSP_heap_start = ((char *)BSP_Configuration.work_space_start + - BSP_Configuration.work_space_size); + BSP_heap_start = ((char *)Configuration.work_space_start + + rtems_configuration_get_work_space_size()); #if defined(HAS_UBOOT) BSP_heap_end = (uboot_bdinfo_ptr->bi_memstart diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog b/c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog index e29f971bc9..2f0e415d82 100644 --- a/c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog +++ b/c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> + + * 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> * startup/bspstart.c: Move interrupt_stack_size field from CPU Table to diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h b/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h index cd544d44f4..b9fa473314 100644 --- a/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h @@ -63,7 +63,6 @@ extern int rtems_enet_driver_attach (struct rtems_bsdnet_ifconfig *config, int a /* miscellaneous stuff assumed to exist */ -extern rtems_configuration_table BSP_Configuration; /* * We need to decide how much memory will be non-cacheable. This * will mainly be memory that will be used in DMA (network and serial diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c index 75fc84b728..118b46d874 100644 --- a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c @@ -60,16 +60,7 @@ SPR_RW(SPRG0) SPR_RW(SPRG1) -/* - * The original table from the application (in ROM) and our copy of it with - * some changes. Configuration is defined in <confdefs.h>. Make sure that - * our configuration tables are uninitialized so that they get allocated in - * the .bss section (RAM). - */ -extern rtems_configuration_table Configuration; extern unsigned long intrStackPtr; -rtems_configuration_table BSP_Configuration; -char *rtems_progname; /* * Driver configuration parameters @@ -289,7 +280,7 @@ void bsp_start(void) * not malloc'ed. It is just "pulled from the air". */ - BSP_Configuration.work_space_start = (void *)&_WorkspaceBase; + Configuration.work_space_start = (void *)&_WorkspaceBase; /* * initialize the device driver parameters @@ -324,7 +315,7 @@ void bsp_start(void) * Call this in case we use TERMIOS for console I/O */ - m8xx_uart_reserve_resources(&BSP_Configuration); + m8xx_uart_reserve_resources(&Configuration); /* rtems_termios_initialize(); diff --git a/c/src/lib/libbsp/powerpc/mvme5500/ChangeLog b/c/src/lib/libbsp/powerpc/mvme5500/ChangeLog index e5a58f1580..0c33e76b3f 100644 --- a/c/src/lib/libbsp/powerpc/mvme5500/ChangeLog +++ b/c/src/lib/libbsp/powerpc/mvme5500/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> + + * 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> * Makefile.am, start/preload.S: moved preload.S diff --git a/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h b/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h index 06df360651..1ec58622b9 100644 --- a/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h @@ -100,7 +100,6 @@ extern unsigned int BSP_time_base_divisor; #define BSP_Convert_decrementer( _value ) \ ((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value))) -extern rtems_configuration_table BSP_Configuration; extern void BSP_panic(char *s); extern void rtemsReboot(void); /* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */ diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c index d61a44e642..a09758ec24 100644 --- a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c @@ -144,15 +144,6 @@ void _BSP_Fatal_error(unsigned int v) } /* - * The original table from the application and our copy of it with - * some changes. - */ - -extern rtems_configuration_table Configuration; -rtems_configuration_table BSP_Configuration; -char *rtems_progname; - -/* * Use the shared implementations of the following routines */ @@ -403,12 +394,12 @@ void bsp_start( void ) bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000); printk( - "BSP_Configuration.work_space_size = %x\n", - BSP_Configuration.work_space_size + "rtems_configuration_get_work_space_size() = %x\n", + rtems_configuration_get_work_space_size() ); work_space_start = - (unsigned char *)BSP_mem_size - BSP_Configuration.work_space_size; + (unsigned char *)BSP_mem_size - rtems_configuration_get_work_space_size(); if ( work_space_start <= ((unsigned char *)__rtems_end) + INIT_STACK_SIZE + rtems_configuration_get_interrupt_stack_size()) { @@ -416,7 +407,7 @@ void bsp_start( void ) bsp_cleanup(); } - BSP_Configuration.work_space_start = work_space_start; + Configuration.work_space_start = work_space_start; /* * Initalize RTEMS IRQ system diff --git a/c/src/lib/libbsp/powerpc/score603e/ChangeLog b/c/src/lib/libbsp/powerpc/score603e/ChangeLog index 365d8b2c3c..216811b998 100644 --- a/c/src/lib/libbsp/powerpc/score603e/ChangeLog +++ b/c/src/lib/libbsp/powerpc/score603e/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> + + * include/bsp.h, startup/bspstart.c: Eliminate copies of the + Configuration Table. Use the RTEMS provided accessor macros to obtain + configuration fields. + 2007-12-08 Till Straumann <strauman@slac.stanford.edu> * Makefile.am: merged shared/vme/vme_universe.c and diff --git a/c/src/lib/libbsp/powerpc/score603e/include/bsp.h b/c/src/lib/libbsp/powerpc/score603e/include/bsp.h index 94d677ae72..04f6a31c7c 100644 --- a/c/src/lib/libbsp/powerpc/score603e/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/score603e/include/bsp.h @@ -220,9 +220,6 @@ unsigned int SCORE603e_FLASH_Enable_writes( #define Convert_Endian_16( _data ) \ ( ((_data&0x00ff)<<8) | ((_data&0xff00)>>8) ) -extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ -extern uint32_t bsp_isr_level; - #endif /* ASM */ #ifdef __cplusplus diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c index f042f07645..b3d2e1433b 100644 --- a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c @@ -42,15 +42,6 @@ unsigned int BSP_time_base_divisor = 1000; /* XXX - Just a guess */ */ uint32_t bsp_clicks_per_usec; -/* - * The original table from the application and our copy of it with - * some changes. - */ - -extern rtems_configuration_table Configuration; -rtems_configuration_table BSP_Configuration; -uint32_t bsp_isr_level; - void BSP_panic(char *s) { printk("%s PANIC %s\n",_RTEMS_version, s); @@ -88,7 +79,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; + heap_size = Configuration.work_space_start - (void *)&end; heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */ bsp_libc_init((void *) heap_start, heap_size, 0); @@ -295,14 +286,14 @@ void bsp_start( void ) */ 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 ) { printk( "bspstart: Not enough RAM!!!\n" ); bsp_cleanup(); } - BSP_Configuration.work_space_start = work_space_start; + Configuration.work_space_start = work_space_start; /* * initialize the device driver parameters diff --git a/c/src/lib/libbsp/powerpc/ss555/ChangeLog b/c/src/lib/libbsp/powerpc/ss555/ChangeLog index b863b6bf00..e5a8f0cec5 100644 --- a/c/src/lib/libbsp/powerpc/ss555/ChangeLog +++ b/c/src/lib/libbsp/powerpc/ss555/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> + + * 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> * startup/bspstart.c: Move interrupt_stack_size field from CPU Table to diff --git a/c/src/lib/libbsp/powerpc/ss555/include/bsp.h b/c/src/lib/libbsp/powerpc/ss555/include/bsp.h index 75324c6545..eb6ad03be9 100644 --- a/c/src/lib/libbsp/powerpc/ss555/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/ss555/include/bsp.h @@ -77,8 +77,6 @@ extern volatile cpld_t cpld; /* defined in linkcmds */ /* miscellaneous stuff assumed to exist */ -extern rtems_configuration_table BSP_Configuration; - /* * Device Driver Table Entries */ diff --git a/c/src/lib/libbsp/powerpc/ss555/startup/bspstart.c b/c/src/lib/libbsp/powerpc/ss555/startup/bspstart.c index 4fea0cf850..786ca22b12 100644 --- a/c/src/lib/libbsp/powerpc/ss555/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/ss555/startup/bspstart.c @@ -39,16 +39,7 @@ SPR_RW(SPRG0) SPR_RW(SPRG1) -/* - * The original table from the application (in ROM) and our copy of it with - * some changes. Configuration is defined in <confdefs.h>. Make sure that - * our configuration tables are uninitialized so that they get allocated in - * the .bss section (RAM). - */ -extern rtems_configuration_table Configuration; extern unsigned long intrStackPtr; -rtems_configuration_table BSP_Configuration; -char *rtems_progname; /* * Driver configuration parameters @@ -104,8 +95,8 @@ void bsp_pretasking_hook(void) * independently of each other. */ uint8_t *_HeapStart = - (uint8_t *)BSP_Configuration.work_space_start - + BSP_Configuration.work_space_size; + (uint8_t *)Configuration.work_space_start + + rtems_configuration_get_work_space_size(); extern uint8_t _HeapEnd[]; bsp_libc_init( _HeapStart, _HeapEnd - _HeapStart, 0 ); @@ -174,7 +165,7 @@ void bsp_start(void) * In this case, the memory is not malloc'ed. It is just * "pulled from the air". */ - BSP_Configuration.work_space_start = _WorkspaceBase; + Configuration.work_space_start = _WorkspaceBase; /* * initialize the device driver parameters @@ -185,7 +176,7 @@ void bsp_start(void) /* * Call this in case we use TERMIOS for console I/O */ - m5xx_uart_reserve_resources( &BSP_Configuration ); + m5xx_uart_reserve_resources( &Configuration ); /* * Initalize RTEMS IRQ system |