summaryrefslogtreecommitdiffstats
path: root/c/src/lib
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-16 22:15:59 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-16 22:15:59 +0000
commit53cb8234bb7fbdd53f59ff3f2853b6803f6bec41 (patch)
tree386526fc8f8490d1dba80cff8524ba2589d6ce63 /c/src/lib
parent2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-53cb8234bb7fbdd53f59ff3f2853b6803f6bec41.tar.bz2
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, include/bsp.h, startup/init68360.c, startup/linkcmds, startup/linkcmds.bootp, startup/linkcmds.prom: Use top level shared bsp_get_work_area() implementation.
Diffstat (limited to 'c/src/lib')
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/ChangeLog6
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/Makefile.am2
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/include/bsp.h13
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/init68360.c32
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/linkcmds10
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp10
-rw-r--r--c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom10
7 files changed, 41 insertions, 42 deletions
diff --git a/c/src/lib/libbsp/m68k/gen68360/ChangeLog b/c/src/lib/libbsp/m68k/gen68360/ChangeLog
index 72e8b85529..2e498e59b2 100644
--- a/c/src/lib/libbsp/m68k/gen68360/ChangeLog
+++ b/c/src/lib/libbsp/m68k/gen68360/ChangeLog
@@ -1,5 +1,11 @@
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * Makefile.am, include/bsp.h, startup/init68360.c, startup/linkcmds,
+ startup/linkcmds.bootp, startup/linkcmds.prom: Use top level shared
+ bsp_get_work_area() implementation.
+
+2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* Makefile.am, configure.ac, start/start.S: Add use of
bsp_get_work_area() in its own file and rely on BSP Framework to
perform more initialization. Remove unnecessary includes of
diff --git a/c/src/lib/libbsp/m68k/gen68360/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/Makefile.am
index e43138b23b..231d74df9d 100644
--- a/c/src/lib/libbsp/m68k/gen68360/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/Makefile.am
@@ -28,7 +28,7 @@ dist_project_lib_DATA += startup/linkcmds startup/linkcmds.prom \
startup_SOURCES = startup/alloc360.c ../../shared/bspclean.c \
../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
../../shared/bsplibc.c ../../shared/bsppost.c \
- ../../m68k/shared/m68kbspgetworkarea.c ../../shared/bspstart.c \
+ ../../shared/bspgetworkarea.c ../../shared/bspstart.c \
startup/init68360.c ../../shared/bootcard.c \
../../shared/sbrk.c ../../m68k/shared/setvec.c \
../../shared/gnatinstallhandler.c
diff --git a/c/src/lib/libbsp/m68k/gen68360/include/bsp.h b/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
index f108a5ddb3..78fa04328b 100644
--- a/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/gen68360/include/bsp.h
@@ -97,13 +97,6 @@ m68k_isr_entry set_vector(
);
/*
- * Values assigned by link editor
- */
-extern char _RamBase[];
-extern char _HeapSize[];
-
-
-/*
* Definitions for Atlas Computer Equipment Inc. High Speed Bridge (HSB)
*/
#define ATLASHSB_ESR 0x20010000L
@@ -113,9 +106,9 @@ extern char _HeapSize[];
#define ATLASHSB_ROM_U6 0xFF080000L /* U6 flash ROM socket */
- /*
- * definitions for PGH360 board
- */
+/*
+ * definitions for PGH360 board
+ */
#if defined(PGH360)
/*
* logical SPI addresses of SPI slaves available
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c b/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c
index f1f0f26dce..62ddca34a8 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/init68360.c
@@ -45,7 +45,7 @@ void _Init68360 (void)
m68k_isr_entry *vbr;
unsigned long ramSize;
extern void _CopyDataClearBSSAndStart (unsigned long ramSize);
- extern char _RamBase[];
+ extern void *RamBase;
extern void *_RomBase; /* From linkcmds */
#if (defined (__mc68040__))
@@ -146,13 +146,13 @@ void _Init68360 (void)
m360.memc[1].or = M360_MEMC_OR_TCYC(0) |
M360_MEMC_OR_1MB |
M360_MEMC_OR_DRAM;
- m360.memc[1].br = (unsigned long)&_RamBase |
+ m360.memc[1].br = (unsigned long)&RamBase |
M360_MEMC_BR_BACK40 |
M360_MEMC_BR_V;
for (i = 0; i < 50000; i++)
continue;
for (i = 0; i < 8; ++i)
- *((volatile unsigned long *)(unsigned long)&_RamBase);
+ *((volatile unsigned long *)(unsigned long)&RamBase);
/*
* Step 13: Copy the exception vector table to system RAM
@@ -284,12 +284,12 @@ void _Init68360 (void)
/* first bank 1MByte DRAM */
m360.memc[1].or = M360_MEMC_OR_TCYC(2) | M360_MEMC_OR_1MB |
M360_MEMC_OR_PGME | M360_MEMC_OR_DRAM;
- m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_V;
+ m360.memc[1].br = (unsigned long)&RamBase | M360_MEMC_BR_V;
/* second bank 1MByte DRAM */
m360.memc[2].or = M360_MEMC_OR_TCYC(2) | M360_MEMC_OR_1MB |
M360_MEMC_OR_PGME | M360_MEMC_OR_DRAM;
- m360.memc[2].br = ((unsigned long)&_RamBase + 0x100000) |
+ m360.memc[2].br = ((unsigned long)&RamBase + 0x100000) |
M360_MEMC_BR_V;
/* flash rom socket U6 on CS5 */
@@ -305,7 +305,7 @@ void _Init68360 (void)
for (i = 0; i < 50000; i++)
continue;
for (i = 0; i < 8; ++i)
- *((volatile unsigned long *)(unsigned long)&_RamBase);
+ *((volatile unsigned long *)(unsigned long)&RamBase);
/*
* Step 13: Copy the exception vector table to system RAM
@@ -445,7 +445,7 @@ void _Init68360 (void)
m360.memc[7].or = M360_MEMC_OR_TCYC(1) | M360_MEMC_OR_16MB |
M360_MEMC_OR_FCMC(0) | /* M360_MEMC_OR_PGME | */
M360_MEMC_OR_32BIT | M360_MEMC_OR_DRAM;
- m360.memc[7].br = (unsigned long)&_RamBase | M360_MEMC_BR_V;
+ m360.memc[7].br = (unsigned long)&RamBase | M360_MEMC_BR_V;
/*
* FIXME: here we should wait for 8 refresh cycles...
@@ -594,10 +594,10 @@ void _Init68360 (void)
* 0 wait states
*/
ramSize = 4 * 1024 * 1024;
- m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_V;
+ 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].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;
/*
@@ -744,7 +744,7 @@ void _Init68360 (void)
m360.memc[1].or = M360_MEMC_OR_TCYC(0) |
M360_MEMC_OR_16MB |
M360_MEMC_OR_DRAM;
- m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_V;
+ m360.memc[1].br = (unsigned long)&RamBase | M360_MEMC_BR_V;
/*
* Wait for chips to power up
@@ -753,7 +753,7 @@ void _Init68360 (void)
for (i = 0; i < 50000; i++)
continue;
for (i = 0; i < 8; ++i)
- *((volatile unsigned long *)(unsigned long)&_RamBase);
+ *((volatile unsigned long *)(unsigned long)&RamBase);
/*
* Determine memory size (1, 4, or 16 Mbytes)
@@ -763,14 +763,14 @@ void _Init68360 (void)
* A 1 Mbyte or 4 Mbyte DRAM will show up several times in
* the memory map, but will work with the same bootstrap PROM.
*/
- *(volatile char *)&_RamBase = 0;
- *((volatile char *)&_RamBase+0x00C01800) = 1;
- if (*(volatile char *)&_RamBase) {
+ *(volatile char *)&RamBase = 0;
+ *((volatile char *)&RamBase+0x00C01800) = 1;
+ if (*(volatile char *)&RamBase) {
m360.gmr = (m360.gmr & ~0x001C0000) | M360_GMR_PGS(1);
}
else {
- *((volatile char *)&_RamBase+0x00801000) = 1;
- if (*(volatile char *)&_RamBase) {
+ *((volatile char *)&RamBase+0x00801000) = 1;
+ if (*(volatile char *)&RamBase) {
m360.gmr = (m360.gmr & ~0x001C0000) | M360_GMR_PGS(3);
}
}
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds
index 7d481d45dc..4dd7d2178a 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds
@@ -15,9 +15,9 @@
* 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;
+RamBase = DEFINED(RamBase) ? RamBase : 0x0;
+RamSize = DEFINED(RamSize) ? RamSize : 64M;
+HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
/*
@@ -44,7 +44,7 @@ SECTIONS {
* Dynamic RAM
*/
ram : {
- _RamBase = .;
+ RamBase = .;
} >ram
/*
@@ -133,7 +133,7 @@ SECTIONS {
_stack_init = .;
_clear_end = .;
- _WorkspaceBase = .;
+ WorkAreaBase = .;
} >ram
/*
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp
index eb9f7fcad3..61f19bc6ff 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp
@@ -19,9 +19,9 @@
* 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;
+RamBase = DEFINED(RamBase) ? RamBase : 0x0;
+RamSize = DEFINED(RamSize) ? RamSize : 64M;
+HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
/*
@@ -49,7 +49,7 @@ SECTIONS {
* Dynamic RAM
*/
ram : {
- _RamBase = .;
+ RamBase = .;
} >ram
/*
@@ -138,7 +138,7 @@ SECTIONS {
_stack_init = .;
_clear_end = .;
- _WorkspaceBase = .;
+ WorkAreaBase = .;
} >myram
/*
diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom
index db0a5fe94a..ada1411e9e 100644
--- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom
+++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom
@@ -19,9 +19,9 @@
* 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;
+RamBase = DEFINED(RamBase) ? RamBase : 0x0;
+RamSize = DEFINED(RamSize) ? RamSize : 64M;
+HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
/*
@@ -48,7 +48,7 @@ SECTIONS {
* Dynamic RAM
*/
ram : {
- _RamBase = .;
+ RamBase = .;
} >ram
/*
@@ -136,7 +136,7 @@ SECTIONS {
_stack_init = .;
_clear_end = .;
- _WorkspaceBase = .;
+ WorkAreaBase = .;
} >ram
/*