linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] RISC-V: load initrd wherever it fits into memory
@ 2021-06-29 13:40 Heinrich Schuchardt
  2021-06-29 22:56 ` Atish Patra
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Heinrich Schuchardt @ 2021-06-29 13:40 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Andreas Schwab, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Atish Patra, linux-efi, linux-riscv, linux-kernel,
	Heinrich Schuchardt

Requiring that initrd is loaded below RAM start + 256 MiB led to failure
to boot SUSE Linux with GRUB on QEMU, cf.
https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00037.html

Remove the constraint.

Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 arch/riscv/include/asm/efi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/include/asm/efi.h b/arch/riscv/include/asm/efi.h
index 7542282f1141..649ab513dc99 100644
--- a/arch/riscv/include/asm/efi.h
+++ b/arch/riscv/include/asm/efi.h
@@ -33,10 +33,10 @@ static inline unsigned long efi_get_max_fdt_addr(unsigned long image_addr)

 #define ARCH_EFI_IRQ_FLAGS_MASK (SR_IE | SR_SPIE)

-/* Load initrd at enough distance from DRAM start */
+/* Load initrd anywhere in system RAM */
 static inline unsigned long efi_get_max_initrd_addr(unsigned long image_addr)
 {
-	return image_addr + SZ_256M;
+	return ULONG_MAX;
 }

 #define alloc_screen_info(x...)		(&screen_info)
--
2.30.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] RISC-V: load initrd wherever it fits into memory
  2021-06-29 13:40 [PATCH 1/1] RISC-V: load initrd wherever it fits into memory Heinrich Schuchardt
@ 2021-06-29 22:56 ` Atish Patra
  2021-06-30  7:30   ` Ard Biesheuvel
  2021-07-06 19:07 ` Andreas Schwab
  2021-07-22  6:09 ` Palmer Dabbelt
  2 siblings, 1 reply; 8+ messages in thread
From: Atish Patra @ 2021-06-29 22:56 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Ard Biesheuvel, Andreas Schwab, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Atish Patra, linux-efi, linux-riscv, linux-kernel

On Tue, Jun 29, 2021 at 6:40 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Requiring that initrd is loaded below RAM start + 256 MiB led to failure
> to boot SUSE Linux with GRUB on QEMU, cf.
> https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00037.html
>
> Remove the constraint.
>
> Reported-by: Andreas Schwab <schwab@linux-m68k.org>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  arch/riscv/include/asm/efi.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/include/asm/efi.h b/arch/riscv/include/asm/efi.h
> index 7542282f1141..649ab513dc99 100644
> --- a/arch/riscv/include/asm/efi.h
> +++ b/arch/riscv/include/asm/efi.h
> @@ -33,10 +33,10 @@ static inline unsigned long efi_get_max_fdt_addr(unsigned long image_addr)
>
>  #define ARCH_EFI_IRQ_FLAGS_MASK (SR_IE | SR_SPIE)
>
> -/* Load initrd at enough distance from DRAM start */
> +/* Load initrd anywhere in system RAM */
>  static inline unsigned long efi_get_max_initrd_addr(unsigned long image_addr)
>  {
> -       return image_addr + SZ_256M;
> +       return ULONG_MAX;
>  }
>
>  #define alloc_screen_info(x...)                (&screen_info)
> --
> 2.30.2
>

LGTM

Reviewed-by: Atish Patra <atish.patra@wdc.com>

--
Regards,
Atish

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] RISC-V: load initrd wherever it fits into memory
  2021-06-29 22:56 ` Atish Patra
@ 2021-06-30  7:30   ` Ard Biesheuvel
  2021-07-02 19:11     ` Atish Patra
  0 siblings, 1 reply; 8+ messages in thread
From: Ard Biesheuvel @ 2021-06-30  7:30 UTC (permalink / raw)
  To: Atish Patra
  Cc: Heinrich Schuchardt, Andreas Schwab, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Atish Patra, linux-efi, linux-riscv,
	Linux Kernel Mailing List

On Wed, 30 Jun 2021 at 00:56, Atish Patra <atishp@atishpatra.org> wrote:
>
> On Tue, Jun 29, 2021 at 6:40 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> >
> > Requiring that initrd is loaded below RAM start + 256 MiB led to failure
> > to boot SUSE Linux with GRUB on QEMU, cf.
> > https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00037.html
> >
> > Remove the constraint.
> >
> > Reported-by: Andreas Schwab <schwab@linux-m68k.org>
> > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > ---
> >  arch/riscv/include/asm/efi.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/riscv/include/asm/efi.h b/arch/riscv/include/asm/efi.h
> > index 7542282f1141..649ab513dc99 100644
> > --- a/arch/riscv/include/asm/efi.h
> > +++ b/arch/riscv/include/asm/efi.h
> > @@ -33,10 +33,10 @@ static inline unsigned long efi_get_max_fdt_addr(unsigned long image_addr)
> >
> >  #define ARCH_EFI_IRQ_FLAGS_MASK (SR_IE | SR_SPIE)
> >
> > -/* Load initrd at enough distance from DRAM start */
> > +/* Load initrd anywhere in system RAM */
> >  static inline unsigned long efi_get_max_initrd_addr(unsigned long image_addr)
> >  {
> > -       return image_addr + SZ_256M;
> > +       return ULONG_MAX;
> >  }
> >
> >  #define alloc_screen_info(x...)                (&screen_info)
> > --
> > 2.30.2
> >
>
> LGTM
>
> Reviewed-by: Atish Patra <atish.patra@wdc.com>
>

