diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2006-09-18 15:30:53 +0400 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2006-09-18 15:30:53 +0400 |
commit | 34784e1c43736a2e46eb64ec3fd698d61ad487b4 (patch) | |
tree | 48322c3e6efaf827e3ed0a38172735cf24044490 /libgloss | |
parent | cf7c22b5d8b97b12e0b2322ad979fbdf7e7425a7 (diff) |
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.
Diffstat (limited to 'libgloss')
-rw-r--r-- | libgloss/m68k/Makefile.in | 4 | ||||
-rw-r--r-- | libgloss/m68k/bdm-crt1.c | 18 |
2 files changed, 16 insertions, 6 deletions
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? */ +} |