Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / KernelLand / Kernel / arch / x86 / mm_virt.c
index c17b57b..51a3f62 100644 (file)
@@ -441,7 +441,8 @@ int MM_Map(tVAddr VAddr, tPAddr PAddr)
        //ENTER("xVAddr xPAddr", VAddr, PAddr);
        // Sanity check
        if( PAddr & 0xFFF || VAddr & 0xFFF ) {
-               Log_Warning("MM_Virt", "MM_Map - Physical or Virtual Addresses are not aligned");
+               Log_Warning("MM_Virt", "MM_Map - Physical or Virtual Addresses are not aligned (0x%P and %p)",
+                       PAddr, VAddr);
                //LEAVE('i', 0);
                return 0;
        }
@@ -1074,6 +1075,9 @@ tVAddr MM_AllocDMA(int Pages, int MaxBits, tPAddr *PhysAddr)
        
        ENTER("iPages iMaxBits pPhysAddr", Pages, MaxBits, PhysAddr);
        
+       if(MaxBits == -1)
+               MaxBits = PHYS_BITS;
+       
        // Sanity Check
        if(MaxBits < 12 || !PhysAddr) {
                LEAVE('i', 0);

UCC git Repository :: git.ucc.asn.au