x86: fixes initialization errors in page_alloc
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 1 Aug 2013 23:32:07 +0000 (16:32 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 2 Aug 2013 00:00:16 +0000 (17:00 -0700)
commit0169cc630c1435ed4b22d405defd78147a3871f2
tree6bc9c0b7328c2b5b188b0ccacb3aa241ad061cc1
parent6760bbae6c8edad2143fd22ea4e94de78cacc7de
x86: fixes initialization errors in page_alloc

If the kernel's end symbol was page aligned, pa64_is_in_kernel() would
inaccurately report that address as being in the kernel.  That page actually
can be free.  check_range() was catching this.  Luckily, the error was in the
safe direction; we were marking a free page as busy.

The ROUNDDOWN fix is similar.  Check the comment for details; we're mostly
ignoring the issue for now.
kern/arch/x86/page_alloc.c