From: John Hodge Date: Fri, 28 Oct 2011 02:08:07 +0000 (+0800) Subject: Kernel/armv7 - Cleaning up debug X-Git-Tag: rel0.14~180 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=05c5d7098a054591d75113ecc3503979cc5754c9;p=tpg%2Facess2.git Kernel/armv7 - Cleaning up debug - Also removed the AcessNative build number from the tree, local only --- diff --git a/AcessNative/acesskernel_src/Makefile.BuildNum b/AcessNative/acesskernel_src/Makefile.BuildNum deleted file mode 100644 index 6e0adbc1..00000000 --- a/AcessNative/acesskernel_src/Makefile.BuildNum +++ /dev/null @@ -1 +0,0 @@ -BUILD_NUM = 33 diff --git a/Kernel/arch/armv7/mm_virt.c b/Kernel/arch/armv7/mm_virt.c index 514a3141..64b5d570 100644 --- a/Kernel/arch/armv7/mm_virt.c +++ b/Kernel/arch/armv7/mm_virt.c @@ -739,7 +739,7 @@ tVAddr MM_MapTemp(tPAddr PAddr) if( MM_int_GetPageInfo(ret, &pi) == 0 ) continue; - Log("MapTemp %P at %p by %p", PAddr, ret, __builtin_return_address(0)); +// Log("MapTemp %P at %p by %p", PAddr, ret, __builtin_return_address(0)); MM_RefPhys(PAddr); // Counter the MM_Deallocate in FreeTemp MM_Map(ret, PAddr); @@ -956,7 +956,7 @@ void MM_DumpTables(tVAddr Start, tVAddr End) Debug("Done"); } -// NOTE: Runs in abort context, not much differe, just a smaller stack +// NOTE: Runs in abort context, not much difference, just a smaller stack void MM_PageFault(Uint32 PC, Uint32 Addr, Uint32 DFSR, int bPrefetch) { int rv; @@ -977,8 +977,10 @@ void MM_PageFault(Uint32 PC, Uint32 Addr, Uint32 DFSR, int bPrefetch) for(;;); } + #if TRACE_COW Log_Notice("MMVirt", "COW %p caused by %p, ZERO duped to %P (RefCnt(%i)--)", Addr, PC, newpage, MM_GetRefCount(pi.PhysAddr)); + #endif MM_DerefPhys(pi.PhysAddr); pi.PhysAddr = newpage; @@ -1005,16 +1007,20 @@ void MM_PageFault(Uint32 PC, Uint32 Addr, Uint32 DFSR, int bPrefetch) memcpy( dst, src, PAGE_SIZE ); MM_FreeTemp( (tVAddr)dst ); + #if TRACE_COW Log_Notice("MMVirt", "COW %p caused by %p, %P duped to %P (RefCnt(%i)--)", Addr, PC, pi.PhysAddr, newpage, MM_GetRefCount(pi.PhysAddr)); + #endif MM_DerefPhys(pi.PhysAddr); pi.PhysAddr = newpage; } + #if TRACE_COW else { Log_Notice("MMVirt", "COW %p caused by %p, took last reference to %P", Addr, PC, pi.PhysAddr); } + #endif // Unset COW pi.AP = AP_RW_BOTH; MM_int_SetPageInfo(Addr, &pi);