From 75da9c46f287d0e9675c53020dc4ede8c4bd7a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Sun, 4 Aug 2013 18:40:36 +0000 Subject: [PATCH] added comment set fastram end before start of RAM BaS --- sources/BaS.c | 3 +++ sources/mmu.S | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/sources/BaS.c b/sources/BaS.c index 3477b65..ebfda4c 100644 --- a/sources/BaS.c +++ b/sources/BaS.c @@ -215,8 +215,10 @@ void BaS(void) vec_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("IDE reset: "); /* IDE reset */ @@ -276,6 +278,7 @@ void BaS(void) /* TT-RAM */ * (uint32_t *) 0x5a4 = FASTRAM_END; /* ramtop TOS system variable */ + * (uint32_t *) 0x5a4 = 0x1d000000; * (uint32_t *) 0x5a8 = 0x1357bd13; /* ramvalid TOS system variable */ xprintf("init ACIA: "); diff --git a/sources/mmu.S b/sources/mmu.S index 1a8f8a0..5d7c6f8 100644 --- a/sources/mmu.S +++ b/sources/mmu.S @@ -186,7 +186,13 @@ _mmu_init: * MMU table add on miss */ _mmutr_miss: + bsr cpusha // clear caches + + pea MISS_text + move.l d0,-(sp) + bsr _xprintf + and.l #0xFFF00000,d0 // d0 is the address not found (MMUAR at the time of the exception) or.l #std_mmutr,d0 // mark shared and valid move.l d0,MCF_MMU_MMUTR // add to TLB @@ -197,5 +203,10 @@ _mmutr_miss: move.l d0,MCF_MMU_MMUOR // set moveq.l #mmuord_i,d0 // MMU update instruction move.l d0,MCF_MMU_MMUOR // set + move.l (sp)+,d0 // restore register saved in acess rte + .data +MISS_text: + .asciz "MMU TLB MISS at %p" + .byte 13, 10, 0