Re: Loading initrd above 4G causes freeze on boot

From: Matt Fleming
Date: Wed Aug 13 2014 - 10:02:28 EST


On Sun, 10 Aug, at 09:43:32PM, Mantas MikulÄnas wrote:
> On Sun, Aug 10, 2014 at 8:55 AM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> > On Sat, Aug 9, 2014 at 3:45 PM, Mantas MikulÄnas <grawity@xxxxxxxxx> wrote:
> >> On Sat, Aug 9, 2014 at 10:23 PM, Matt Fleming <matt@xxxxxxxxxxxxxxxxx> wrote:
> >> [However... Whether it's five chunks, four (after making the initrd
> >> smaller), or just one (with your efi=nochunk), I noticed that it
> >> *always* hangs during the *last* read, and the allocated memory always
> >> ends at roughly the same address (0x137fffXXX). I wonder if it's
> >> selecting a memory location already in use, or something like that...]
> >>
> >> (The laptop is Asus K52JT, AMI firmware v206, no updates available.)
> >
> > wonder if efi_file_read return with wrong chunksize.
> >
> > Can you try attached patch ?
>
> Thanks, but it didn't change anything.
>
> (I tried adding some efi_printk's, and as far as I can see,
> efi_file_read *doesn't* return at all.)

Could you send you revert Yinghai's commit locally and send the dmesg
from a successful boot? I'm wondering what other regions are around the
0x137fffxxx area.

One other thing to attempt would be to progressively try higher and
higher max memory addresses to read into to see if we can correlate your
hang with a particular region, i.e. this code,


if (hdr->xloadflags & XLF_CAN_BE_LOADED_ABOVE_4G)
initrd_addr_max = -1UL;
else
initrd_addr_max = hdr->initrd_addr_max;

status = efi_parse_options(cmdline_ptr);
if (status != EFI_SUCCESS)
goto fail2;

status = handle_cmdline_files(sys_table, image,
(char *)(unsigned long)hdr->cmd_line_ptr,
"initrd=", initrd_addr_max,
&ramdisk_addr, &ramdisk_size);


--
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/