diff --git a/sys/vmm/getfreevirtualpage.c b/sys/vmm/getfreevirtualpage.c index 4d3bcb8..9eac6f5 100644 --- a/sys/vmm/getfreevirtualpage.c +++ b/sys/vmm/getfreevirtualpage.c @@ -84,12 +84,8 @@ /* Locate Initial Page Table */ keepMapping: - //kprintf( "vmStart: 0x%X, start_page: 0x%X, VMM_USER_END: 0x%X, DIFF: 0x%X", _current->oInfo.vmStart, start_page, VMM_USER_END, VMM_USER_END - _current->oInfo.vmStart ); - pdI = PD_INDEX(start_page); - //kprintf( "pdI: %i, start_page: 0x%X\n", pdI, start_page ); - if( pdI > PD_INDEX( VMM_USER_END ) ) { map_from = 0x0; @@ -111,8 +107,6 @@ ptI = PT_INDEX( start_page ); - //kprintf( "ptI: %i, start_page: 0x%X\n", ptI, start_page ); - for( y = ptI; y < PT_ENTRIES && counter < count; y++, counter++ ) { /* Loop Through The Page Table Find An UnAllocated Page */ @@ -130,8 +124,6 @@ counter = 0; - //kprintf( "This is bad!\n" ); - goto keepMapping; } @@ -140,21 +132,12 @@ map_from = start_page; - //kprintf( "map_from: 0x%X\n", map_from ); - } } if( counter < count ) { - //kprintf( "y: %i, counter: %i, count: %i\n", y, counter, count ); - - // XXX - This is worng? start_page += ( PAGE_SIZE * counter ); - - // NOTES OK THIS IS WRONG WE NEED TO INCREMENT TO THE NEXT PAGE TABLE BECAUSE THIS IS EXPONENTIALLY LOSING MEMORY - // THIS MAY BE ONE OF MANY BROKEN THINGS TO LOOK INTO. - //start_page = ( pdI + 1 ) * ( PAGE_SIZE * 1024 ); start_page += ( ( y - ptI ) * PAGE_SIZE ); @@ -175,8 +158,6 @@ } - //_current->oInfo.vmStart += (count * PAGE_SIZE); - for( counter = 0; counter < count; counter++ ) { if( ( vmm_remapPage( ( uint32_t ) vmm_findFreePage( pid ), ( map_from + ( counter * PAGE_SIZE ) ), PAGE_DEFAULT, pid, 0 ) ) == 0x0 ) {