Acked-by: Ard Biesheuvel <ardb@kernel.org>

Please take this via the RISC-V tree.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] RISC-V: load initrd wherever it fits into memory
  2021-06-30  7:30   ` Ard Biesheuvel
@ 2021-07-02 19:11     ` Atish Patra
  0 siblings, 0 replies; 8+ messages in thread
From: Atish Patra @ 2021-07-02 19:11 UTC (permalink / raw)
  To: Palmer Dabbelt, Alexandre Ghiti, Anup Patel
  Cc: Heinrich Schuchardt, Andreas Schwab, Paul Walmsley, Albert Ou,
	Atish Patra, linux-efi, linux-riscv, Linux Kernel Mailing List,
	Ard Biesheuvel

On Wed, Jun 30, 2021 at 12:30 AM Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Wed, 30 Jun 2021 at 00:56, Atish Patra <atishp@atishpatra.org> wrote:
> >
> > On Tue, Jun 29, 2021 at 6:40 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> > >
> > > Requiring that initrd is loaded below RAM start + 256 MiB led to failure
> > > to boot SUSE Linux with GRUB on QEMU, cf.
> > > https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00037.html
> > >
> > > Remove the constraint.
> > >
> > > Reported-by: Andreas Schwab <schwab@linux-m68k.org>
> > > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> > > ---
> > >  arch/riscv/include/asm/efi.h | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/arch/riscv/include/asm/efi.h b/arch/riscv/include/asm/efi.h
> > > index 7542282f1141..649ab513dc99 100644
> > > --- a/arch/riscv/include/asm/efi.h
> > > +++ b/arch/riscv/include/asm/efi.h
> > > @@ -33,10 +33,10 @@ static inline unsigned long efi_get_max_fdt_addr(unsigned long image_addr)
> > >
> > >  #define ARCH_EFI_IRQ_FLAGS_MASK (SR_IE | SR_SPIE)
> > >
> > > -/* Load initrd at enough distance from DRAM start */
> > > +/* Load initrd anywhere in system RAM */

Alex/Anup/Palmer:

As per my understanding initrd can be loaded in system RAM as long as
it doesn't overwrite the existing data (fdt/kernel image)
and respect reserved memory regions.

Let us know if we have any inherent memory location limitation for
initrd loading.


> > >  static inline unsigned long efi_get_max_initrd_addr(unsigned long image_addr)
> > >  {
> > > -       return image_addr + SZ_256M;
> > > +       return ULONG_MAX;
> > >  }
> > >
> > >  #define alloc_screen_info(x...)                (&screen_info)
> > > --
> > > 2.30.2
> > >
> >
> > LGTM
> >
> > Reviewed-by: Atish Patra <atish.patra@wdc.com>
> >
>
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
>
> Please take this via the RISC-V tree.



--
Regards,
Atish

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] RISC-V: load initrd wherever it fits into memory
  2021-06-29 13:40 [PATCH 1/1] RISC-V: load initrd wherever it fits into memory Heinrich Schuchardt
  2021-06-29 22:56 ` Atish Patra
@ 2021-07-06 19:07 ` Andreas Schwab
  2021-07-09 17:14   ` Atish Patra
  2021-07-22  6:09 ` Palmer Dabbelt
  2 siblings, 1 reply; 8+ messages in thread
From: Andreas Schwab @ 2021-07-06 19:07 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Ard Biesheuvel, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Atish Patra, linux-efi, linux-riscv, linux-kernel

On Jun 29 2021, Heinrich Schuchardt wrote:

> Requiring that initrd is loaded below RAM start + 256 MiB led to failure
> to boot SUSE Linux with GRUB on QEMU, cf.
> https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00037.html
>
> Remove the constraint.
>
> Reported-by: Andreas Schwab <schwab@linux-m68k.org>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

