void MM_PreinitVirtual()
{
#if USE_PAE
- gaInitPDPT[ 0 ] = 0;
+ //gaInitPDPT[ 0 ] = 0;
gaInitPageDir[ ((PAGE_TABLE_ADDR >> TAB)-3*512+3)*2 ] = ((tTabEnt)&gaInitPageDir - KERNEL_BASE) | 3;
#else
- gaInitPageDir[ 0 ] = 0;
+ //gaInitPageDir[ 0 ] = 0; // Needed for SMP startup code
gaInitPageDir[ PAGE_TABLE_ADDR >> 22 ] = ((tTabEnt)&gaInitPageDir - KERNEL_BASE) | 3;
#endif
INVLPG( PAGE_TABLE_ADDR );
}
// Slow Allocate
- phys = MM_AllocPhysRange(Pages);
+ phys = MM_AllocPhysRange(Pages, MaxBits);
// - Was it allocated?
if(phys == 0) {
LEAVE('i', 0);
return 0;
}
- // - Check if the memory is OK
- if(phys + (Pages-1)*0x1000 > maxCheck)
- {
- // Deallocate and return 0
- for(;Pages--;phys+=0x1000)
- MM_DerefPhys(phys);
- LEAVE('i', 0);
- return 0;
- }
// Allocated successfully, now map
ret = MM_MapHWPage(phys, Pages);