added missing NOP() when accessing MMU register to let the processor pipeline sync (according to Coldfire manual).

This commit is contained in:
Markus Fröschle
2013-07-23 05:04:02 +00:00
parent 245572438e
commit 59286d9c99

View File

@@ -53,6 +53,8 @@ extern uint8_t _EMUTOS[];
extern uint8_t _EMUTOS_SIZE[];
#define EMUTOS_SIZE ((uint32_t)_EMUTOS_SIZE) /* size of EmuTOS, in bytes */
#define NOP() __asm__ __volatile__("nop\n\t" : : : "memory") /* need this to force pipeline sync after MMUCR write */
/*
* check if it is possible to transfer data to PIC
*/
@@ -206,6 +208,7 @@ void BaS(void)
xprintf("finished\r\n");
MCF_MMU_MMUCR = MCF_MMU_MMUCR_EN; /* MMU on */
NOP(); /* force pipeline sync */
xprintf("IDE reset: ");
/* IDE reset */
@@ -267,8 +270,6 @@ void BaS(void)
* (uint32_t *) 0x5a4 = FASTRAM_END; /* ramtop TOS system variable */
* (uint32_t *) 0x5a8 = 0x1357bd13; /* ramvalid TOS system variable */
#define NOP() __asm__ __volatile__("nop\n\t" : : : "memory")
xprintf("init ACIA: ");
/* init ACIA */
* (uint8_t *) 0xfffffc00 = 3;