X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Fx86%2Fmm_virt.c;h=0ef677107bcaa7397cc72e8e3b5d4b1bfef233ee;hb=8d062ceb17eb6cfb2e3db8af6794d38391c245d3;hp=4f272e75c1ea24901aefc8ccc47c095cdb1236db;hpb=9b7a7e725ca1b371e4a89776ac4a7bb10e2cbea7;p=tpg%2Facess2.git diff --git a/Kernel/arch/x86/mm_virt.c b/Kernel/arch/x86/mm_virt.c index 4f272e75..0ef67710 100644 --- a/Kernel/arch/x86/mm_virt.c +++ b/Kernel/arch/x86/mm_virt.c @@ -105,10 +105,10 @@ Uint32 gWorkerStacks[(NUM_WORKER_STACKS+31)/32]; 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 ); @@ -958,21 +958,12 @@ tVAddr MM_AllocDMA(int Pages, int MaxBits, tPAddr *PhysAddr) } // 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);