X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Fx86%2Fmm_phys.c;h=4c5cf20ef2b96aeb2ff47638976a0e4912fa8613;hb=9d3800f60f2212432e550a4e003ae65b498a4d36;hp=648449e9c468f594b56ba801835d854bcb589b48;hpb=b7cb1e892d25645359de4c4e5f6a598137dfdfd0;p=tpg%2Facess2.git diff --git a/Kernel/arch/x86/mm_phys.c b/Kernel/arch/x86/mm_phys.c index 648449e9..4c5cf20e 100644 --- a/Kernel/arch/x86/mm_phys.c +++ b/Kernel/arch/x86/mm_phys.c @@ -2,6 +2,7 @@ AcessOS Microkernel Version mm_phys.c */ +#define DEBUG 1 #include #include #include @@ -32,7 +33,7 @@ void MM_Install(tMBoot_Info *MBoot) // Initialise globals giPageCount = (MBoot->HighMem >> 2) + 256; // HighMem is a kByte value - Log("giPageCount = %i", giPageCount); + LOG("giPageCount = %i", giPageCount); // Get used page count kernelPages = (Uint)&gKernelEnd - KERNEL_BASE; @@ -65,7 +66,7 @@ void MM_Install(tMBoot_Info *MBoot) } // Allocate References - Log("Reference Pages %i", (giPageCount*4+0xFFF)>>12); + LOG("Reference Pages %i", (giPageCount*4+0xFFF)>>12); for(num = 0; num < (giPageCount*4+0xFFF)>>12; num++) { MM_Allocate( REFERENCE_BASE + (num<<12) ); @@ -116,7 +117,7 @@ tPAddr MM_AllocPhys() // Release Spinlock RELEASE( &giPhysAlloc ); - LOG("Allocated 0x%x\n", ret); + //LOG("Allocated 0x%x\n", ret); //LOG("ret = %x", ret); return ret; } @@ -175,7 +176,7 @@ void MM_DerefPhys(tPAddr Addr) // Mark as free in bitmaps if( gaPageReferences[ Addr ] == 0 ) { - LOG("Freed 0x%x\n", Addr); + //LOG("Freed 0x%x by %p\n", Addr<<12, __builtin_return_address(0)); gaPageBitmap[ Addr / 32 ] &= ~(1 << (Addr&31)); if(gaPageReferences[ Addr ] == 0) gaSuperBitmap[ Addr >> 10 ] &= ~(1 << ((Addr >> 5)&31));