summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2006-09-18 11:30:53 +0000
committerNathan Sidwell <nathan@codesourcery.com>2006-09-18 11:30:53 +0000
commit34784e1c43736a2e46eb64ec3fd698d61ad487b4 (patch)
tree48322c3e6efaf827e3ed0a38172735cf24044490
parentcf7c22b5d8b97b12e0b2322ad979fbdf7e7425a7 (diff)
downloadcygnal-34784e1c43736a2e46eb64ec3fd698d61ad487b4.tar.gz
cygnal-34784e1c43736a2e46eb64ec3fd698d61ad487b4.tar.bz2
cygnal-34784e1c43736a2e46eb64ec3fd698d61ad487b4.zip
libgloss/
* m68k/Makefile.in: Don't force a frame pointer on the ISRs. * m68k/bdm-crt1.c (__start1): Don't set the VBR here. (hardeare_init_hook): Define weakly. Set VBR here, enable caching if supported.
-rw-r--r--ChangeLog.csl6
-rw-r--r--libgloss/m68k/Makefile.in4
-rw-r--r--libgloss/m68k/bdm-crt1.c18
3 files changed, 22 insertions, 6 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index f8072bfb7..da32283d2 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,6 +1,12 @@
2006-09-18 Nathan Sidwell <nathan@codesourcery.com>
libgloss/
+ * m68k/Makefile.in: Don't force a frame pointer on the ISRs.
+ * m68k/bdm-crt1.c (__start1): Don't set the VBR here.
+ (hardeare_init_hook): Define weakly. Set VBR here, enable caching
+ if supported.
+
+ libgloss/
* m68k/Makefile.in (bdm-semihost.o): Build from bdm-semihost.S.
* m68k/bdm-semihost.c: Remove.
* m68k/bdm-semihost.S: New.
diff --git a/libgloss/m68k/Makefile.in b/libgloss/m68k/Makefile.in
index 150a8c31e..3b66c6c64 100644
--- a/libgloss/m68k/Makefile.in
+++ b/libgloss/m68k/Makefile.in
@@ -196,11 +196,9 @@ bdm-crt1.o : bdm-crt1.c
bdm-semihost.o : bdm-semihost.S
$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $< -o $@
-# We need to keep the frame pointer to make sure there's some
-# prologue. Otherwise we get confused with the semihosting reoutine.
$(patsubst %,bdm-%.o,${BDM_ISRS}) : bdm-isrs.c
$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $< -o $@ \
- -DL_$(patsubst bdm-%.o,%,$@) -fno-omit-frame-pointer
+ -DL_$(patsubst bdm-%.o,%,$@)
# RAM ROM
m5208evb := 1024M 16M 0M 2M
diff --git a/libgloss/m68k/bdm-crt1.c b/libgloss/m68k/bdm-crt1.c
index 159e86a79..80d54364c 100644
--- a/libgloss/m68k/bdm-crt1.c
+++ b/libgloss/m68k/bdm-crt1.c
@@ -39,9 +39,6 @@ void __start1 (void)
if (hardware_init_hook)
hardware_init_hook ();
- /* Set the VBR. */
- __asm__ __volatile__ ("movec.l %0,%/vbr" :: "r" (__interrupt_vector));
-
/* Initialize memory */
if (__data_load != __data_start)
memcpy (__data_start, __data_load, __bss_start - __data_start);
@@ -62,3 +59,18 @@ void __start1 (void)
while (1)
__reset ();
}
+
+/* A default hardware init hook. */
+
+void __attribute__ ((weak)) hardware_init_hook (void)
+{
+ /* Set the VBR. */
+ __asm__ __volatile__ ("movec.l %0,%/vbr" :: "r" (__interrupt_vector));
+
+#ifndef __mcf_family_5213
+ /* Flush & enable the caches */
+ __asm__ __volatile__ ("movec.l %0,%/cacr" :: "r" ((1l << 31) | (1<<24)));
+#endif
+
+ /* Should we drop into user mode here? */
+}