moved cache flush (immediately before MMU enable)

This commit is contained in:
Markus Fröschle
2013-08-07 10:13:31 +00:00
parent 042b99b00e
commit 74f3fdb197

View File

@@ -231,9 +231,6 @@ void BaS(void)
memcpy(dst, src, EMUTOS_SIZE);
xprintf("finished\r\n");
/* we have copied a code area, so flush the caches */
flush_and_invalidate_caches();
xprintf("initialize MMU: ");
mmu_init();
xprintf("finished\r\n");
@@ -242,11 +239,10 @@ void BaS(void)
vec_init();
xprintf("finished\r\n");
xprintf("enable MMU: ");
xprintf("flush caches and enable MMU: ");
flush_and_invalidate_caches();
MCF_MMU_MMUCR = MCF_MMU_MMUCR_EN; /* MMU on */
NOP(); /* force pipeline sync */
flush_and_invalidate_caches();
xprintf("finished\r\n");
xprintf("IDE reset: ");
@@ -280,7 +276,7 @@ void BaS(void)
xprintf("finished\r\n");
//sd_card_init();
sd_card_init();
/*
* memory setup
@@ -319,7 +315,7 @@ void BaS(void)
__asm__ __volatile__("move.w #0x0700,sr \n\t" : : : "memory");
}
//srec_execute("BASFLASH.S19");
srec_execute("BASFLASH.S19");
/* Jump into the OS */
typedef void void_func(void);