Hore work to allow ARM builds
[tpg/acess2.git] / Kernel / arch / x86_64 / mm_phys.c
index 0130773..670beb9 100644 (file)
@@ -24,15 +24,15 @@ extern char gKernelEnd[];
 
 // === PROTOTYPES ===
 void   MM_InitPhys_Multiboot(tMBoot_Info *MBoot);
-tPAddr MM_AllocPhysRange(int Num, int Bits);
-tPAddr MM_AllocPhys(void);
-void   MM_RefPhys(tPAddr PAddr);
-void   MM_DerefPhys(tPAddr PAddr);
+//tPAddr       MM_AllocPhysRange(int Num, int Bits);
+//tPAddr       MM_AllocPhys(void);
+//void MM_RefPhys(tPAddr PAddr);
+//void MM_DerefPhys(tPAddr PAddr);
  int   MM_int_GetRangeID( tPAddr Addr );
 
 // === GLOBALS ===
 tMutex glPhysicalPages;
-Uint64 *gaSuperBitmap = (void*)MM_PAGE_SUPBMP; // 1 bit = 64 Pages, 16 MiB Per Word
+Uint64 *gaSuperBitmap = (void*)MM_PAGE_SUPBMP; // 1 bit = 64 Pages, 16 MiB per Word
 Uint64 *gaMainBitmap = (void*)MM_PAGE_BITMAP;  // 1 bit = 1 Page, 256 KiB per Word
 Uint64 *gaMultiBitmap = (void*)MM_PAGE_DBLBMP; // Each bit means that the page is being used multiple times
 Uint32 *gaiPageReferences = (void*)MM_PAGE_COUNTS;     // Reference Counts
@@ -390,7 +390,7 @@ tPAddr MM_AllocPhysRange(int Pages, int MaxBits)
                        nFree ++;
                        addr ++;
                        LOG("nFree(%i) == %i (0x%x)", nFree, Pages, addr);
-                       if(nFree == Num)
+                       if(nFree == Pages)
                                break;
                }
                LOG("nFree = %i", nFree);
@@ -409,10 +409,10 @@ tPAddr MM_AllocPhysRange(int Pages, int MaxBits)
                Mutex_Release(&glPhysicalPages);
                // TODO: Page out
                // ATM. Just Warning
-               Warning(" MM_AllocPhysRange: Out of memory (unable to fulfil request for %i pages)", Num);
+               Warning(" MM_AllocPhysRange: Out of memory (unable to fulfil request for %i pages)", Pages);
                Log_Warning("Arch",
                        "Out of memory (unable to fulfil request for %i pages)",
-                       Num
+                       Pages   
                        );
                LEAVE('i', 0);
                return 0;

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