]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[prefix] Delay initrd image copy until memory map is ready
authorMichael Brown <mcb30@ipxe.org>
Thu, 9 Feb 2012 16:41:05 +0000 (16:41 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 9 Feb 2012 16:49:30 +0000 (16:49 +0000)
commit3a4253868ce0c9c1f6fc7fd0f8a2e06afc19e9bb
tree855c287fe5f92082cbc73ac5644c6db4a73a0fd3
parentb5ed30b2d0504de3bfd9dcc6ad895c270a9e0fbc
[prefix] Delay initrd image copy until memory map is ready

initrd_init() calls umalloc() to allocate space for the initrd image,
but does so before hide_etherboot() has been called.  It is therefore
possible for the initrd to end up overwriting iPXE itself.

Fix by converting initrd_init() from an init_fn to a startup_fn.

Originally-fixed-by: Till Straumann <strauman@slac.stanford.edu>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/core/runtime.c