summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-11 15:49:53 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-11 15:49:53 +0000
commit12bd47efc0f50d673c10528ed601eaf8b54f182b (patch)
treed775bb30121bac016ab20aa95e4b3d40ba205a0a /c/src/lib/libbsp/i386
parent2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-12bd47efc0f50d673c10528ed601eaf8b54f182b.tar.bz2
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.
Diffstat (limited to 'c/src/lib/libbsp/i386')
-rw-r--r--c/src/lib/libbsp/i386/i386ex/ChangeLog6
-rw-r--r--c/src/lib/libbsp/i386/i386ex/clock/ckinit.c6
-rw-r--r--c/src/lib/libbsp/i386/i386ex/include/bsp.h4
-rw-r--r--c/src/lib/libbsp/i386/i386ex/startup/bspstart.c16
-rw-r--r--c/src/lib/libbsp/i386/pc386/ChangeLog6
-rw-r--r--c/src/lib/libbsp/i386/pc386/clock/ckinit.c4
-rw-r--r--c/src/lib/libbsp/i386/pc386/include/bsp.h2
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/bspstart.c29
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/ChangeLog6
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/clock/ckinit.c6
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/include/bsp.h2
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c28
12 files changed, 41 insertions, 74 deletions
diff --git a/c/src/lib/libbsp/i386/i386ex/ChangeLog b/c/src/lib/libbsp/i386/i386ex/ChangeLog
index e137640ed1..5539710662 100644
--- a/c/src/lib/libbsp/i386/i386ex/ChangeLog
+++ b/c/src/lib/libbsp/i386/i386ex/ChangeLog
@@ -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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field
diff --git a/c/src/lib/libbsp/i386/i386ex/clock/ckinit.c b/c/src/lib/libbsp/i386/i386ex/clock/ckinit.c
index 5619c26503..e47af32971 100644
--- a/c/src/lib/libbsp/i386/i386ex/clock/ckinit.c
+++ b/c/src/lib/libbsp/i386/i386ex/clock/ckinit.c
@@ -55,7 +55,7 @@ void Clock_isr()
Clock_driver_ticks += 1;
if ( Clock_isrs == 1 ) {
rtems_clock_tick();
- Clock_isrs = Clock_initial_isr_value; /* BSP_Configuration.microseconds_per_tick / 1000;*/
+ Clock_isrs = Clock_initial_isr_value; /* rtems_configuration_get_microseconds_per_tick() / 1000;*/
}
else
Clock_isrs -= 1;
@@ -96,7 +96,7 @@ rtems_device_driver Clock_initialize(
Clock_isrs =
Clock_initial_isr_value =
- BSP_Configuration.microseconds_per_tick / 1000; /* ticks per clock_isr */
+ rtems_configuration_get_microseconds_per_tick() / 1000; /* ticks per clock_isr */
/*
* configure the counter timer ( should be based on microsecs/tick )
@@ -105,7 +105,7 @@ rtems_device_driver Clock_initialize(
*/
ClockOff ( &clockIrqData );
- timer_counter_init_value = BSP_Configuration.microseconds_per_tick / Clock_isrs;
+ timer_counter_init_value = rtems_configuration_get_microseconds_per_tick() / Clock_isrs;
clock_lsb = (unsigned char)timer_counter_init_value;
clock_msb = timer_counter_init_value >> 8;
diff --git a/c/src/lib/libbsp/i386/i386ex/include/bsp.h b/c/src/lib/libbsp/i386/i386ex/include/bsp.h
index 743fec4bea..ad51abe9f9 100644
--- a/c/src/lib/libbsp/i386/i386ex/include/bsp.h
+++ b/c/src/lib/libbsp/i386/i386ex/include/bsp.h
@@ -88,10 +88,6 @@ extern "C" {
* NOTE: Use the standard Clock driver entry
*/
-/* miscellaneous stuff assumed to exist */
-
-extern rtems_configuration_table BSP_Configuration;
-
#define IDT_SIZE 256
#define GDT_SIZE 8192
diff --git a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c
index 2783762b8e..b89ee9f36b 100644
--- a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c
@@ -28,14 +28,6 @@ void bsp_clean_up(void);
#include <rtems/libcsupport.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.
*/
@@ -72,7 +64,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 *) heap_start ;
+ heap_size = Configuration.work_space_start -(void *) heap_start ;
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
@@ -93,10 +85,10 @@ void bsp_start( void )
{
void rtems_irq_mngt_init();
- BSP_Configuration.work_space_start = (void *)
- RAM_END - BSP_Configuration.work_space_size;
+ Configuration.work_space_start = (void *)
+ RAM_END - rtems_configuration_get_work_space_size();
#ifdef DEBUG
- printk("workspace size = 0x%x\nstart = 0x%x, RAM_END = 0x%x\n",BSP_Configuration.work_space_size, BSP_Configuration.work_space_start, RAM_END );
+ printk("workspace size = 0x%x\nstart = 0x%x, RAM_END = 0x%x\n",rtems_configuration_get_work_space_size(), Configuration.work_space_start, RAM_END );
#endif
/*
diff --git a/c/src/lib/libbsp/i386/pc386/ChangeLog b/c/src/lib/libbsp/i386/pc386/ChangeLog
index c4999b82a3..ce0257c2d2 100644
--- a/c/src/lib/libbsp/i386/pc386/ChangeLog
+++ b/c/src/lib/libbsp/i386/pc386/ChangeLog
@@ -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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field
diff --git a/c/src/lib/libbsp/i386/pc386/clock/ckinit.c b/c/src/lib/libbsp/i386/pc386/clock/ckinit.c
index 5717f6f117..29a746a9d0 100644
--- a/c/src/lib/libbsp/i386/pc386/clock/ckinit.c
+++ b/c/src/lib/libbsp/i386/pc386/clock/ckinit.c
@@ -141,10 +141,10 @@ static void clockOn(const rtems_irq_connect_data* unused)
Clock_driver_ticks = 0;
Clock_isrs_per_tick = 1;
- if (BSP_Configuration.microseconds_per_tick == 0)
+ if (rtems_configuration_get_microseconds_per_tick() == 0)
microseconds_per_isr = 10000; /* default 10 ms */
else
- microseconds_per_isr = BSP_Configuration.microseconds_per_tick;
+ microseconds_per_isr = rtems_configuration_get_microseconds_per_tick();
while (US_TO_TICK(microseconds_per_isr) > 65535)
{
Clock_isrs_per_tick *= 10;
diff --git a/c/src/lib/libbsp/i386/pc386/include/bsp.h b/c/src/lib/libbsp/i386/pc386/include/bsp.h
index bd0f3551e8..026f512c34 100644
--- a/c/src/lib/libbsp/i386/pc386/include/bsp.h
+++ b/c/src/lib/libbsp/i386/pc386/include/bsp.h
@@ -164,8 +164,6 @@ extern int rtems_dec21140_driver_attach(struct rtems_bsdnet_ifconfig *, int);
extern interrupt_gate_descriptor Interrupt_descriptor_table[IDT_SIZE];
extern segment_descriptors Global_descriptor_table [GDT_SIZE];
-extern rtems_configuration_table BSP_Configuration;
- /* User provided BSP configuration table. */
extern uint32_t rtemsFreeMemStart;
/* Address of start of free memory - should be used when creating new
partitions or regions and updated afterwards. */
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
index 15dce5d31b..cfe8dc0de8 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
@@ -70,13 +70,6 @@ uint32_t rtemsFreeMemStart;
/* Address of start of free memory - should be updated
after creating new partitions or regions. */
-/* The original BSP configuration 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; /* Program name - from main(). */
/*-------------------------------------------------------------------------+
| External Prototypes
@@ -184,8 +177,8 @@ void bsp_start_default( void )
if (rtemsFreeMemStart & (CPU_ALIGNMENT - 1)) /* not aligned => align it */
rtemsFreeMemStart = (rtemsFreeMemStart+CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
- BSP_Configuration.work_space_start = (void *)rtemsFreeMemStart;
- rtemsFreeMemStart += BSP_Configuration.work_space_size;
+ Configuration.work_space_start = (void *)rtemsFreeMemStart;
+ rtemsFreeMemStart += rtems_configuration_get_work_space_size();
/*
* Init rtems interrupt management
@@ -204,27 +197,13 @@ void bsp_start_default( void )
printk("PCI bus: could not initialize PCI BIOS interface\n");
}
- /*
- * The following information is very useful when debugging.
- */
#if 0
- printk( "work_space_size = 0x%x\n", BSP_Configuration.work_space_size );
- printk( "maximum_extensions = 0x%x\n", BSP_Configuration.maximum_extensions );
- printk( "microseconds_per_tick = 0x%x\n",
- BSP_Configuration.microseconds_per_tick );
- printk( "ticks_per_timeslice = 0x%x\n",
- BSP_Configuration.ticks_per_timeslice );
- printk( "number_of_device_drivers = 0x%x\n",
- BSP_Configuration.number_of_device_drivers );
- printk( "Device_driver_table = 0x%x\n",
- BSP_Configuration.Device_driver_table );
-
printk( "_heap_size = 0x%x\n", _heap_size );
printk( "_stack_size = 0x%x\n", _stack_size );
printk( "rtemsFreeMemStart = 0x%x\n", rtemsFreeMemStart );
- printk( "work_space_start = 0x%x\n", BSP_Configuration.work_space_start );
- printk( "work_space_size = 0x%x\n", BSP_Configuration.work_space_size );
+ printk( "work_space_start = 0x%x\n", rtems_configuration_get_work_space_start() );
+ printk( "work_space_size = 0x%x\n", rtems_configuration_get_work_space_size() );
#endif
} /* bsp_start */
diff --git a/c/src/lib/libbsp/i386/ts_386ex/ChangeLog b/c/src/lib/libbsp/i386/ts_386ex/ChangeLog
index d6bd76e493..b1cf5887bf 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/ChangeLog
+++ b/c/src/lib/libbsp/i386/ts_386ex/ChangeLog
@@ -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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field
diff --git a/c/src/lib/libbsp/i386/ts_386ex/clock/ckinit.c b/c/src/lib/libbsp/i386/ts_386ex/clock/ckinit.c
index c501b4a6c7..74c04bc9db 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/clock/ckinit.c
+++ b/c/src/lib/libbsp/i386/ts_386ex/clock/ckinit.c
@@ -50,7 +50,7 @@ void Clock_isr()
Clock_driver_ticks += 1;
if ( Clock_isrs == 1 ) {
rtems_clock_tick();
- Clock_isrs = Clock_initial_isr_value; /* BSP_Configuration.microseconds_per_tick / 1000;*/
+ Clock_isrs = Clock_initial_isr_value; /* rtems_configuration_get_microseconds_per_tick() / 1000;*/
}
else
Clock_isrs -= 1;
@@ -114,7 +114,7 @@ rtems_device_driver Clock_initialize(
Clock_isrs =
Clock_initial_isr_value =
- BSP_Configuration.microseconds_per_tick / 1000; /* ticks per clock_isr */
+ rtems_configuration_get_microseconds_per_tick() / 1000; /* ticks per clock_isr */
/*
* configure the counter timer ( should be based on microsecs/tick )
@@ -123,7 +123,7 @@ rtems_device_driver Clock_initialize(
*/
ClockOff ( &clockIrqData );
- timer_counter_init_value = BSP_Configuration.microseconds_per_tick / Clock_isrs;
+ timer_counter_init_value = rtems_configuration_get_microseconds_per_tick() / Clock_isrs;
clock_lsb = (unsigned char)timer_counter_init_value;
clock_msb = timer_counter_init_value >> 8;
diff --git a/c/src/lib/libbsp/i386/ts_386ex/include/bsp.h b/c/src/lib/libbsp/i386/ts_386ex/include/bsp.h
index 870ecc2bfc..8a348f36a2 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/include/bsp.h
+++ b/c/src/lib/libbsp/i386/ts_386ex/include/bsp.h
@@ -132,8 +132,6 @@ extern void Wait_X_ms (unsigned);
/* miscellaneous stuff assumed to exist */
-extern rtems_configuration_table BSP_Configuration;
-
#define IDT_SIZE 256
#define GDT_SIZE 3
diff --git a/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c b/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c
index 61a192934a..11ebf5038c 100644
--- a/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/ts_386ex/startup/bspstart.c
@@ -27,14 +27,6 @@ void bsp_clean_up(void);
#include <rtems/libcsupport.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.
*/
@@ -71,7 +63,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 *) heap_start ;
+ heap_size = Configuration.work_space_start -(void *) heap_start ;
heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */
bsp_libc_init((void *) heap_start, heap_size, 0);
@@ -91,8 +83,8 @@ void bsp_start( void )
{
void rtems_irq_mngt_init();
- BSP_Configuration.work_space_start = (void *)
- RAM_END - BSP_Configuration.work_space_size;
+ Configuration.work_space_start = (void *)
+ RAM_END - rtems_configuration_get_work_space_size();
/*
* Init rtems_interrupt_management
@@ -111,19 +103,13 @@ void bsp_start( void )
#ifdef BSP_DEBUG
printk( "RAM_START = 0x%x\nRAM_END = 0x%x\n", RAM_START, RAM_END );
printk( "work_space_start = 0x%x\n",
- BSP_Configuration.work_space_start );
+ Configuration.work_space_start );
printk( "work_space_size = 0x%x\n",
- BSP_Configuration.work_space_size );
- printk( "maximum_extensions = 0x%x\n",
- BSP_Configuration.maximum_extensions );
+ rtems_configuration_get_work_space_size() );
printk( "microseconds_per_tick = 0x%x\n",
- BSP_Configuration.microseconds_per_tick );
+ rtems_configuration_get_microseconds_per_tick() );
printk( "ticks_per_timeslice = 0x%x\n",
- BSP_Configuration.ticks_per_timeslice );
- printk( "number_of_device_drivers = 0x%x\n",
- BSP_Configuration.number_of_device_drivers );
- printk( "Device_driver_table = 0x%x\n",
- BSP_Configuration.Device_driver_table );
+ rtems_configuration_get_ticks_per_timeslice() );
/* printk( "_heap_size = 0x%x\n", _heap_size );
printk( "_stack_size = 0x%x\n", _stack_size ); */