Re: [PATCH] x86: only load initrd above 4g on second try

2014-09-02 Thread Anders Darander
* Matt Fleming [140830 13:24]: > On Wed, 27 Aug, at 10:13:22AM, Yinghai Lu wrote: > > How about adding more info print out like: > > "Try to load initrd file to higher address..." > Yeah, that could work, at least we've had some debugging information to > go on if people start reporting hangs,

Re: [PATCH] x86: only load initrd above 4g on second try

2014-09-02 Thread Anders Darander
* Matt Fleming m...@console-pimps.org [140830 13:24]: On Wed, 27 Aug, at 10:13:22AM, Yinghai Lu wrote: How about adding more info print out like: Try to load initrd file to higher address... Yeah, that could work, at least we've had some debugging information to go on if people start

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-30 Thread Matt Fleming
On Wed, 27 Aug, at 10:13:22AM, Yinghai Lu wrote: > > How about adding more info print out like: > "Try to load initrd file to higher address..." Yeah, that could work, at least we've had some debugging information to go on if people start reporting hangs, though I'd suggest using "Trying" or

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-30 Thread Matt Fleming
On Wed, 27 Aug, at 10:13:22AM, Yinghai Lu wrote: How about adding more info print out like: Try to load initrd file to higher address... Yeah, that could work, at least we've had some debugging information to go on if people start reporting hangs, though I'd suggest using Trying or

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-27 Thread Yinghai Lu
On Wed, Aug 27, 2014 at 10:49 AM, H. Peter Anvin wrote: > On 08/26/2014 03:05 PM, Yinghai Lu wrote: > This does, however, suggest at least two possible solutions: > > 1. We can read the initramfs into a temporary buffer and memcpy() it to > the target. > > 2. We might be able to align the

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-27 Thread H. Peter Anvin
On 08/26/2014 03:05 PM, Yinghai Lu wrote: > > The firmware has bug and can use buffer above 4G to read files. > and if the file size is 512 bytes alignment, then reading could go through. > File size, or alignment? Different things. Again, your patch description is not just incomplete, but

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-27 Thread Yinghai Lu
On Wed, Aug 27, 2014 at 3:59 AM, Matt Fleming wrote: > On Tue, 26 Aug, at 02:45:44PM, Yinghai Lu wrote: > The reason I suggested introducing some kind of kernel parameter to > allow loading above 4G is because if Mantas loads a 5GB initrd with your > patch, his machine is still going to hang,

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-27 Thread Matt Fleming
On Tue, 26 Aug, at 02:45:44PM, Yinghai Lu wrote: > Mantas found that after commit 4bf7111f5016 ("x86/efi: Support initrd > loaded above 4G"), the kernel freezes at the earliest possible moment > when trying to boot via UEFI on Asus laptop. > > There are buggy EFI implementations: with EFI run

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-27 Thread Matt Fleming
On Tue, 26 Aug, at 02:45:44PM, Yinghai Lu wrote: Mantas found that after commit 4bf7111f5016 (x86/efi: Support initrd loaded above 4G), the kernel freezes at the earliest possible moment when trying to boot via UEFI on Asus laptop. There are buggy EFI implementations: with EFI run time,

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-27 Thread Yinghai Lu
On Wed, Aug 27, 2014 at 3:59 AM, Matt Fleming m...@console-pimps.org wrote: On Tue, 26 Aug, at 02:45:44PM, Yinghai Lu wrote: The reason I suggested introducing some kind of kernel parameter to allow loading above 4G is because if Mantas loads a 5GB initrd with your patch, his machine is still

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-27 Thread H. Peter Anvin
On 08/26/2014 03:05 PM, Yinghai Lu wrote: The firmware has bug and can use buffer above 4G to read files. and if the file size is 512 bytes alignment, then reading could go through. File size, or alignment? Different things. Again, your patch description is not just incomplete, but seems

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-27 Thread Yinghai Lu
On Wed, Aug 27, 2014 at 10:49 AM, H. Peter Anvin h...@zytor.com wrote: On 08/26/2014 03:05 PM, Yinghai Lu wrote: This does, however, suggest at least two possible solutions: 1. We can read the initramfs into a temporary buffer and memcpy() it to the target. 2. We might be able to align the

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-26 Thread Yinghai Lu
On Tue, Aug 26, 2014 at 3:16 PM, Mantas Mikulėnas wrote: > > In particular, I just realized yesterday that I don't know whether > it's referring to physical or virtual addresses in the initrd load > code -- and the laptop only has 4 GB of memory, so the kernel > shouldn't be using larger physical

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-26 Thread Mantas Mikulėnas
On Wed, Aug 27, 2014 at 1:05 AM, Yinghai Lu wrote: > On Tue, Aug 26, 2014 at 2:53 PM, H. Peter Anvin wrote: >> On 08/26/2014 02:45 PM, Yinghai Lu wrote: >>> Mantas found that after commit 4bf7111f5016 ("x86/efi: Support initrd >>> loaded above 4G"), the kernel freezes at the earliest possible

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-26 Thread Yinghai Lu
On Tue, Aug 26, 2014 at 2:53 PM, H. Peter Anvin wrote: > On 08/26/2014 02:45 PM, Yinghai Lu wrote: >> Mantas found that after commit 4bf7111f5016 ("x86/efi: Support initrd >> loaded above 4G"), the kernel freezes at the earliest possible moment >> when trying to boot via UEFI on Asus laptop. >>

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-26 Thread H. Peter Anvin
On 08/26/2014 02:45 PM, Yinghai Lu wrote: > Mantas found that after commit 4bf7111f5016 ("x86/efi: Support initrd > loaded above 4G"), the kernel freezes at the earliest possible moment > when trying to boot via UEFI on Asus laptop. > > There are buggy EFI implementations: with EFI run time,

