• Ingo Molnar's avatar
    x86: fix spontaneous reboot with allyesconfig bzImage · 88f3aec7
    Ingo Molnar authored
    recently the 64-bit allyesconfig bzImage kernel started spontaneously
    rebooting during early bootup.
    
    after a few fun hours spent with early init debugging, it turns out
    that we've got this rather annoying limit on the size of the kernel
    image:
    
          #define KERNEL_TEXT_SIZE  (40*1024*1024)
    
    which limit my vmlinux just happened to pass:
    
           text           data       bss        dec       hex   filename
       29703744        4222751   8646224c   42572719   2899baf   vmlinux
    
    40 MB is 42572719 bytes, so my vmlinux was just 1.5% above this limit :-/
    
    So it happily crashed right in head_64.S, which - as we all know - is
    the most debuggable code in the whole architecture ;-)
    
    So increase the limit to allow an up to 128MB kernel image to be mapped.
    (should anyone be that crazy or lazy)
    
    We have a full 4K of pagetable (level2_kernel_pgt) allocated for these
    mappings already, so there's no RAM overhead and the limit was rather
    pointless and arbitrary.
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    88f3aec7
head_64.S 11.6 KB