mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, clock/ckinit.c, startup/bspstart.c, startup/linkcmds: Add use of bsp_get_work_area() in its own file and rely on BSP Framework to perform more initialization. Remove unnecessary includes of rtems/libio.h and rtems/libcsupport.h.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* Makefile.am, configure.ac, clock/ckinit.c, startup/bspstart.c,
|
||||||
|
startup/linkcmds: Add use of bsp_get_work_area() in its own file and
|
||||||
|
rely on BSP Framework to perform more initialization. Remove
|
||||||
|
unnecessary includes of rtems/libio.h and rtems/libcsupport.h.
|
||||||
|
|
||||||
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* include/bsp.h: Review of all bsp_cleanup() implementations. In this
|
* include/bsp.h: Review of all bsp_cleanup() implementations. In this
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ dist_project_lib_DATA += startup/linkcmds
|
|||||||
startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
|
startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
|
||||||
../../shared/bsppredriverhook.c \
|
../../shared/bsppredriverhook.c \
|
||||||
../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
|
../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
|
||||||
../../m68k/shared/m68kpretaskinghook.c \
|
../../shared/bsppretaskinghook.c ../../m68k/shared/m68kbspgetworkarea.c \
|
||||||
../../shared/sbrk.c ../../m68k/shared/setvec.c \
|
../../shared/sbrk.c ../../m68k/shared/setvec.c \
|
||||||
../../shared/gnatinstallhandler.c
|
../../shared/gnatinstallhandler.c
|
||||||
clock_SOURCES = clock/ckinit.c
|
clock_SOURCES = clock/ckinit.c
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <rtems/libio.h>
|
|
||||||
|
|
||||||
uint32_t Clock_isrs; /* ISRs until next tick */
|
uint32_t Clock_isrs; /* ISRs until next tick */
|
||||||
volatile uint32_t Clock_driver_ticks;
|
volatile uint32_t Clock_driver_ticks;
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
|
|||||||
RTEMS_CANONICALIZE_TOOLS
|
RTEMS_CANONICALIZE_TOOLS
|
||||||
RTEMS_PROG_CCAS
|
RTEMS_PROG_CCAS
|
||||||
|
|
||||||
|
RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
|
||||||
|
|
||||||
# Explicitly list all Makefiles here
|
# Explicitly list all Makefiles here
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
@@ -14,11 +14,7 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <rtems/libio.h>
|
|
||||||
#include <rtems/libcsupport.h>
|
|
||||||
|
|
||||||
unsigned char *duart_base;
|
unsigned char *duart_base;
|
||||||
extern struct duart_regs duart_info;
|
extern struct duart_regs duart_info;
|
||||||
@@ -27,41 +23,29 @@ extern struct duart_regs duart_info;
|
|||||||
|
|
||||||
void led_putnum(void);
|
void led_putnum(void);
|
||||||
|
|
||||||
/*
|
|
||||||
* Use the shared implementations of the following routines
|
|
||||||
*/
|
|
||||||
|
|
||||||
void bsp_libc_init( void *, uint32_t, int );
|
|
||||||
void bsp_pretasking_hook(void); /* m68k version */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_start
|
* bsp_start
|
||||||
*
|
*
|
||||||
* This routine does the bulk of the system initialization.
|
* This routine does the bulk of the system initialization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void bsp_start( void )
|
void bsp_start( void )
|
||||||
{
|
{
|
||||||
m68k_isr_entry *monitors_vector_table;
|
m68k_isr_entry *monitors_vector_table;
|
||||||
int index;
|
int index;
|
||||||
extern void *_WorkspaceBase;
|
|
||||||
extern void *_RamSize;
|
|
||||||
extern unsigned long _M68k_Ramsize;
|
|
||||||
|
|
||||||
/* RAM size set in linker script */
|
/* RAM size set in linker script */
|
||||||
_M68k_Ramsize = (unsigned long)&_RamSize;
|
|
||||||
duart_base = (unsigned char *)DUART_ADDR;
|
duart_base = (unsigned char *)DUART_ADDR;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the VBR here to the monitor's default.
|
* Set the VBR here to the monitor's default.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
monitors_vector_table = (m68k_isr_entry *)0;
|
monitors_vector_table = (m68k_isr_entry *)0;
|
||||||
/* This is where you set vector base register = 0 */
|
/* This is where you set vector base register = 0 */
|
||||||
m68k_set_vbr( monitors_vector_table );
|
m68k_set_vbr( monitors_vector_table );
|
||||||
|
|
||||||
/* The vector interrupt table for the 680x0 is in appendix B-2
|
/* The vector interrupt table for the 680x0 is in appendix B-2
|
||||||
of the M68000 Family Programmer's reference table */
|
* of the M68000 Family Programmer's reference table
|
||||||
|
*/
|
||||||
for ( index=2 ; index<=255 ; index++ )
|
for ( index=2 ; index<=255 ; index++ )
|
||||||
M68Kvec[ index ] = monitors_vector_table[ 32 ];
|
M68Kvec[ index ] = monitors_vector_table[ 32 ];
|
||||||
|
|
||||||
@@ -78,9 +62,5 @@ void bsp_start( void )
|
|||||||
rtems_cache_enable_instruction();
|
rtems_cache_enable_instruction();
|
||||||
rtems_cache_enable_data();
|
rtems_cache_enable_data();
|
||||||
|
|
||||||
Configuration.work_space_start = (void *) &_WorkspaceBase;
|
|
||||||
|
|
||||||
/* led_putnum('e'); * for debugging purposes only */
|
/* led_putnum('e'); * for debugging purposes only */
|
||||||
|
|
||||||
/* Clock_exit is done as an atexit() function */
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ MEMORY
|
|||||||
*/
|
*/
|
||||||
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
|
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
|
||||||
_RamSize = DEFINED(_RamSize) ? _RamSize : 2M;
|
_RamSize = DEFINED(_RamSize) ? _RamSize : 2M;
|
||||||
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
|
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
|
||||||
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
|
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* Makefile.am, configure.ac, clock/ckinit.c, startup/bspstart.c,
|
||||||
|
startup/linkcmds: Add use of bsp_get_work_area() in its own file and
|
||||||
|
rely on BSP Framework to perform more initialization. Remove
|
||||||
|
unnecessary includes of rtems/libio.h and rtems/libcsupport.h.
|
||||||
|
|
||||||
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* include/bsp.h: Review of all bsp_cleanup() implementations. In this
|
* include/bsp.h: Review of all bsp_cleanup() implementations. In this
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ dist_project_lib_DATA += startup/linkcmds
|
|||||||
|
|
||||||
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
|
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
|
||||||
../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
|
../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
|
||||||
../../m68k/shared/m68kpretaskinghook.c ../../shared/bsppredriverhook.c \
|
../../shared/bsppretaskinghook.c ../../shared/bsppredriverhook.c \
|
||||||
../../shared/sbrk.c ../../m68k/shared/setvec.c \
|
../../m68k/shared/m68kbspgetworkarea.c ../../shared/sbrk.c \
|
||||||
../../shared/gnatinstallhandler.c
|
../../m68k/shared/setvec.c ../../shared/gnatinstallhandler.c
|
||||||
clock_SOURCES = clock/ckinit.c
|
clock_SOURCES = clock/ckinit.c
|
||||||
console_SOURCES = console/console.c ../../shared/dummy_printk_support.c
|
console_SOURCES = console/console.c ../../shared/dummy_printk_support.c
|
||||||
timer_SOURCES = timer/timer.c timer/timerisr.S
|
timer_SOURCES = timer/timer.c timer/timerisr.S
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <rtems/libio.h>
|
|
||||||
|
|
||||||
#define MS_COUNT 65376 /* 1ms */
|
#define MS_COUNT 65376 /* 1ms */
|
||||||
/* MS_COUNT = 0x10000 - 1e-3/6.25e-6 */
|
/* MS_COUNT = 0x10000 - 1e-3/6.25e-6 */
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
|
|||||||
RTEMS_CANONICALIZE_TOOLS
|
RTEMS_CANONICALIZE_TOOLS
|
||||||
RTEMS_PROG_CCAS
|
RTEMS_PROG_CCAS
|
||||||
|
|
||||||
|
RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
|
||||||
|
|
||||||
# Explicitly list all Makefiles here
|
# Explicitly list all Makefiles here
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
@@ -18,18 +18,7 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <rtems/libio.h>
|
|
||||||
#include <rtems/libcsupport.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Use the shared implementations of the following routines
|
|
||||||
*/
|
|
||||||
|
|
||||||
void bsp_libc_init( void *, uint32_t, int );
|
|
||||||
void bsp_pretasking_hook(void); /* m68k version */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_start
|
* bsp_start
|
||||||
@@ -41,12 +30,6 @@ void bsp_start( void )
|
|||||||
{
|
{
|
||||||
m68k_isr_entry *monitors_vector_table;
|
m68k_isr_entry *monitors_vector_table;
|
||||||
int index;
|
int index;
|
||||||
extern void *_WorkspaceBase;
|
|
||||||
extern void *_RamSize;
|
|
||||||
extern unsigned long _M68k_Ramsize;
|
|
||||||
|
|
||||||
/* RAM size set in linker script */
|
|
||||||
_M68k_Ramsize = (unsigned long)&_RamSize;
|
|
||||||
|
|
||||||
monitors_vector_table = (m68k_isr_entry *)0; /* 135Bug Vectors are at 0 */
|
monitors_vector_table = (m68k_isr_entry *)0; /* 135Bug Vectors are at 0 */
|
||||||
m68k_set_vbr( monitors_vector_table );
|
m68k_set_vbr( monitors_vector_table );
|
||||||
@@ -68,6 +51,4 @@ void bsp_start( void )
|
|||||||
|
|
||||||
rtems_cache_enable_instruction();
|
rtems_cache_enable_instruction();
|
||||||
rtems_cache_enable_data();
|
rtems_cache_enable_data();
|
||||||
|
|
||||||
Configuration.work_space_start = (void *) &_WorkspaceBase;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
*/
|
*/
|
||||||
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
|
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
|
||||||
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
|
_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
|
||||||
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
|
|
||||||
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
|
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
|
||||||
|
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* Makefile.am, configure.ac, clock/ckinit.c, startup/bspstart.c,
|
||||||
|
startup/linkcmds: Add use of bsp_get_work_area() in its own file and
|
||||||
|
rely on BSP Framework to perform more initialization. Remove
|
||||||
|
unnecessary includes of rtems/libio.h and rtems/libcsupport.h.
|
||||||
|
|
||||||
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* include/bsp.h: Review of all bsp_cleanup() implementations. In this
|
* include/bsp.h: Review of all bsp_cleanup() implementations. In this
|
||||||
|
|||||||
@@ -38,8 +38,9 @@ dist_project_lib_DATA += startup/linkcmds
|
|||||||
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
|
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
|
||||||
../../shared/bsppredriverhook.c ../../shared/bsppost.c \
|
../../shared/bsppredriverhook.c ../../shared/bsppost.c \
|
||||||
startup/bspstart.c ../../shared/bootcard.c \
|
startup/bspstart.c ../../shared/bootcard.c \
|
||||||
../../m68k/shared/m68kpretaskinghook.c \
|
../../shared/bsppretaskinghook.c startup/page_table.c \
|
||||||
startup/page_table.c ../../shared/sbrk.c ../../m68k/shared/setvec.c \
|
../../m68k/shared/m68kbspgetworkarea.c startup/page_table.c \
|
||||||
|
../../shared/sbrk.c ../../m68k/shared/setvec.c \
|
||||||
../../shared/gnatinstallhandler.c
|
../../shared/gnatinstallhandler.c
|
||||||
clock_SOURCES = clock/ckinit.c
|
clock_SOURCES = clock/ckinit.c
|
||||||
console_SOURCES = console/console.c ../../shared/dummy_printk_support.c
|
console_SOURCES = console/console.c ../../shared/dummy_printk_support.c
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <rtems/libio.h>
|
|
||||||
|
|
||||||
#define MS_COUNT 1000 /* T2's countdown constant (1 ms) */
|
#define MS_COUNT 1000 /* T2's countdown constant (1 ms) */
|
||||||
#define CLOCK_INT_LEVEL 6 /* T2's interrupt level */
|
#define CLOCK_INT_LEVEL 6 /* T2's interrupt level */
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ RTEMS_CHECK_NETWORKING
|
|||||||
AM_CONDITIONAL([HAS_NETWORKING],test "$HAS_NETWORKING" = "yes")
|
AM_CONDITIONAL([HAS_NETWORKING],test "$HAS_NETWORKING" = "yes")
|
||||||
AM_CONDITIONAL([HAS_FPSP],[test "$RTEMS_CPU_MODEL" = "m68040"])
|
AM_CONDITIONAL([HAS_FPSP],[test "$RTEMS_CPU_MODEL" = "m68040"])
|
||||||
|
|
||||||
|
RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
|
||||||
|
|
||||||
# Explicitly list all Makefiles here
|
# Explicitly list all Makefiles here
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
@@ -21,35 +21,18 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <rtems/libio.h>
|
|
||||||
#include <rtems/libcsupport.h>
|
|
||||||
#include <page_table.h>
|
#include <page_table.h>
|
||||||
|
|
||||||
/*
|
|
||||||
* Use the shared implementations of the following routines
|
|
||||||
*/
|
|
||||||
|
|
||||||
void bsp_libc_init( void *, uint32_t, int );
|
|
||||||
void bsp_pretasking_hook(void); /* m68k version */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_start
|
* bsp_start
|
||||||
*
|
*
|
||||||
* This routine does the bulk of the system initialization.
|
* This routine does the bulk of the system initialization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void bsp_start( void )
|
void bsp_start( void )
|
||||||
{
|
{
|
||||||
m68k_isr_entry *monitors_vector_table;
|
m68k_isr_entry *monitors_vector_table;
|
||||||
int index;
|
int index;
|
||||||
extern void *_WorkspaceBase;
|
|
||||||
extern void *_RamSize;
|
|
||||||
extern unsigned long _M68k_Ramsize;
|
|
||||||
|
|
||||||
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 162Bug Vectors are at 0xFFE00000
|
* 162Bug Vectors are at 0xFFE00000
|
||||||
@@ -84,6 +67,4 @@ void bsp_start( void )
|
|||||||
lcsr->vector_base = (VBR0 << 28) | (VBR1 << 24);
|
lcsr->vector_base = (VBR0 << 28) | (VBR1 << 24);
|
||||||
|
|
||||||
page_table_init();
|
page_table_init();
|
||||||
|
|
||||||
Configuration.work_space_start = (void *) &_WorkspaceBase;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x20000;
|
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x20000;
|
||||||
_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
|
_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
|
||||||
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
|
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
|
||||||
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
|
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
|
|||||||
Reference in New Issue
Block a user