From df49c60c9671e4a28e636964d744c1f59fb6cb68 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 12 Jun 2000 15:00:15 +0000 Subject: Merged from 4.5.0-beta3a --- c/src/lib/libbsp/m68k/gen68360/startup/Makefile.am | 5 +++-- c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c | 17 ++++++++--------- c/src/lib/libbsp/m68k/gen68360/startup/init68360.c | 13 ++++++------- c/src/lib/libbsp/m68k/gen68360/startup/linkcmds | 2 ++ c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp | 2 ++ c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom | 2 ++ 6 files changed, 23 insertions(+), 18 deletions(-) (limited to 'c/src/lib/libbsp/m68k/gen68360/startup') diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.am index c10a8eb294..a62478be87 100644 --- a/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.am +++ b/c/src/lib/libbsp/m68k/gen68360/startup/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -22,6 +22,7 @@ include $(top_srcdir)/../../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # +# USE_INIT_FINI tells main.c what C++ help we need. AM_CPPFLAGS += -DUSE_INIT_FINI $(PGM): $(OBJS) diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c index 9279cf6cd1..e129f2279e 100644 --- a/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c @@ -28,8 +28,6 @@ extern rtems_configuration_table Configuration; rtems_configuration_table BSP_Configuration; -unsigned long _RamSize; - rtems_cpu_table Cpu_table; char *rtems_progname; @@ -51,6 +49,13 @@ void bsp_pretasking_hook(void); /* m68k version */ void bsp_start( void ) { extern void *_WorkspaceBase; + + /* + * _M68k_Ramsize is the amount of RAM on this board and + * is set by many m68k BSPs at this point. With this + * BSP, it is dynamically set in start.S. + */ + /* * Allocate the memory for the RTEMS Work Space. This can come from @@ -68,12 +73,6 @@ void bsp_start( void ) BSP_Configuration.work_space_start = (void *)&_WorkspaceBase; - /* - * Account for the console's resources - */ - - console_reserve_resources( &BSP_Configuration ); - /* * initialize the CPU table for this BSP */ @@ -81,5 +80,5 @@ void bsp_start( void ) Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ Cpu_table.postdriver_hook = bsp_postdriver_hook; Cpu_table.do_zero_of_workspace = TRUE; - Cpu_table.interrupt_stack_size = 4096; + Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; } diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c b/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c index 8a68524766..522a8fdd5d 100644 --- a/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c +++ b/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c @@ -347,6 +347,7 @@ void _Init68360 (void) * But uses SRAM instead of DRAM * * CS0* - 512kx8 flash memory * * CS1* - 512kx32 static RAM * + * CS2* - 512kx32 static RAM * *************************************************** */ @@ -418,12 +419,16 @@ void _Init68360 (void) /* * Step 12: Set up main memory * 512Kx32 SRAM on CS1* + * 512Kx32 SRAM on CS2* * 0 wait states */ - ramSize = 1 * 1024 * 1024; + ramSize = 4 * 1024 * 1024; m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_V; m360.memc[1].or = M360_MEMC_OR_WAITS(0) | M360_MEMC_OR_2MB | M360_MEMC_OR_32BIT; + m360.memc[2].br = ((unsigned long)&_RamBase + 0x200000) | M360_MEMC_BR_V; + m360.memc[2].or = M360_MEMC_OR_WAITS(0) | M360_MEMC_OR_2MB | + M360_MEMC_OR_32BIT; /* * Step 13: Copy the exception vector table to system RAM */ @@ -463,12 +468,6 @@ void _Init68360 (void) * SIM60 interrupt sources higher priority than CPM */ m360.mcr = 0x4C7F; - * No show cycles - * User/supervisor access - * Bus clear interrupt service level 7 - * SIM60 interrupt sources higher priority than CPM - */ - m360.mcr = 0x4C7F; #else /* diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds index 39f4c8dbd3..fcc3b0b694 100644 --- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds +++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds @@ -15,6 +15,8 @@ * Declare some sizes. * A heap size of 0 means `use all available memory for the heap'. */ +_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0; +_RamSize = DEFINED(_RamSize) ? _RamSize : 64M; _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0; _StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp index 74e339717b..455d5710da 100644 --- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp +++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp @@ -19,6 +19,8 @@ * Declare some sizes. * A heap size of 0 means `use all available memory for the heap'. */ +_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0; +_RamSize = DEFINED(_RamSize) ? _RamSize : 64M; _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0; _StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom index 39ab48d096..dae2d98f47 100644 --- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom +++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom @@ -19,6 +19,8 @@ * Declare some sizes. * A heap size of 0 means `use all available memory for the heap'. */ +_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0; +_RamSize = DEFINED(_RamSize) ? _RamSize : 64M; _HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0; _StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; -- cgit v1.2.3