kern

changeset 70:219974492c7d

added a comment in clone_vm
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 12 Oct 2011 14:46:00 +0300
parents b45e2d5f0ae1
children c7bd6ec7b946
files src/vm.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/src/vm.c	Wed Oct 12 14:39:40 2011 +0300
     1.2 +++ b/src/vm.c	Wed Oct 12 14:46:00 2011 +0300
     1.3 @@ -777,9 +777,13 @@
     1.4  	}
     1.5  
     1.6  	/* for the kernel space we'll just use the same page tables */
     1.7 -	for(i=kstart_dirent; i<1024; i++) {
     1.8 +	for(i=kstart_dirent; i<1023; i++) {
     1.9  		ndir[i] = pgdir[i];
    1.10  	}
    1.11 +
    1.12 +	/* also point the last page directory entry to the page directory address
    1.13 +	 * since we're relying on recursive page tables
    1.14 +	 */
    1.15  	paddr = virt_to_phys((uint32_t)ndir);
    1.16  	ndir[1023] = paddr | PG_PRESENT;
    1.17