[ipxe-devel] initrd alignment

Dave Hansen dave at sr71.net
Tue May 28 18:23:52 UTC 2013


Linux seems to get a bit annoyed with initrds that are not page-aligned:

> [   13.415783] ------------[ cut here ]------------
> [   13.420484] WARNING: at /home/davehans/linux.git/arch/x86/mm/init.c:487 free_init_pages+0xa0/0x230()
> [   13.429852] Modules linked in:
> [   13.432942] CPU: 6 PID: 1 Comm: swapper/0 Not tainted 3.10.0-rc1-00120-gb973425-dirty #178
> [   13.441426] Hardware name: FUJITSU-SV PRIMEQUEST 1800E2/SB, BIOS PRIMEQUEST 1000 Series BIOS Version 1.24 09/14/2011
> [   13.452210]  ffffffff81c472a8 ffff881fd2d51da8 ffffffff819124f1 ffff881fd2d51de8
> [   13.459714]  ffffffff810c5df0 ffff881fd2d51dd8 ffff880069598000 ffff8800686c6000
> [   13.467226]  ffffffff81c4d6db ffff8800686c6000 ffff880069598000 ffff881fd2d51df8
> [   13.474737] Call Trace:
> [   13.477225]  [<ffffffff819124f1>] dump_stack+0x27/0x30
> [   13.482437]  [<ffffffff810c5df0>] warn_slowpath_common+0xa0/0xe0
> [   13.488534]  [<ffffffff810c5e5a>] warn_slowpath_null+0x2a/0x40
> [   13.494455]  [<ffffffff810b3830>] free_init_pages+0xa0/0x230
> [   13.500202]  [<ffffffff81f1c334>] ? free_initrd+0xe4/0xe4
> [   13.505681]  [<ffffffff81f36de1>] free_initrd_mem+0x28/0x31
> [   13.511333]  [<ffffffff81f1c313>] free_initrd+0xc3/0xe4
> [   13.516634]  [<ffffffff81f1c3c3>] populate_rootfs+0x8f/0x155
> [   13.522382]  [<ffffffff81000352>] do_one_initcall+0x142/0x230
> [   13.528215]  [<ffffffff81f1969e>] kernel_init_freeable+0x225/0x31a
> [   13.534491]  [<ffffffff81f1895f>] ? loglevel+0x46/0x46
> [   13.539707]  [<ffffffff818f64e0>] ? rest_init+0xf0/0xf0
> [   13.545005]  [<ffffffff818f64f6>] kernel_init+0x16/0x1b0
> [   13.550397]  [<ffffffff81928a1c>] ret_from_fork+0x7c/0xb0
> [   13.555876]  [<ffffffff818f64e0>] ? rest_init+0xf0/0xf0
> [   13.561184] ---[ end trace 6394d17d1682642b ]---

Should ipxe be page-aligning the initrd?  Nothing _bad_ happens (the
kernel just rounds the start up to the next page).

I don't see any reference to the boot spec's 'kernel_alignment' in the
ipxe source anywhere (other than the definition).  Should it be
respecting that for the initrd?



More information about the ipxe-devel mailing list