From 0982b91c879a448b896d4f111e629bbb2ffaf43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20G=C3=A1lvez?= Date: Fri, 14 Dec 2018 11:28:18 +0100 Subject: [PATCH] Fix FireTOS booting For some reason which I coudn't figure it out FireTOS fails to boot randomly when we turn on the MMU before the IDE ports are initialized (FireTOS doesn't detect the IDE devices). This is fixed when we turn on the MMU after the IDE initialization. CodeWarrior BaS does it this way too. --- sys/BaS.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/BaS.c b/sys/BaS.c index 1626b9e..076ac4c 100644 --- a/sys/BaS.c +++ b/sys/BaS.c @@ -452,11 +452,6 @@ void BaS(void) flush_and_invalidate_caches(); xprintf("finished\r\n"); - xprintf("enable MMU: "); - MCF_MMU_MMUCR = MCF_MMU_MMUCR_EN; /* MMU on */ - NOP(); /* force pipeline sync */ - xprintf("finished\r\n"); - xprintf("initialize exception vector table: "); vec_init(); xprintf("finished\r\n"); @@ -469,6 +464,11 @@ void BaS(void) ide_init(); xprintf("finished\r\n"); + xprintf("enable MMU: "); + MCF_MMU_MMUCR = MCF_MMU_MMUCR_EN; /* MMU on */ + NOP(); /* force pipeline sync */ + xprintf("finished\r\n"); + xprintf("enable video: "); /*