[PATCH] x86: only load initrd above 4g on second try

2014-08-26 Thread Yinghai Lu
Mantas found that after commit 4bf7111f5016 ("x86/efi: Support initrd loaded above 4G"), the kernel freezes at the earliest possible moment when trying to boot via UEFI on Asus laptop. There are buggy EFI implementations: with EFI run time, kernel need to load file with 512bytes alignment when

[PATCH] x86: only load initrd above 4g on second try

2014-08-26 Thread Yinghai Lu
Mantas found that after commit 4bf7111f5016 (x86/efi: Support initrd loaded above 4G), the kernel freezes at the earliest possible moment when trying to boot via UEFI on Asus laptop. There are buggy EFI implementations: with EFI run time, kernel need to load file with 512bytes alignment when

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-26 Thread H. Peter Anvin
On 08/26/2014 02:45 PM, Yinghai Lu wrote: Mantas found that after commit 4bf7111f5016 (x86/efi: Support initrd loaded above 4G), the kernel freezes at the earliest possible moment when trying to boot via UEFI on Asus laptop. There are buggy EFI implementations: with EFI run time, kernel need

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-26 Thread Yinghai Lu
On Tue, Aug 26, 2014 at 2:53 PM, H. Peter Anvin h...@zytor.com wrote: On 08/26/2014 02:45 PM, Yinghai Lu wrote: Mantas found that after commit 4bf7111f5016 (x86/efi: Support initrd loaded above 4G), the kernel freezes at the earliest possible moment when trying to boot via UEFI on Asus laptop.

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-26 Thread Mantas Mikulėnas
On Wed, Aug 27, 2014 at 1:05 AM, Yinghai Lu ying...@kernel.org wrote: On Tue, Aug 26, 2014 at 2:53 PM, H. Peter Anvin h...@zytor.com wrote: On 08/26/2014 02:45 PM, Yinghai Lu wrote: Mantas found that after commit 4bf7111f5016 (x86/efi: Support initrd loaded above 4G), the kernel freezes at the

Re: [PATCH] x86: only load initrd above 4g on second try

2014-08-26 Thread Yinghai Lu
On Tue, Aug 26, 2014 at 3:16 PM, Mantas Mikulėnas graw...@gmail.com wrote: In particular, I just realized yesterday that I don't know whether it's referring to physical or virtual addresses in the initrd load code -- and the laptop only has 4 GB of memory, so the kernel shouldn't be using