From: John Hodge Date: Fri, 28 Oct 2011 01:43:12 +0000 (+0800) Subject: Kernel/armv7 - Fixed not zeroing course table (and some cleanup) X-Git-Tag: rel0.14~185 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=9a06226e84fbcf3af0ab8415188fbc7955db58c9;p=tpg%2Facess2.git Kernel/armv7 - Fixed not zeroing course table (and some cleanup) --- diff --git a/Kernel/arch/armv7/mm_virt.c b/Kernel/arch/armv7/mm_virt.c index 0c2f0438..514a3141 100644 --- a/Kernel/arch/armv7/mm_virt.c +++ b/Kernel/arch/armv7/mm_virt.c @@ -126,7 +126,9 @@ int MM_int_AllocateCoarse(tVAddr VAddr, int Domain) } // TLBIALL - TLBIALL(); + TLBIALL(); + + memset( (void*)&table1[ (VAddr >> 12) & ~(1024-1) ], 0, 0x1000 ); LEAVE('i', 0); return 0; @@ -922,7 +924,7 @@ void MM_DumpTables(tVAddr Start, tVAddr End) pi_old.Size = 0; - Debug("Page Table Dump:"); + Debug("Page Table Dump (%p to %p):", Start, End); range_start = Start; for( addr = Start; i == 0 || (addr && addr < End); i = 1 ) { @@ -1023,6 +1025,10 @@ void MM_PageFault(Uint32 PC, Uint32 Addr, Uint32 DFSR, int bPrefetch) Log_Error("MMVirt", "Code at %p accessed %p (DFSR = 0x%x)%s", PC, Addr, DFSR, (bPrefetch ? " - Prefetch" : "") ); + if( Addr < 0x80000000 ) + MM_DumpTables(0, 0x80000000); + else + MM_DumpTables(0x80000000, -1); for(;;); }