With that patch the image in
http://download.opensuse.org/ports/riscv/tumbleweed/iso/ work again.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] RISC-V: load initrd wherever it fits into memory
  2021-07-06 19:07 ` Andreas Schwab
@ 2021-07-09 17:14   ` Atish Patra
  2021-07-20 15:00     ` Heinrich Schuchardt
  0 siblings, 1 reply; 8+ messages in thread
From: Atish Patra @ 2021-07-09 17:14 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Heinrich Schuchardt, Ard Biesheuvel, Paul Walmsley, Albert Ou,
	Atish Patra, linux-efi, linux-riscv,
	linux-kernel@vger.kernel.org List, Andreas Schwab

On Tue, Jul 6, 2021 at 12:07 PM Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> On Jun 29 2021, Heinrich Schuchardt wrote:
>
> > Requiring that initrd is loaded below RAM start + 256 MiB led to failure
> > to boot SUSE Linux with GRUB on QEMU, cf.
> > https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00037.html
> >
> > Remove the constraint.
> >
> > Reported-by: Andreas Schwab <schwab@linux-m68k.org>
> > Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>
> With that patch the image in
> http://download.opensuse.org/ports/riscv/tumbleweed/iso/ work again.
>

Thanks.
@palmer: Can you take this one in this cycle ?

> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
> "And now for something completely different."



-- 
Regards,
Atish

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] RISC-V: load initrd wherever it fits into memory
  2021-07-09 17:14   ` Atish Patra
@ 2021-07-20 15:00     ` Heinrich Schuchardt
  0 siblings, 0 replies; 8+ messages in thread
From: Heinrich Schuchardt @ 2021-07-20 15:00 UTC (permalink / raw)
  To: Palmer Dabbelt, Paul Walmsley, Albert Ou
  Cc: Ard Biesheuvel, Atish Patra, linux-efi, linux-riscv,
	linux-kernel@vger.kernel.org List, Andreas Schwab, Atish Patra,
	Heinrich Schuchardt



On 7/9/21 7:14 PM, Atish Patra wrote:
> On Tue, Jul 6, 2021 at 12:07 PM Andreas Schwab <schwab@linux-m68k.org> wrote:
>>
>> On Jun 29 2021, Heinrich Schuchardt wrote:
>>
>>> Requiring that initrd is loaded below RAM start + 256 MiB led to failure
>>> to boot SUSE Linux with GRUB on QEMU, cf.
>>> https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00037.html
>>>
>>> Remove the constraint.
>>>
>>> Reported-by: Andreas Schwab <schwab@linux-m68k.org>
>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>>
>> With that patch the image in
>> http://download.opensuse.org/ports/riscv/tumbleweed/iso/ work again.
>>
>
> Thanks.
> @palmer: Can you take this one in this cycle ?

@Palmer, Paul, Albert
Ard suggested to move this patch through linux-riscv. Could you please
review the patch available at

https://lore.kernel.org/linux-riscv/20210629134018.62859-1-xypron.glpk@gmx.de/

The patch is necessary to boot on QEMU with GRUB with large initrd.

Best regards

Heinrich

>
>> Andreas.
>>
>> --
>> Andreas Schwab, schwab@linux-m68k.org
>> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
>> "And now for something completely different."
>
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] RISC-V: load initrd wherever it fits into memory
  2021-06-29 13:40 [PATCH 1/1] RISC-V: load initrd wherever it fits into memory Heinrich Schuchardt
  2021-06-29 22:56 ` Atish Patra
  2021-07-06 19:07 ` Andreas Schwab
@ 2021-07-22  6:09 ` Palmer Dabbelt
  2 siblings, 0 replies; 8+ messages in thread
From: Palmer Dabbelt @ 2021-07-22  6:09 UTC (permalink / raw)
  To: xypron.glpk
  Cc: ardb, schwab, Paul Walmsley, aou, Atish Patra, linux-efi,
	linux-riscv, linux-kernel, xypron.glpk

On Tue, 29 Jun 2021 06:40:18 PDT (-0700), xypron.glpk@gmx.de wrote:
> Requiring that initrd is loaded below RAM start + 256 MiB led to failure
> to boot SUSE Linux with GRUB on QEMU, cf.
> https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00037.html
>
> Remove the constraint.
>
> Reported-by: Andreas Schwab <schwab@linux-m68k.org>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  arch/riscv/include/asm/efi.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/include/asm/efi.h b/arch/riscv/include/asm/efi.h
> index 7542282f1141..649ab513dc99 100644
> --- a/arch/riscv/include/asm/efi.h
> +++ b/arch/riscv/include/asm/efi.h
> @@ -33,10 +33,10 @@ static inline unsigned long efi_get_max_fdt_addr(unsigned long image_addr)
>
>  #define ARCH_EFI_IRQ_FLAGS_MASK (SR_IE | SR_SPIE)
>
> -/* Load initrd at enough distance from DRAM start */
> +/* Load initrd anywhere in system RAM */
>  static inline unsigned long efi_get_max_initrd_addr(unsigned long image_addr)
>  {
> -	return image_addr + SZ_256M;
> +	return ULONG_MAX;
>  }
>
>  #define alloc_screen_info(x...)		(&screen_info)

Thanks, this is on fixes.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-07-22  6:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 13:40 [PATCH 1/1] RISC-V: load initrd wherever it fits into memory Heinrich Schuchardt
2021-06-29 22:56 ` Atish Patra
2021-06-30  7:30   ` Ard Biesheuvel
2021-07-02 19:11     ` Atish Patra
2021-07-06 19:07 ` Andreas Schwab
2021-07-09 17:14   ` Atish Patra
2021-07-20 15:00     ` Heinrich Schuchardt
2021-07-22  6:09 ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).