> > Note, that does not readily work - this is where we load the > > compressed kernel image and initrd, but what matters is the size it > > gets uncompressed to. > > I think what matters is the space taken by (uncompressed and loaded) > kernel ALLOC segments. Everything above that should be ok to load a > ramdisk. > > IOW, the ELF loader would need to return the topmost address it came > across, including .bss-like parts. The up-aligned value would become > the initrd load address.
That only works if qemu is loading the uncomplressed ELF vmlinux image directly. In most cases it will be loading a binary blob (or ELF file) of the compressed zImage. In this case it has no way of telling how big the final kernel ALLOC sections are. By my reading grub puts the inirtd at 0x38000000 (896Mb), or at the top of physical memory, whichever is lowest, and lilo puts it at the top of physical memory, give or take a bit of alignment. Paul