summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/erc32/startup
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/sparc/erc32/startup')
-rw-r--r--c/src/lib/libbsp/sparc/erc32/startup/bspclean.c3
-rw-r--r--c/src/lib/libbsp/sparc/erc32/startup/linkcmds34
-rw-r--r--c/src/lib/libbsp/sparc/erc32/startup/spurious.c7
3 files changed, 28 insertions, 16 deletions
diff --git a/c/src/lib/libbsp/sparc/erc32/startup/bspclean.c b/c/src/lib/libbsp/sparc/erc32/startup/bspclean.c
index be9a577fc2..a62b1c6be2 100644
--- a/c/src/lib/libbsp/sparc/erc32/startup/bspclean.c
+++ b/c/src/lib/libbsp/sparc/erc32/startup/bspclean.c
@@ -30,8 +30,9 @@ void bsp_cleanup( void )
{
/*
* "halt" by trapping to the simulator command line.
+ * set %g1 to 1 to detect clean exit.
*/
- asm volatile( "ta 0" );
+ asm volatile( "mov 1, %g1; ta 0" );
}
diff --git a/c/src/lib/libbsp/sparc/erc32/startup/linkcmds b/c/src/lib/libbsp/sparc/erc32/startup/linkcmds
index e1d021e8cf..facb735fa9 100644
--- a/c/src/lib/libbsp/sparc/erc32/startup/linkcmds
+++ b/c/src/lib/libbsp/sparc/erc32/startup/linkcmds
@@ -36,39 +36,49 @@ __DYNAMIC = 0;
*
* _CLOCK_SPEED in Mhz (used to program the counter/timers)
*
- * _PROM_SIZE size of PROM (permissible values are 4K, 8K, 16K
- * 32K, 64K, 128K, 256K, and 512K)
+ * _PROM_SIZE size of PROM (permissible values are 128K, 256K,
+ * 512K, 1M, 2M, 4M, 8M and 16M)
* _RAM_SIZE size of RAM (permissible values are 256K, 512K,
- * 1MB, 2Mb, 4Mb, 8Mb, 16Mb, and 32Mb)
+ * 1M, 2M, 4M, 8M, 16M, and 32M)
*
- * MAKE SURE THESE MATCH THE MEMORY DESCRIPTION SECTION!!!
*/
-/*
-_CLOCK_SPEED = 10;
-*/
+/* Default values, can be overridden */
-_PROM_SIZE = 512K;
-_RAM_SIZE = 2M;
+_PROM_SIZE = 2M;
+_RAM_SIZE = 4M;
_RAM_START = 0x02000000;
_RAM_END = _RAM_START + _RAM_SIZE;
-RAM_END = _RAM_END;
_PROM_START = 0x00000000;
_PROM_END = _PROM_START + _PROM_SIZE;
/*
+ * Alternate names without leading _.
+ */
+
+PROM_START = _PROM_START;
+PROM_SIZE = _PROM_SIZE;
+PROM_END = _PROM_END;
+
+RAM_START = _RAM_START;
+RAM_SIZE = _RAM_SIZE;
+RAM_END = _RAM_END;
+
+/*
* Base address of the on-CPU peripherals
*/
_ERC32_MEC = 0x01f80000;
ERC32_MEC = 0x01f80000;
+/* these are the maximum values */
+
MEMORY
{
- rom : ORIGIN = 0x00000000, LENGTH = 512K
- ram : ORIGIN = 0x02000000, LENGTH = 2M
+ rom : ORIGIN = 0x00000000, LENGTH = 16
+ ram : ORIGIN = 0x02000000, LENGTH = 32M
}
/*
diff --git a/c/src/lib/libbsp/sparc/erc32/startup/spurious.c b/c/src/lib/libbsp/sparc/erc32/startup/spurious.c
index 30b0a0120a..c22a5373e2 100644
--- a/c/src/lib/libbsp/sparc/erc32/startup/spurious.c
+++ b/c/src/lib/libbsp/sparc/erc32/startup/spurious.c
@@ -148,7 +148,7 @@ rtems_isr bsp_spurious_handler(
* What else can we do but stop ...
*/
- asm volatile( "ta 0x0" );
+ asm volatile( "mov 1, %g1; ta 0x0" );
}
/*
@@ -177,8 +177,9 @@ void bsp_spurious_initialize()
* paramaters to the program.
*/
- if (( trap == 5 || trap == 6 || trap == 0x83 ) ||
- (( trap >= 0x70 ) && ( trap <= 0x80 )))
+ if (( trap == 5 || trap == 6 ) ||
+ (( trap >= 0x11 ) && ( trap <= 0x1f )) ||
+ (( trap >= 0x70 ) && ( trap <= 0x83 )))
continue;
set_vector( bsp_spurious_handler, SPARC_SYNCHRONOUS_TRAP( trap ), 1 );