The first free pfn available for allocation is calculated by adding the
number of page table frames to the pfn of the first page table and
then the magic number 3 to account for start info page et al.
As the start info page, xenstore page and console page are allocated
_before_ the page tables leaving room for these pages behind the page
tables makes no sense.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
printk("stack start: %p(VA)\n", stack);
printk(" _end: %p(VA)\n", &_end);
- /* First page follows page table pages and 3 more pages (store page etc) */
- start_pfn = PFN_UP(to_phys(start_info.pt_base)) +
- start_info.nr_pt_frames + 3;
+ /* First page follows page table pages. */
+ start_pfn = PFN_UP(to_phys(start_info.pt_base)) + start_info.nr_pt_frames;
max_pfn = start_info.nr_pages;
/* We need room for demand mapping and heap, clip available memory */