From: Philip Homburg Date: Mon, 24 Oct 2005 13:48:50 +0000 (+0000) Subject: Removed debug printfs. X-Git-Tag: v3.1.2a~549 X-Git-Url: http://zhaoyanbai.com/repos/icons/debian/static/gitweb.css?a=commitdiff_plain;h=bfa0a555ad05fe80adec7e34699fb973ea37a411;p=minix.git Removed debug printfs. --- diff --git a/kernel/system/do_vm.c b/kernel/system/do_vm.c index 2fc08cea7..1f77f20a8 100644 --- a/kernel/system/do_vm.c +++ b/kernel/system/do_vm.c @@ -24,8 +24,6 @@ FORWARD _PROTOTYPE( void vm_enable_paging, (void) ); FORWARD _PROTOTYPE( void map_range, (u32_t base, u32_t size, u32_t offset) ); -#define VM_DEBUG 0 /* enable/ disable debug output */ - /*===========================================================================* * do_vm_setbuf * *===========================================================================*/ @@ -38,10 +36,6 @@ message *m_ptr; /* pointer to request message */ /* do_serial_debug= 1; */ -#if VM_DEBUG - kprintf("in do_vm_map\n"); -#endif - if (vm_needs_init) { vm_needs_init= 0; @@ -58,18 +52,9 @@ message *m_ptr; /* pointer to request message */ p_phys= umap_local(pp, D, base, size); if (p_phys == 0) return EFAULT; -#if VM_DEBUG - kprintf("got 0x%x for 0x%x [D].mem_start = 0x%x\n", - p_phys, base, pp->p_memmap[D].mem_phys); -#endif if (do_map) { -#if VM_DEBUG - kprintf( - "do_vm_map: mapping 0x%x @ 0x%x to 0x%x @ proc %d\n", - size, offset, base, proc_nr); -#endif pp->p_misc_flags |= MF_VM; map_range(p_phys, size, offset); @@ -110,10 +95,6 @@ PRIVATE void vm_init(void) u32_t entry; unsigned pages; -#if VM_DEBUG - kprintf("in vm_init\n"); - kprintf("%s, %d\n", __FILE__, __LINE__); -#endif if (!vm_size) panic("vm_init: no space for page tables", NO_NUM); @@ -135,10 +116,6 @@ PRIVATE void vm_init(void) if (pages * I386_VM_PT_ENT_SIZE > pt_size) panic("vm_init: page table too small", NO_NUM); -#if VM_DEBUG - kprintf("%s, %d\n", __FILE__, __LINE__); -#endif - for (p= 0; p*I386_VM_PT_ENT_SIZE < pt_size; p++) { phys_mem= p*PAGE_SIZE; @@ -158,9 +135,6 @@ PRIVATE void vm_init(void) entry= 0; phys_put32(vm_dir_base + p*I386_VM_PT_ENT_SIZE, entry); } -#if VM_DEBUG - kprintf("%s, %d\n", __FILE__, __LINE__); -#endif vm_set_cr3(vm_dir_base); level0(vm_enable_paging); } @@ -169,11 +143,6 @@ PRIVATE void phys_put32(addr, value) phys_bytes addr; u32_t value; { -#if VM_DEBUG -kprintf("%s, %d: %d bytes from 0x%x to 0x%x\n", __FILE__, __LINE__, - sizeof(value), vir2phys((vir_bytes)&value), addr); -#endif - phys_copy(vir2phys((vir_bytes)&value), addr, sizeof(value)); } @@ -190,17 +159,8 @@ phys_bytes addr; PRIVATE void vm_set_cr3(value) u32_t value; { -#if VM_DEBUG -kprintf("%s, %d\n", __FILE__, __LINE__); -#endif vm_cr3= value; -#if VM_DEBUG -kprintf("%s, %d\n", __FILE__, __LINE__); -#endif level0(set_cr3); -#if VM_DEBUG -kprintf("%s, %d\n", __FILE__, __LINE__); -#endif } PRIVATE void set_cr3() @@ -244,19 +204,9 @@ u32_t offset; curr_pt_addr= phys_get32(vm_cr3 + dir_ent * I386_VM_PT_ENT_SIZE); curr_pt_addr &= I386_VM_ADDR_MASK; -#if VM_DEBUG - kprintf("got address 0x%x for page table 0x%x\n", - curr_pt_addr, curr_pt); -#endif } entry= offset | I386_VM_USER | I386_VM_WRITE | I386_VM_PRESENT; -#if VM_DEBUG - kprintf( - "putting 0x%x at dir_ent 0x%x, pt_ent 0x%x (addr 0x%x)\n", - entry, dir_ent, pt_ent, - curr_pt_addr + pt_ent * I386_VM_PT_ENT_SIZE); -#endif phys_put32(curr_pt_addr + pt_ent * I386_VM_PT_ENT_SIZE, entry); offset += PAGE_SIZE; base += PAGE_SIZE;