From 4130d8e2e2312b72400403570b3d5f88f6f9d6db Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 11 Dec 2007 15:50:25 +0000 Subject: 2007-12-11 Joel Sherrill * include/bsp.h, startup/bspstart.c: Eliminate copies of the Configuration Table. Use the RTEMS provided accessor macros to obtain configuration fields. --- c/src/lib/libbsp/h8300/h8sim/ChangeLog | 6 ++++++ c/src/lib/libbsp/h8300/h8sim/include/bsp.h | 2 -- c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c | 17 +++-------------- 3 files changed, 9 insertions(+), 16 deletions(-) (limited to 'c/src/lib/libbsp/h8300') diff --git a/c/src/lib/libbsp/h8300/h8sim/ChangeLog b/c/src/lib/libbsp/h8300/h8sim/ChangeLog index 61d7f78679..d167197b1b 100644 --- a/c/src/lib/libbsp/h8300/h8sim/ChangeLog +++ b/c/src/lib/libbsp/h8300/h8sim/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Joel Sherrill + + * 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 * startup/bspstart.c: Move interrupt_stack_size field from CPU Table to diff --git a/c/src/lib/libbsp/h8300/h8sim/include/bsp.h b/c/src/lib/libbsp/h8300/h8sim/include/bsp.h index dc2f0d0125..005363da39 100644 --- a/c/src/lib/libbsp/h8300/h8sim/include/bsp.h +++ b/c/src/lib/libbsp/h8300/h8sim/include/bsp.h @@ -48,8 +48,6 @@ extern "C" { /* miscellaneous stuff assumed to exist */ -extern rtems_configuration_table BSP_Configuration; - /* * Device Driver Table Entries */ diff --git a/c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c b/c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c index d1e06e252d..9c2ab3f5b1 100644 --- a/c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c +++ b/c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c @@ -20,17 +20,6 @@ #include #include -/* - * 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 */ @@ -59,7 +48,7 @@ void bsp_pretasking_hook(void) extern int WorkspaceBase; heapStart = (void *) - ((unsigned long)&WorkspaceBase + BSP_Configuration.work_space_size); + ((unsigned long)&WorkspaceBase + rtems_configuration_get_work_space_size()); if ( (unsigned long) heapStart > (256 * 1024) ) rtems_fatal_error_occurred (('H'<<24) | ('E'<<16) | ('A'<<8) | 'P'); heapSize = (256 * 1024) - (unsigned long)(heapStart); @@ -82,11 +71,11 @@ void bsp_start( void ) extern int WorkspaceBase; /* - if ( BSP_Configuration.work_space_size >(512*1024) ) + if ( rtems_configuration_get_work_space_size() >(512*1024) ) _sys_exit( 1 ); */ - BSP_Configuration.work_space_start = (void *) &WorkspaceBase; + Configuration.work_space_start = (void *) &WorkspaceBase; } void H8BD_Install_IRQ( -- cgit v1.2.3