]> Zhao Yanbai Git Server - kernel.git/commitdiff
fix bug when init_paging
authorAceVest <zhaoyanbai@126.com>
Sat, 5 Apr 2014 06:25:05 +0000 (14:25 +0800)
committerAceVest <zhaoyanbai@126.com>
Sat, 5 Apr 2014 06:25:05 +0000 (14:25 +0800)
README.md [new file with mode: 0644]
mm/mm.c

diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..19ba022
--- /dev/null
+++ b/README.md
@@ -0,0 +1,10 @@
+kernel
+======
+
+I can't find a satisfactory name for my kernel.
+
+### HOW TO GET THE LATEST SOURCECODE?
+    git clone https://github.com/acevest/kernel
+### WHEN DID YOU START TO DO THIS WORK?
+    Maybe 2006.12
+### HOW TO COMPILE THIS KERNEL?
diff --git a/mm/mm.c b/mm/mm.c
index 91c8a0876065c3bbf2458e36afff76662a130beb..544f33607af0138af041b9735d6f5c8a9102bcef 100644 (file)
--- a/mm/mm.c
+++ b/mm/mm.c
@@ -313,7 +313,7 @@ void init_paging()
         unsigned long pt_addr = (unsigned long) va2pa(bootmem_alloc_pages(1));
 
         *pde = pt_addr | 7;
-        *(pde + (PAGE_OFFSET>>20)) = *pde; // for kernel paging
+        *(pde + (PAGE_OFFSET>>22)) = *pde; // for kernel paging
 
         for(ti=0; ti<PTECNT_PER_PAGE; ++ti)
         {
@@ -337,4 +337,5 @@ void init_mm()
     init_paging();
     printk("init buddy system...\n");
     init_buddy_system();
+    printk("memory init finish...\n");
 }