x86_64: fixes bug in map_segment
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 6 Mar 2014 06:33:07 +0000 (22:33 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 6 Mar 2014 06:33:07 +0000 (22:33 -0800)
Copy and paste from the submap case.

kern/arch/x86/pmap64.c

index 456f6f9..c8ada42 100644 (file)
@@ -194,7 +194,7 @@ static uintptr_t __map_segment(pte_t *pgdir, uintptr_t va, size_t size,
        }
        /* Map whatever is left over */
        if (size)
-               amt_mapped += __map_segment(pgdir, va, amt_to_submap, pa, perm,
+               amt_mapped += __map_segment(pgdir, va, size, pa, perm,
                                            pml_shift - BITS_PER_PML);
        return amt_mapped;
 }