From d34d8692b674a3366e3cef11a33941e8160c338d Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 4 Dec 2007 22:22:26 +0000 Subject: 2007-12-04 Joel Sherrill * include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field from CPU Table to Configuration Table. Eliminate CPU Table from all ports. Delete references to CPU Table in all forms. --- c/src/lib/libbsp/powerpc/gen405/ChangeLog | 6 ++++++ c/src/lib/libbsp/powerpc/gen405/include/bsp.h | 10 ---------- c/src/lib/libbsp/powerpc/gen405/startup/bspstart.c | 9 +-------- c/src/lib/libbsp/powerpc/helas403/ChangeLog | 6 ++++++ c/src/lib/libbsp/powerpc/helas403/include/bsp.h | 10 ---------- .../lib/libbsp/powerpc/helas403/startup/bspstart.c | 9 +-------- c/src/lib/libbsp/powerpc/mvme5500/ChangeLog | 6 ++++++ c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h | 1 - .../lib/libbsp/powerpc/mvme5500/startup/bspstart.c | 21 +++++---------------- c/src/lib/libbsp/powerpc/psim/ChangeLog | 6 ++++++ c/src/lib/libbsp/powerpc/psim/include/bsp.h | 10 ---------- c/src/lib/libbsp/powerpc/psim/startup/bspstart.c | 16 +++++----------- c/src/lib/libbsp/powerpc/score603e/ChangeLog | 6 ++++++ c/src/lib/libbsp/powerpc/score603e/include/bsp.h | 2 -- .../lib/libbsp/powerpc/score603e/startup/bspstart.c | 6 +----- c/src/lib/libbsp/powerpc/virtex/ChangeLog | 6 ++++++ c/src/lib/libbsp/powerpc/virtex/include/bsp.h | 10 ---------- c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c | 11 ++--------- 18 files changed, 51 insertions(+), 100 deletions(-) (limited to 'c/src/lib/libbsp/powerpc') diff --git a/c/src/lib/libbsp/powerpc/gen405/ChangeLog b/c/src/lib/libbsp/powerpc/gen405/ChangeLog index 1a0b6bcc20..b959fa89ca 100644 --- a/c/src/lib/libbsp/powerpc/gen405/ChangeLog +++ b/c/src/lib/libbsp/powerpc/gen405/ChangeLog @@ -1,3 +1,9 @@ +2007-12-04 Joel Sherrill + + * include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field + from CPU Table to Configuration Table. Eliminate CPU Table from all + ports. Delete references to CPU Table in all forms. + 2007-12-03 Joel Sherrill * startup/bspstart.c: Moved most of the remaining CPU Table fields to diff --git a/c/src/lib/libbsp/powerpc/gen405/include/bsp.h b/c/src/lib/libbsp/powerpc/gen405/include/bsp.h index 001fe3d8d3..1c1aee5ea9 100644 --- a/c/src/lib/libbsp/powerpc/gen405/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/gen405/include/bsp.h @@ -49,15 +49,6 @@ extern "C" { #include -/* - * confdefs.h overrides for this BSP: - * - number of termios serial ports (defaults to 1) - * - Interrupt stack space is not minimum if defined. - */ - -/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */ -#define CONFIGURE_INTERRUPT_STACK_MEMORY (16 * 1024) - #ifdef ASM /* Definition of where to store registers in alignment handler */ #define ALIGN_REGS 0x0140 @@ -77,7 +68,6 @@ extern "C" { /* miscellaneous stuff assumed to exist */ extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ -extern rtems_cpu_table Cpu_table; /* owned by BSP */ /* * Device Driver Table Entries diff --git a/c/src/lib/libbsp/powerpc/gen405/startup/bspstart.c b/c/src/lib/libbsp/powerpc/gen405/startup/bspstart.c index bba3dfe6fd..62f9af6913 100644 --- a/c/src/lib/libbsp/powerpc/gen405/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/gen405/startup/bspstart.c @@ -70,11 +70,7 @@ */ extern rtems_configuration_table Configuration; - rtems_configuration_table BSP_Configuration; - -rtems_cpu_table Cpu_table; - char *rtems_progname; void *bsp_ram_end = (void *)RAM_END; /* first addr behind avail. ram area */ @@ -183,11 +179,8 @@ void bsp_start( void ) ((char *)(bsp_ram_end)) - BSP_Configuration.work_space_size; /* - * initialize the CPU table for this BSP + * initialize the device driver parameters */ - - Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; - bsp_clicks_per_usec = 300; bsp_serial_per_sec = 14625000; bsp_serial_external_clock = 0; diff --git a/c/src/lib/libbsp/powerpc/helas403/ChangeLog b/c/src/lib/libbsp/powerpc/helas403/ChangeLog index d08fedd5a4..7b5d9c4273 100644 --- a/c/src/lib/libbsp/powerpc/helas403/ChangeLog +++ b/c/src/lib/libbsp/powerpc/helas403/ChangeLog @@ -1,3 +1,9 @@ +2007-12-04 Joel Sherrill + + * include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field + from CPU Table to Configuration Table. Eliminate CPU Table from all + ports. Delete references to CPU Table in all forms. + 2007-12-03 Joel Sherrill * startup/bspstart.c: Moved most of the remaining CPU Table fields to diff --git a/c/src/lib/libbsp/powerpc/helas403/include/bsp.h b/c/src/lib/libbsp/powerpc/helas403/include/bsp.h index 0540514818..305f7d427a 100644 --- a/c/src/lib/libbsp/powerpc/helas403/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/helas403/include/bsp.h @@ -46,15 +46,6 @@ extern "C" { #include -/* - * confdefs.h overrides for this BSP: - * - number of termios serial ports (defaults to 1) - * - Interrupt stack space is not minimum if defined. - */ - -/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */ -#define CONFIGURE_INTERRUPT_STACK_MEMORY (16 * 1024) - #ifdef ASM /* Definition of where to store registers in alignment handler */ #define ALIGN_REGS 0x0140 @@ -74,7 +65,6 @@ extern "C" { /* miscellaneous stuff assumed to exist */ extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ -extern rtems_cpu_table Cpu_table; /* owned by BSP */ /* * Device Driver Table Entries diff --git a/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c b/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c index 4b82e295dd..ee00a0418c 100644 --- a/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c @@ -68,11 +68,7 @@ */ extern rtems_configuration_table Configuration; - rtems_configuration_table BSP_Configuration; - -rtems_cpu_table Cpu_table; - char *rtems_progname; void *bsp_ram_end = (void *)RAM_END; /* first addr behind avail. ram area */ @@ -173,11 +169,8 @@ void bsp_start( void ) ((char *)(bsp_ram_end)) - BSP_Configuration.work_space_size; /* - * initialize the CPU table for this BSP + * initialize the device driver parameters */ - - Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; - bsp_clicks_per_usec = 25; bsp_serial_per_sec = 25000000; bsp_serial_external_clock = 0; diff --git a/c/src/lib/libbsp/powerpc/mvme5500/ChangeLog b/c/src/lib/libbsp/powerpc/mvme5500/ChangeLog index 80fcce2c88..ac11707290 100644 --- a/c/src/lib/libbsp/powerpc/mvme5500/ChangeLog +++ b/c/src/lib/libbsp/powerpc/mvme5500/ChangeLog @@ -1,3 +1,9 @@ +2007-12-04 Joel Sherrill + + * include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field + from CPU Table to Configuration Table. Eliminate CPU Table from all + ports. Delete references to CPU Table in all forms. + 2007-12-03 Joel Sherrill * Makefile.am, include/bsp.h, startup/bspstart.c: Moved most of the diff --git a/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h b/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h index 2b8a8526d1..06df360651 100644 --- a/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h @@ -69,7 +69,6 @@ */ #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 -#define CONFIGURE_INTERRUPT_STACK_MEMORY (16 * 1024) /* uart.c uses out_8 instead of outb */ #define BSP_UART_IOBASE_COM1 GT64260_DEV1_BASE + 0x20000 diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c index 6419539f8a..d61a44e642 100644 --- a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c @@ -127,10 +127,9 @@ static char cmdline_buf[CMDLINE_BUF_SIZE]; char *BSP_commandline_string = cmdline_buf; /* - * system init stack and soft ir stack size + * system init stack */ #define INIT_STACK_SIZE 0x1000 -#define INTR_STACK_SIZE CONFIGURE_INTERRUPT_STACK_MEMORY void BSP_panic(char *s) { @@ -150,11 +149,7 @@ void _BSP_Fatal_error(unsigned int v) */ extern rtems_configuration_table Configuration; - rtems_configuration_table BSP_Configuration; - -rtems_cpu_table Cpu_table; - char *rtems_progname; /* @@ -327,7 +322,8 @@ void bsp_start( void ) * This could be done latter (e.g in IRQ_INIT) but it helps to understand * some settings below... */ - BSP_heap_start = ((uint32_t) __rtems_end) + INIT_STACK_SIZE + INTR_STACK_SIZE; + BSP_heap_start = ((uint32_t) __rtems_end) + INIT_STACK_SIZE + + rtems_configuration_get_interrupt_stack_size(); intrStack = BSP_heap_start - PPC_MINIMUM_STACK_FRAME_SIZE; /* make sure it's properly aligned */ @@ -402,13 +398,6 @@ void bsp_start( void ) printk("Now BSP_mem_size = 0x%x\n",BSP_mem_size); - /* - * Set up our hooks - * Make sure libc_init is done before drivers initialized so that - * they can use atexit() - */ - - Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; /* P94 : 7455 TB/DECR is clocked by the system bus clock frequency */ bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000); @@ -421,8 +410,8 @@ void bsp_start( void ) work_space_start = (unsigned char *)BSP_mem_size - BSP_Configuration.work_space_size; - if ( work_space_start <= - ((unsigned char *)__rtems_end) + INIT_STACK_SIZE + INTR_STACK_SIZE) { + if ( work_space_start <= ((unsigned char *)__rtems_end) + INIT_STACK_SIZE + + rtems_configuration_get_interrupt_stack_size()) { printk( "bspstart: Not enough RAM!!!\n" ); bsp_cleanup(); } diff --git a/c/src/lib/libbsp/powerpc/psim/ChangeLog b/c/src/lib/libbsp/powerpc/psim/ChangeLog index 6f61c2594b..f131f98dad 100644 --- a/c/src/lib/libbsp/powerpc/psim/ChangeLog +++ b/c/src/lib/libbsp/powerpc/psim/ChangeLog @@ -1,3 +1,9 @@ +2007-12-04 Joel Sherrill + + * include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field + from CPU Table to Configuration Table. Eliminate CPU Table from all + ports. Delete references to CPU Table in all forms. + 2007-12-03 Joel Sherrill * Makefile.am, irq/no_pic.c: Spacing. diff --git a/c/src/lib/libbsp/powerpc/psim/include/bsp.h b/c/src/lib/libbsp/powerpc/psim/include/bsp.h index 0a828ff75a..d97f8461db 100644 --- a/c/src/lib/libbsp/powerpc/psim/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/psim/include/bsp.h @@ -38,15 +38,6 @@ extern "C" { #include -/* - * confdefs.h overrides for this BSP: - * - termios serial ports (defaults to 1) - * - Interrupt stack space is not minimum if defined. - */ - -/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */ -#define CONFIGURE_INTERRUPT_STACK_MEMORY (12 * 1024) - #ifdef ASM /* Definition of where to store registers in alignment handler */ #define ALIGN_REGS 0x0140 @@ -91,7 +82,6 @@ extern int end; /* last address in the program */ void bsp_cleanup( void ); extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ -extern rtems_cpu_table Cpu_table; /* owned by BSP */ #endif /* ASM */ diff --git a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c index a8f3090240..e9d2c30c64 100644 --- a/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/psim/startup/bspstart.c @@ -51,7 +51,6 @@ extern int PSIM_INSTRUCTIONS_PER_MICROSECOND; extern rtems_configuration_table Configuration; rtems_configuration_table BSP_Configuration; -rtems_cpu_table Cpu_table; /* * Tells us where to put the workspace in case remote debugger is present. @@ -79,10 +78,9 @@ void bsp_postdriver_hook(void); void bsp_libc_init( void *, uint32_t, int ); /* - * system init stack and soft irq stack size + * system init stack */ #define INIT_STACK_SIZE 0x1000 -#define INTR_STACK_SIZE CONFIGURE_INTERRUPT_STACK_MEMORY void BSP_panic(char *s) { @@ -142,13 +140,8 @@ void bsp_start( void ) current_ppc_cpu = PPC_PSIM; /* - * Set up our hooks - * Make sure libc_init is done before drivers initialized so that - * they can use atexit() + * initialize the device driver parameters */ - - Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; - BSP_bus_frequency = (unsigned int)&PSIM_INSTRUCTIONS_PER_MICROSECOND; BSP_time_base_divisor = 1; @@ -182,8 +175,9 @@ void bsp_start( void ) * This could be done latter (e.g in IRQ_INIT) but it helps to understand * some settings below... */ - intrStack = ((uint32_t) __rtems_end) + - INIT_STACK_SIZE + INTR_STACK_SIZE - PPC_MINIMUM_STACK_FRAME_SIZE; + intrStack = ((uint32_t) __rtems_end) + INIT_STACK_SIZE + + rtems_configuration_get_interrupt_stack_size() - + PPC_MINIMUM_STACK_FRAME_SIZE; /* make sure it's properly aligned */ intrStack &= ~(CPU_STACK_ALIGNMENT-1); diff --git a/c/src/lib/libbsp/powerpc/score603e/ChangeLog b/c/src/lib/libbsp/powerpc/score603e/ChangeLog index 9b79d7cdc1..a6a9a4a15f 100644 --- a/c/src/lib/libbsp/powerpc/score603e/ChangeLog +++ b/c/src/lib/libbsp/powerpc/score603e/ChangeLog @@ -1,3 +1,9 @@ +2007-12-04 Joel Sherrill + + * include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field + from CPU Table to Configuration Table. Eliminate CPU Table from all + ports. Delete references to CPU Table in all forms. + 2007-12-03 Joel Sherrill * Makefile.am, startup/bspstart.c: Moved most of the remaining CPU diff --git a/c/src/lib/libbsp/powerpc/score603e/include/bsp.h b/c/src/lib/libbsp/powerpc/score603e/include/bsp.h index cbae0dce19..94d677ae72 100644 --- a/c/src/lib/libbsp/powerpc/score603e/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/score603e/include/bsp.h @@ -37,7 +37,6 @@ extern "C" { #else #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS (4) #endif -#define CONFIGURE_INTERRUPT_STACK_MEMORY (12 * 1024) #ifdef ASM /* Definition of where to store registers in alignment handler */ @@ -222,7 +221,6 @@ unsigned int SCORE603e_FLASH_Enable_writes( ( ((_data&0x00ff)<<8) | ((_data&0xff00)>>8) ) extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ -extern rtems_cpu_table Cpu_table; /* owned by BSP */ extern uint32_t bsp_isr_level; #endif /* ASM */ diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c index e17bb625f6..f042f07645 100644 --- a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c @@ -49,7 +49,6 @@ uint32_t bsp_clicks_per_usec; extern rtems_configuration_table Configuration; rtems_configuration_table BSP_Configuration; -rtems_cpu_table Cpu_table; uint32_t bsp_isr_level; void BSP_panic(char *s) @@ -306,11 +305,8 @@ void bsp_start( void ) BSP_Configuration.work_space_start = work_space_start; /* - * initialize the CPU table for this BSP + * initialize the device driver parameters */ - - Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; - bsp_clicks_per_usec = 66 / 4; /* XXX get from linkcmds */ #if ( PPC_USE_DATA_CACHE ) diff --git a/c/src/lib/libbsp/powerpc/virtex/ChangeLog b/c/src/lib/libbsp/powerpc/virtex/ChangeLog index df255177f9..5897646efc 100644 --- a/c/src/lib/libbsp/powerpc/virtex/ChangeLog +++ b/c/src/lib/libbsp/powerpc/virtex/ChangeLog @@ -1,3 +1,9 @@ +2007-12-04 Joel Sherrill + + * include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field + from CPU Table to Configuration Table. Eliminate CPU Table from all + ports. Delete references to CPU Table in all forms. + 2007-12-03 Joel Sherrill * startup/bspstart.c: Moved most of the remaining CPU Table fields to diff --git a/c/src/lib/libbsp/powerpc/virtex/include/bsp.h b/c/src/lib/libbsp/powerpc/virtex/include/bsp.h index e71ee284a9..ad525641fb 100644 --- a/c/src/lib/libbsp/powerpc/virtex/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/virtex/include/bsp.h @@ -49,15 +49,6 @@ extern "C" { #include -/* - * confdefs.h overrides for this BSP: - * - number of termios serial ports (defaults to 1) - * - Interrupt stack space is not minimum if defined. - */ - -/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */ -#define CONFIGURE_INTERRUPT_STACK_MEMORY (16 * 1024) - #ifdef ASM /* Definition of where to store registers in alignment handler */ #define ALIGN_REGS 0x0140 @@ -82,7 +73,6 @@ extern uint32_t _top_of_ram; /* miscellaneous stuff assumed to exist */ extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ -extern rtems_cpu_table Cpu_table; /* owned by BSP */ /* Network Defines */ diff --git a/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c b/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c index c409f5350c..5203d44a1a 100644 --- a/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c @@ -79,11 +79,8 @@ SPR_RW(SPRG1) */ extern rtems_configuration_table Configuration; - rtems_configuration_table BSP_Configuration; -rtems_cpu_table Cpu_table; - char *rtems_progname; uint32_t _heap_start; @@ -197,17 +194,13 @@ void bsp_start( void ) */ myCpu = get_ppc_cpu_type(); myCpuRevision = get_ppc_cpu_revision(); + /* - * initialize the CPU table for this BSP - * NOTE: this must be before the exception initialization, - * because exception code useses some information from Cpu_table + * initialize the device driver parameters */ - Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; - /* timebase register ticks/microsecond */ bsp_clicks_per_usec = (250000000 / 1000000); - bsp_serial_per_sec = 14625000; bsp_serial_external_clock = 0; bsp_timer_internal_clock = 1; -- cgit v1.2.3