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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -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;

View File

@@ -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

View File

@@ -27,14 +27,6 @@ void bsp_clean_up(void);
#include <rtems/libio.h>
#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
/*

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -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;

View File

@@ -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. */

View File

@@ -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 */

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -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;

View File

@@ -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

View File

@@ -26,14 +26,6 @@ void bsp_clean_up(void);
#include <rtems/libio.h>
#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 ); */

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -108,7 +108,7 @@ Install_clock (rtems_isr_entry clock_isr)
/* sets the PITR count value */
/* this assumes a 32.765 kHz crystal */
usecs_per_tick = BSP_Configuration.microseconds_per_tick;
usecs_per_tick = rtems_configuration_get_microseconds_per_tick();
/* find out whether prescaler should be enabled or not */
if ( usecs_per_tick <= 31128 ) {
pitr_tmp = ( usecs_per_tick * 8192 ) / 1000000 ;

View File

@@ -63,16 +63,8 @@ extern "C" {
* NOTE: Use the standard Clock driver entry
*/
/*
* How many libio files we want
*/
#define BSP_LIBIO_MAX_FDS 20
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
extern m68k_isr_entry M68Kvec[]; /* vector table address */
/* functions */

View File

@@ -25,16 +25,6 @@
#include <rtems/libio.h>
#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;
char *rtems_progname;
/* Initialize whatever libc we are using
* called from postdriver hook
*/
@@ -71,5 +61,5 @@ 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;
}

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -77,7 +77,7 @@ rtems_isr Clock_isr(
libgcc.a for gcc with software floating point support, this is not
a problem */
Clock_isrs =
(int)(BSP_Configuration.microseconds_per_tick / 1000);
(int)(rtems_configuration_get_microseconds_per_tick() / 1000);
}
else
Clock_isrs -= 1;

View File

@@ -45,8 +45,6 @@
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
extern m68k_isr_entry M68Kvec[]; /* vector table address */
/* functions */

View File

@@ -27,16 +27,6 @@ extern struct duart_regs duart_info;
void led_putnum();
/*
* 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
*/
@@ -89,7 +79,7 @@ void bsp_start( void )
rtems_cache_enable_instruction();
rtems_cache_enable_data();
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
Configuration.work_space_start = (void *) &_WorkspaceBase;
/* led_putnum('e'); * for debugging purposes only */

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -44,7 +44,7 @@ rtems_isr Clock_isr(rtems_vector_number vector)
if ( Clock_isrs == 1 ) {
rtems_clock_tick();
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
}
else
Clock_isrs -= 1;
@@ -55,7 +55,7 @@ void Install_clock(
)
{
Clock_driver_ticks = 0;
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );

View File

@@ -91,12 +91,9 @@ extern char _copy_data_from_rom[];
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
extern m68k_isr_entry M68Kvec[]; /* vector table address */
extern int stack_size;
extern int stack_start;
/*

View File

@@ -19,15 +19,6 @@
#include <string.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;
char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
@@ -65,5 +56,5 @@ void bsp_start( void )
m68k_get_vbr( vbr );
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
Configuration.work_space_start = (void *) &_WorkspaceBase;
}

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -66,7 +66,7 @@ rtems_isr Clock_isr(
if ( Clock_isrs == 1 ) {
rtems_clock_tick();
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
}
else
Clock_isrs -= 1;
@@ -79,7 +79,7 @@ void Install_clock(
volatile struct z8036_map *timer;
Clock_driver_ticks = 0;
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
timer = (struct z8036_map *) 0xfffb0000;

View File

@@ -90,8 +90,6 @@ struct w_m681_info {
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
/* M68681 DUART chip register variables */
EXTERN volatile struct r_m681_info *_Read_m681; /* M68681 read registers */

View File

@@ -21,15 +21,6 @@
#include <rtems/libcsupport.h>
#include <rtems/zilog/z8036.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;
char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
@@ -71,5 +62,5 @@ void bsp_start( void )
rtems_cache_enable_instruction();
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
Configuration.work_space_start = (void *) &_WorkspaceBase;
}

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -54,7 +54,7 @@ rtems_isr Clock_isr(rtems_vector_number vector)
if (Clock_isrs == 1) {
rtems_clock_tick();
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
}
else
Clock_isrs -= 1;
@@ -64,7 +64,7 @@ void Install_clock(rtems_isr_entry clock_isr )
{
Clock_driver_ticks = 0;
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, TIMER_2_VECTOR, 1 );

View File

