diff --git a/xen/arch/x86/boot/mkelf32.c b/xen/arch/x86/boot/mkelf32.c index 373ba4ddd5..469d1ba0af 100644 --- a/xen/arch/x86/boot/mkelf32.c +++ b/xen/arch/x86/boot/mkelf32.c @@ -345,7 +345,7 @@ int main(int argc, char **argv) * the Xen image using 2M pages. To avoid running into adjacent non-RAM * regions, pad the segment to the next 2M boundary. */ - mem_siz = ((uint32_t)in64_phdr.p_memsz + (1U << 20) - 1) & (-1U << 20); + mem_siz = ((uint32_t)in64_phdr.p_memsz + (1U << 21) - 1) & (-1U << 21); note_sz = note_base = offset = 0; if ( num_phdrs > 1 )