Patch from Charles-Antoine Gauthier <charles.gauthier@nrc.ca> after

feedback from Eric Norum <eric@skatter.usask.ca> on static and
dynamic RAM sizing issues while still having as much shared
code as possible across the m68k BSPs.
This commit is contained in:
Joel Sherrill
2000-04-07 19:04:12 +00:00
parent cc655a57ef
commit f50952c9d3
15 changed files with 76 additions and 9 deletions

View File

@@ -33,6 +33,9 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Amount of RAM on this board */
unsigned long _M68k_Ramsize;
/*
* Use the shared implementations of the following routines
*/
@@ -53,6 +56,9 @@ void bsp_start( void )
int index;
void *vbr;
extern void *_WorkspaceBase;
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
monitors_vector_table = (m68k_isr_entry *)0; /* Monitor Vectors are at 0 */
m68k_set_vbr( monitors_vector_table );

View File

@@ -32,6 +32,9 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Amount of RAM on this board */
unsigned long _M68k_Ramsize;
/*
* Use the shared implementations of the following routines
*/
@@ -50,6 +53,9 @@ void bsp_start( void )
{
void *vbr;
extern void *_WorkspaceBase;
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
/*
* we only use a hook to get the C library initialized.

View File

@@ -55,6 +55,9 @@ void bsp_start( void )
{
void *vbr;
extern void *_WorkspaceBase;
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
/* set_debug_traps(); */
/* breakpoint(); */

View File

@@ -50,6 +50,9 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
extern void *_WorkspaceBase;
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
/*
* Allocate the memory for the RTEMS Work Space. This can come from

View File

@@ -55,6 +55,9 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
extern void *_WorkspaceBase;
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
/*
* Allocate the memory for the RTEMS Work Space. This can come from

View File

@@ -392,7 +392,7 @@ ZEROLOOPTEST:
cmpl a1,a0 | Done?
bcs.s ZEROLOOP | No, skip
movel 4(a7),_RamSize | Set RAM size
movel 4(a7),_M68k_Ramsize | Set RAM size
movel #_stack_init,a7 | set master stack pointer
pea env | envp

View File

@@ -28,12 +28,13 @@
extern rtems_configuration_table Configuration;
rtems_configuration_table BSP_Configuration;
unsigned long _RamSize;
rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Amount of RAM on this board. Dynamically set in start.S */
unsigned long _M68k_Ramsize;
/*
* Use the shared implementations of the following routines
*/

View File

@@ -40,6 +40,9 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Amount of RAM on this board */
unsigned long _M68k_Ramsize;
/*
* Use the shared implementations of the following routines
*/
@@ -59,6 +62,9 @@ void bsp_start( void )
m68k_isr_entry *monitors_vector_table;
int index;
extern void *_WorkspaceBase;
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
duart_base = (unsigned char *)DUART_ADDR;

View File

@@ -34,6 +34,9 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Amount of RAM on this board */
unsigned long _M68k_Ramsize;
/*
* Use the shared implementations of the following routines
*/
@@ -53,6 +56,9 @@ void bsp_start( void )
m68k_isr_entry *monitors_vector_table;
int index;
extern void *_WorkspaceBase;
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
monitors_vector_table = (m68k_isr_entry *)0; /* 135Bug Vectors are at 0 */
m68k_set_vbr( monitors_vector_table );

View File

@@ -37,6 +37,9 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Amount of RAM on this board */
unsigned long _M68k_Ramsize;
/*
* Use the shared implementations of the following routines
*/
@@ -56,6 +59,9 @@ void bsp_start( void )
m68k_isr_entry *monitors_vector_table;
int index;
extern void *_WorkspaceBase;
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
monitors_vector_table = (m68k_isr_entry *)0; /* 135Bug Vectors are at 0 */
m68k_set_vbr( monitors_vector_table );

View File

@@ -37,6 +37,9 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Amount of RAM on this board */
unsigned long _M68k_Ramsize;
/*
* Use the shared implementations of the following routines
*/
@@ -57,6 +60,9 @@ void bsp_start( void )
int index;
rtems_unsigned8 node_number;
extern void *_WorkspaceBase;
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
monitors_vector_table = (m68k_isr_entry *)0; /* 147Bug Vectors are at 0 */
m68k_set_vbr( monitors_vector_table );

View File

@@ -41,6 +41,9 @@ rtems_cpu_table Cpu_table;
char *rtems_progname;
/* Amount of RAM on this board */
unsigned long _M68k_Ramsize;
/*
* Use the shared implementations of the following routines
*/
@@ -59,7 +62,11 @@ void bsp_start( void )
{
m68k_isr_entry *monitors_vector_table;
int index;
extern void *_WorkspaceBase;
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

View File

@@ -41,6 +41,9 @@ rtems_extensions_table user_extension_table;
rtems_cpu_table Cpu_table;
/* Amount of RAM on this board */
unsigned long _M68k_Ramsize;
/*
* Use the shared implementations of the following routines.
* Look in rtems/c/src/lib/libbsp/shared/bsppost.c and
@@ -79,14 +82,18 @@ void bsp_pretasking_hook(void); /* m68k version */
*/
void bsp_start( void )
{
extern void *_WorkspaceBase;
extern m68k_isr_entry M68Kvec[];
void M68KFPSPInstallExceptionHandlers (void);
extern void *_WorkspaceBase;
extern m68k_isr_entry M68Kvec[];
extern void *_RamSize;
extern unsigned long _M68k_Ramsize;
m68k_isr_entry *rom_monitor_vector_table;
int index;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
/*
* 167Bug Vectors are at 0xFFE00000
*/

View File

@@ -34,6 +34,9 @@ rtems_interrupt_level bsp_isr_level;
char *rtems_progname;
/* Amount of RAM on this board */
unsigned long _M68k_Ramsize;
/*
* Use the shared implementations of the following routines
*/
@@ -51,7 +54,11 @@ void bsp_pretasking_hook(void); /* m68k version */
void bsp_start( void )
{
extern void *_WorkspaceBase;
extern void *_RamSize;
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
#if 0
Cpu_table.interrupt_vector_table = (mc68000_isr *) 0/*&M68Kvec*/;
#endif

View File

@@ -34,7 +34,7 @@
extern void bsp_libc_init( void *, unsigned long, int );
extern rtems_configuration_table BSP_Configuration;
extern unsigned long _RamSize;
extern unsigned long _M68k_Ramsize;
extern void *_RamBase;
extern void *_WorkspaceBase;
extern void *_HeapSize;
@@ -47,7 +47,7 @@ void bsp_pretasking_hook(void)
heapStart = (void *)
((unsigned long)&_WorkspaceBase + BSP_Configuration.work_space_size);
ramSpace = (unsigned long) &_RamBase + (unsigned long) &_RamSize - (unsigned long) heapStart;
ramSpace = (unsigned long) &_RamBase + _M68k_Ramsize - (unsigned long) heapStart;
if (heapSize == 0)
heapSize = ramSpace;