• Jeremy Fitzhardinge's avatar
    [PATCH] i386: map enough initial memory to create lowmem mappings · 9ce8c2ed
    Jeremy Fitzhardinge authored
    head.S creates the very initial pagetable for the kernel.  This just
    maps enough space for the kernel itself, and an allocation bitmap.
    The amount of mapped memory is rounded up to 4Mbytes, and so this
    typically ends up mapping 8Mbytes of memory.
    
    When booting, pagetable_init() needs to create mappings for all
    lowmem, and the pagetables for these mappings are allocated from the
    free pages around the kernel in low memory.  If the number of
    pagetable pages + kernel size exceeds head.S's initial mapping, it
    will end up faulting on an unmapped page.  This will only happen with
    specific combinations of kernel size and memory size.
    
    This patch makes sure that head.S also maps enough space to fit the
    kernel pagetables as well as the kernel itself.  It ends up using an
    additional two pages of unreclaimable memory.
    Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
    Signed-off-by: default avatarAndi Kleen <ak@suse.de>
    Acked-by: default avatar"H. Peter Anvin" <hpa@zytor.com>
    Cc: Andi Kleen <ak@suse.de>
    Cc: Zachary Amsden <zach@vmware.com>
    Cc: Chris Wright <chrisw@sous-sol.org>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>,
    9ce8c2ed
asm-offsets.c 3.64 KB