[bzimage] Fix page alignment of initrd images
authorMichael Brown <mcb30@ipxe.org>
Fri, 28 Oct 2016 23:08:48 +0000 (00:08 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 28 Oct 2016 23:32:33 +0000 (00:32 +0100)
commitaa11f5deda29f91f5b8592965ed00f4a65002eff
treec2023ebd586dc7656df1448e7eb3102d8c2f24d7
parent0be77e959e813773cac10f049cb62c83258f81ff
[bzimage] Fix page alignment of initrd images

The initrd_addr_max field represents the highest byte address that may
be used to hold initrd images, and is therefore almost certainly not
aligned to a page boundary: a typical value might be 0x7fffffff.

Fix the address calculations to ensure that the initrd images are
always aligned to a page boundary.

Reported-by: Sitsofe Wheeler <sitsofe@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/image/bzimage.c