X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Fx86%2Fmm_phys.c;h=a1feb464dbcdaf578b85dd6805fa8a05398d5520;hb=9d85201216cb35e1b1e051b1d7cdc38eaa5befa4;hp=4dbb2c32958e2f9044b851da3211430e76565aeb;hpb=635bc78017d8a4a16314a973e39c849b2afac795;p=tpg%2Facess2.git diff --git a/Kernel/arch/x86/mm_phys.c b/Kernel/arch/x86/mm_phys.c index 4dbb2c32..a1feb464 100644 --- a/Kernel/arch/x86/mm_phys.c +++ b/Kernel/arch/x86/mm_phys.c @@ -16,10 +16,12 @@ extern void gKernelEnd; // === PROTOTYPES === -tPAddr MM_AllocPhys(void); -tPAddr MM_AllocPhysRange(int Pages, int MaxBits); -void MM_RefPhys(tPAddr PAddr); -void MM_DerefPhys(tPAddr PAddr); +void MM_Install(tMBoot_Info *MBoot); +//tPAddr MM_AllocPhys(void); +//tPAddr MM_AllocPhysRange(int Pages, int MaxBits); +//void MM_RefPhys(tPAddr PAddr); +//void MM_DerefPhys(tPAddr PAddr); +// int MM_GetRefCount(tPAddr PAddr); // === GLOBALS === tMutex glPhysAlloc; @@ -481,14 +483,14 @@ void MM_DerefPhys(tPAddr PAddr) /** * \fn int MM_GetRefCount(tPAddr Addr) */ -int MM_GetRefCount(tPAddr Addr) +int MM_GetRefCount(tPAddr PAddr) { // Get page number - Addr >>= 12; + PAddr >>= 12; // We don't care about non-ram pages - if(Addr >= giPageCount) return -1; + if(PAddr >= giPageCount) return -1; // Check if it is freed - return gaPageReferences[ Addr ]; + return gaPageReferences[ PAddr ]; }