@@ -116,8 +116,6 @@ struct pcc_map {
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
extern m68k_isr_entry M68Kvec[]; /* vector table address */
/*

View File

@@ -24,15 +24,6 @@
#include <rtems/libio.h>
#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;
char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
@@ -79,5 +70,5 @@ void bsp_start( void )
rtems_cache_enable_instruction();
rtems_cache_enable_data();
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
Configuration.work_space_start = (void *) &_WorkspaceBase;
}

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -58,7 +58,7 @@ rtems_isr Clock_isr(rtems_vector_number vector)
if ( Clock_isrs == 1 ) {
rtems_clock_tick();
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
}
else
Clock_isrs -= 1;
@@ -68,7 +68,7 @@ void Install_clock(rtems_isr_entry clock_isr )
{
Clock_driver_ticks = 0;
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
lcsr->vector_base |= MASK_INT; /* unmask VMEchip2 interrupts */

View File

@@ -177,8 +177,6 @@ typedef volatile struct {
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
extern m68k_isr_entry M68Kvec[]; /* vector table address */
/* functions */

View File

@@ -28,15 +28,6 @@
#include <rtems/libcsupport.h>
#include <page_table.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;
char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
@@ -95,5 +86,5 @@ void bsp_start( void )
page_table_init();
BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
Configuration.work_space_start = (void *) &_WorkspaceBase;
}

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -101,7 +101,7 @@ rtems_isr VMEchip2_T2_isr(
long i;
long ct; /* Number of T2 ticks per RTEMS ticks */
ct = BSP_Configuration.microseconds_per_tick / 1000;
ct = rtems_configuration_get_microseconds_per_tick() / 1000;
/*
* May have missed interrupts, so should look at the overflow counter.
@@ -149,7 +149,7 @@ rtems_isr VMEchip2_T2_isr(
void VMEchip2_T2_initialize( void )
{
Clock_driver_ticks = 0;
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
lcsr->intr_ena &= 0xFDFFFFFF; /* Disable tick timer 2 interrupt */
lcsr->intr_clear = 0x02000000; /* Clear tick timer 2 interrupt */

View File

@@ -332,16 +332,8 @@ m68k_isr_entry set_vector(
* NOTE: Use the standard Clock driver entry
*/
/*
* How many libio files we want
*/
#define BSP_LIBIO_MAX_FDS 20
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
extern m68k_isr_entry M68Kvec[]; /* vector table address */
#ifdef __cplusplus

View File

@@ -26,15 +26,9 @@
#include <page_table.h>
#include <fatal.h>
/*
* 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;
rtems_configuration_table BSP_Configuration;
/* XXX If RTEMS let the BSP replace the default fatal error handler... */
rtems_extensions_table user_extension_table;
/*
* Use the shared implementations of the following routines.
* Look in rtems/c/src/lib/libbsp/shared/bsppost.c and
@@ -127,9 +121,9 @@ void bsp_start( void )
* supply one with our own fatal error handler that returns control to
* 167Bug.
*/
if ( BSP_Configuration.User_extension_table == NULL ) {
if ( Configuration.User_extension_table == NULL ) {
user_extension_table.fatal = bsp_fatal_error_occurred;
BSP_Configuration.User_extension_table = &user_extension_table;
Configuration.User_extension_table = &user_extension_table;
}
/*
@@ -137,5 +131,5 @@ void bsp_start( void )
* tell the RTEMS configuration where it is. This memory is
* not malloc'ed. It is just "pulled from the air".
*/
BSP_Configuration.work_space_start = (void *)&_WorkspaceBase;
Configuration.work_space_start = (void *)&_WorkspaceBase;
}

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -73,7 +73,7 @@ rtems_isr Clock_isr(
if ( Clock_isrs == 1 ) {
rtems_clock_tick();
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
}
else
Clock_isrs -= 1;
@@ -85,7 +85,7 @@ void Install_clock(
{
Clock_driver_ticks = 0;
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
set_vector( clock_isr, CLOCK_VECTOR, 1 );

View File

@@ -83,8 +83,6 @@ extern "C" {
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
extern m68k_isr_entry M68Kvec[]; /* vector table address */
/* functions */

View File

@@ -20,16 +20,6 @@
#include <rtems/libio.h>
#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;
rtems_interrupt_level bsp_isr_level;
char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
@@ -58,5 +48,5 @@ 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;
}

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -94,7 +94,7 @@ void Install_clock(
*/
Clock_driver_ticks = 0;
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
/*

View File

@@ -41,10 +41,6 @@ extern "C" {
#define RAM_START 0
#define RAM_END 0x100000
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
/*
* Device Driver Table Entries
*/

View File

@@ -20,15 +20,6 @@
#include <rtems/libio.h>
#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;
char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
@@ -88,5 +79,5 @@ void bsp_start( void )
* not malloc'ed. It is just "pulled from the air".
*/
BSP_Configuration.work_space_start = (void *) 0;
Configuration.work_space_start = (void *) 0;
}

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>
* include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field

View File

@@ -77,7 +77,7 @@ Clock_isr (rtems_vector_number vector)
void
Clock_exit(void)
{
if (BSP_Configuration.ticks_per_timeslice)
if (rtems_configuration_get_ticks_per_timeslice())
{
/* disable all timer1 interrupts */
set_clock_period(0);
@@ -100,9 +100,9 @@ Install_clock(rtems_isr_entry clock_isr)
uint32_t period;
Clock_driver_ticks = 0;
if (BSP_Configuration.ticks_per_timeslice) {
if (rtems_configuration_get_ticks_per_timeslice()) {
rtems_isr_entry old_isr;
period = bsp_clicks_per_second / BSP_Configuration.ticks_per_timeslice;
period = bsp_clicks_per_second / rtems_configuration_get_ticks_per_timeslice();
/* Configure timer interrupts */
set_clock_period(period);

View File

@@ -87,7 +87,6 @@ extern void *CPU_Interrupt_stack_high ;
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
extern void bsp_cleanup( void );
/*

View File

@@ -36,17 +36,8 @@
*/
uint32_t bsp_clicks_per_second;
/*
* The original table from the application and our copy of it with
* some changes.
*/
extern void bsp_hw_init(void);
extern rtems_configuration_table Configuration;
rtems_configuration_table BSP_Configuration;
char *rtems_progname;
/*
* Use the shared implementations of the following routines
*/
@@ -111,8 +102,8 @@ void bsp_start(void)
* not malloc'ed. It is just "pulled from the air".
*/
BSP_Configuration.work_space_start = (void *) &WorkSpaceStart ;
BSP_Configuration.work_space_size =
Configuration.work_space_start = (void *) &WorkSpaceStart ;
rtems_configuration_get_work_space_size() =
(uint32_t) &WorkSpaceEnd -
(uint32_t) &WorkSpaceStart ;

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();
}