[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPWNY8X+pRf4GuYAzKj-co0fkLMY0KNw+wB4KA8eaJ0QbE4MnA@mail.gmail.com>
Date: Sun, 10 Aug 2014 01:45:16 +0300
From: Mantas Mikulėnas <grawity@...il.com>
To: Matt Fleming <matt@...sole-pimps.org>
Cc: Yinghai Lu <yinghai@...nel.org>,
Matt Fleming <matt.fleming@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-efi@...r.kernel.org
Subject: Re: Loading initrd above 4G causes freeze on boot
On Sat, Aug 9, 2014 at 10:23 PM, Matt Fleming <matt@...sole-pimps.org> wrote:
>
> On Sat, 09 Aug, at 09:44:55AM, Yinghai Lu wrote:
> > On Sat, Aug 9, 2014 at 7:23 AM, Mantas Mikulėnas <grawity@...il.com> wrote:
> > > As of commit 4bf7111f5016 ("x86/efi: Support initrd loaded above 4G"),
> > > the kernel freezes at the earliest possible moment when trying to boot
> > > via UEFI on my Asus laptop. (It still boots via BIOS.)
> > >
> > > If I revert that commit on current master (c309bfa9b481), it boots
> > > correctly again [although I see "setup_efi_pci() failed" being printed].
> > >
> > > (Seems like it freezes when handle_cmdline_files() attempts to read
> > > the last chunk of the initramfs -- the last call to efi_file_read()
> > > never returns. Figuring out why that happens is beyond me, though.)
> > >
> >
> > Matt found that efi_file_read()/firmware has problem that could not do
> > several reading. Please check if reverting that commit have any
> > difference.
> >
> > ---
> > I spent some time playing around with this bug and it appears to be
> > triggered by the read-a-chunk-at-a-time logic in handle_cmdline_files(),
> > (which is itself a bug workaround) introduced here,
> >
> > commit 2d2da60fb40a
> > Author: Maarten Lankhorst <m.b.lankhorst@...il.com>
> > Date: Fri Dec 16 13:30:58 2011 +0100
> >
> > x86, efi: Break up large initrd reads
>
> Right, I committed a patch to workaround this problem here,
>
> http://git.kernel.org/cgit/linux/kernel/git/mfleming/efi.git/commit/?h=next&id=1c24a2bef39f041eb578189207240d0457ef0ac3
>
> since on my ASUS machine the combination of breaking up initrd reads
> into chunks and reading into a buffer above 4G actually triggers a whole
> new bug.
>
> Mantas, could you try out the patch referenced above and pass
> "efi=nochunk" on the command line to the EFI boot stub. I'm hoping that
> fixes your problem.
Thanks for the patch, I've just tested it but the problem remains; the
system freezes even when reading the entire initramfs at once.
[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.)
--
Mantas Mikulėnas <grawity@...il.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists